Fix deadlock on changing to builtin themes #287
This file contains hidden or 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 | |
| # PR / manual: three native test jobs (no skipped rows). Push to main: Linux-only (fast). | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "doc/**" | |
| - "README.md" | |
| - "**.md" | |
| - "LICENSE**" | |
| pull_request: | |
| paths-ignore: | |
| - "doc/**" | |
| - "README.md" | |
| - "**.md" | |
| - "LICENSE**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ZIG_VERSION: "0.16.0" | |
| jobs: | |
| test: | |
| name: Tests (${{ matrix.name }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ github.event_name == 'push' && fromJSON('[{"os":"ubuntu-latest","name":"Linux"}]') || fromJSON('[{"os":"ubuntu-latest","name":"Linux"},{"os":"windows-latest","name":"Windows"},{"os":"macos-14","name":"macOS"}]') }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Pre-create Zig global cache tmp/ | |
| shell: bash | |
| run: mkdir -p "$GITHUB_WORKSPACE/zig-global-cache/tmp" | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: ${{ env.ZIG_VERSION }} | |
| cache-key: ${{ hashFiles('build.zig.zon') }} | |
| # Zig 0.16's HTTP client doesn't retry on `HttpConnectionClosing` from | |
| # GitHub. Pre-fetch all deps in a retry loop, separate from the build, so | |
| # the loop only re-runs the network step. After this step `zig build` runs | |
| # offline against the populated global cache. | |
| - name: Fetch dependencies (with retries) | |
| shell: bash | |
| env: | |
| ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/zig-global-cache | |
| run: | | |
| n=0 | |
| until [ "$n" -ge 5 ]; do | |
| zig build --fetch && break | |
| n=$((n+1)) | |
| echo "Fetch attempt $n failed, sleeping $((n*10))s before retry..." | |
| sleep $((n*10)) | |
| done | |
| if [ "$n" -ge 5 ]; then | |
| echo "All fetch attempts failed"; exit 1 | |
| fi | |
| - name: Run tests | |
| shell: bash | |
| env: | |
| ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/zig-global-cache | |
| run: zig build test --summary all | |
| - name: Fetch wasm dependencies (with retries) | |
| shell: bash | |
| env: | |
| ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/zig-global-cache | |
| run: | | |
| n=0 | |
| until [ "$n" -ge 5 ]; do | |
| zig build --fetch -Dtarget=wasm32-freestanding && break | |
| n=$((n+1)) | |
| echo "Fetch attempt $n failed, sleeping $((n*10))s before retry..." | |
| sleep $((n*10)) | |
| done | |
| if [ "$n" -ge 5 ]; then | |
| echo "All fetch attempts failed"; exit 1 | |
| fi | |
| - name: Compile web (wasm) build | |
| shell: bash | |
| env: | |
| ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/zig-global-cache | |
| run: zig build check-web | |
| - name: Verify SDK version / ABI fingerprint lock | |
| shell: bash | |
| env: | |
| ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/zig-global-cache | |
| run: zig build test-sdk-version --summary all |