Repository navigation
Merge pull request #243 from jappeace-sloth/feat/text-color-in-configs #727
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
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| actions: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| nix-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache | |
| df -h | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| # Decision: harden substitution against the self-hosted cache dropping | |
| # multi-GB NARs mid-stream ("Stream error in the HTTP/2 framing layer", | |
| # seen twice on the android system image). http2=false removes that | |
| # curl failure mode, download-attempts covers other transient drops. | |
| # Alternative --fallback was rejected: a cache miss on the patched GHC | |
| # would rebuild it from source in CI (hours) instead of failing fast. | |
| # These two lines are repeated in every Linux and simulator job below; | |
| # macos-apk deliberately omits them (HTTP/1.1 stalled its downloads). | |
| http2 = false | |
| download-attempts = 10 | |
| - name: Build all nix targets (excludes emulator/simulator runners) | |
| run: nix-build nix/ci.nix -A all-builds | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| # The Android APK is a Linux-host cross-compile that does not work natively on | |
| # Darwin (see docs/android-apk-on-macos.md). All the VM orchestration lives | |
| # in nix/apk.nix: on macOS it boots a Linux VM, builds the APK inside, and | |
| # copies it out, so this job is just `nix-build nix/apk.nix` -- the same | |
| # command a local Mac user runs. This keeps the build reproducible instead of | |
| # encoding it in CI steps. | |
| # | |
| # Intel runner (x86_64-darwin) on purpose: the VM must be x86_64-linux, and | |
| # the Android NDK only supports x86_64-apple-darwin / x86_64-unknown-linux-gnu | |
| # as build hosts anyway. macos-15-intel is the current Intel image (macos-13 | |
| # was retired 2025-12-04 and its jobs queue forever). The VM runs under QEMU | |
| # TCG software emulation (no nested virt on hosted runners), so it is slow; | |
| # hence the long timeout. | |
| macos-apk: | |
| runs-on: macos-15-intel | |
| # 180 rather than 120: cross packages missing from | |
| # nix-cache.jappie.me get built inside the TCG-emulated VM on | |
| # every run (its store is ephemeral, the host cache cannot help), | |
| # and the new uuid-types closure (PR #239) blew the 120-minute | |
| # budget at exactly 2h00m (run 29272233710). Once the cache | |
| # carries the closure this job returns to ~45 minutes. | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| # No http2=false here, unlike every other job: on macos-15-intel the | |
| # HTTP/1.1 download of the multi-GB NDK toolchain NARs stalled | |
| # silently for 99 minutes and timed out the job (run 28588129668), | |
| # while HTTP/2 has only ever failed on the ubuntu runners. | |
| # apk.nix boots a qemu VM, so its build is __noChroot; relaxed permits | |
| # that while still sandboxing everything else. | |
| sandbox = relaxed | |
| - name: Nix store cache | |
| uses: nix-community/cache-nix-action@v7 | |
| with: | |
| primary-key: nix-macos-apk-${{ hashFiles('npins/sources.json', 'nix/*.nix', '*.cabal') }} | |
| restore-prefixes-first-match: nix-macos-apk- | |
| gc-max-store-size-macos: 8G | |
| - name: Build the Android APK (apk.nix boots a Linux VM) | |
| run: | | |
| set -euo pipefail | |
| nix-build nix/apk.nix -o result-apk | |
| echo "=== APK built on macOS ===" | |
| find result-apk/ -name '*.apk' -exec ls -l {} + | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache | |
| df -h | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| http2 = false | |
| download-attempts = 10 | |
| - name: Run combined emulator test (lifecycle + UI + buttons + scroll) | |
| run: nix-build nix/ci.nix -A emulator-all -o result-emulator-all && ./result-emulator-all/bin/test-all | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| # armv7a (armeabi-v7a) — 32-bit ARM, used by Wear OS watches | |
| android-armv7a-emulator: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache | |
| df -h | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| http2 = false | |
| download-attempts = 10 | |
| - name: Run armv7a emulator test | |
| run: nix-build nix/ci.nix -A emulator-armv7a -o result-emulator-armv7a && ./result-emulator-armv7a/bin/test-all | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| ios: | |
| runs-on: macos-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| http2 = false | |
| download-attempts = 10 | |
| - run: nix-build nix/ci.nix -A simulator-all -A ios-lib | |
| - name: Run combined simulator test (lifecycle + UI + buttons + scroll) | |
| run: nix-build nix/ci.nix -A simulator-all -o result-simulator-all && ./result-simulator-all/bin/test-all-ios | |
| - name: "Guard #216: verify no UDOT/SDOT in iOS device compilation" | |
| run: nix-build nix/ci.nix -A ios-sigill-check | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| watchos: | |
| runs-on: macos-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://nix-cache.jappie.me | |
| extra-trusted-public-keys = nix-cache.jappie.me:WjkKcvFtHih2i+n7bdsrJ3HuGboJiU2hA2CZbf9I9oc= | |
| http2 = false | |
| download-attempts = 10 | |
| - name: Build watchOS (with diagnostics) | |
| run: | | |
| # Background watchdog: every 60s log what nix is building + system load | |
| (while true; do | |
| echo "=== WATCHDOG $(date -u +%H:%M:%S) ===" | |
| echo "--- nix builders ---" | |
| ps aux | grep '[n]ix-build\|[n]ix-daemon\|[g]hc\|[l]ibtool\|[c]lang\|[c]onfigure' | head -10 || true | |
| echo "--- disk ---" | |
| df -h / | tail -1 | |
| echo "--- load ---" | |
| uptime | |
| echo "=== END WATCHDOG ===" | |
| sleep 60 | |
| done) & | |
| WATCHDOG_PID=$! | |
| trap "kill $WATCHDOG_PID 2>/dev/null" EXIT | |
| nix-build nix/ci.nix -A watchos-simulator-all -A watchos-lib -v | |
| - name: Run combined watchOS simulator test | |
| run: nix-build nix/ci.nix -A watchos-simulator-all -o result-watchos && ./result-watchos/bin/test-all-watchos | |
| - name: Cancel workflow on failure | |
| if: failure() | |
| continue-on-error: true | |
| run: gh run cancel ${{ github.run_id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} |