ci: add emscripten #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
jobs: | |
ci-ubuntu: | |
name: Build on Linux (Ubuntu) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- uses: actions/checkout@v4 | |
- uses: mymindstorm/setup-emsdk@v14 | |
- name: verify emscripten toolchain | |
run: emcc -v | |
- uses: lukka/get-cmake@latest | |
- name: install dependencies | |
run: ./vcpkg.sh | |
- name: build desktop | |
run: make build_desktop | |
- name: build test | |
run: make test | |
ci-mac: | |
name: Build on MacOS | |
runs-on: macOS-latest | |
steps: | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- uses: actions/checkout@v4 | |
- uses: mymindstorm/setup-emsdk@v14 | |
- name: verify emscripten toolchain | |
run: emcc -v | |
- uses: lukka/get-cmake@latest | |
- name: install dependencies | |
run: ./vcpkg.sh | |
- name: build desktop | |
run: make build_desktop | |
- name: build test | |
run: make test | |
fmt: | |
name: Formatting Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Run clang-format" | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '18' |