Inline const seq fix #7753
Workflow file for this run
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: nif ci | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| pull_request: | |
| # One in-flight run per branch/PR. The Windows job alone is ~40 minutes, so | |
| # without this every follow-up push to an open PR leaves the superseded run | |
| # burning a full matrix to produce results nobody will look at. `master` is | |
| # excluded from cancellation (github.sha makes its group unique per commit) | |
| # so the history of green builds there stays complete. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/master' && github.sha || '' }} | |
| cancel-in-progress: true | |
| # The suite runs as TWO jobs per platform, in parallel: | |
| # | |
| # build — the tree walk minus `tests/boot` | |
| # boot — `tests/boot` (the deterministic 3-stage self-host) on its own | |
| # | |
| # They are independent: `boot` reads `bin/` and writes `bin0..bin3` + | |
| # `nimcache/boot`, the tree walk writes `nimcache/.par`. Serially the bootstrap | |
| # was 601s of the 1917s Windows run (measured 2026-08-02) with everything else | |
| # waiting on it, so splitting takes that platform's wall time down by roughly a | |
| # third. The cost is a second runner per platform, which re-does the ~1 minute | |
| # of setup and the toolchain build. | |
| # | |
| # Both jobs share the `.github/actions/setup` preamble; each adds one step. | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 20 | |
| matrix: | |
| branch: [master] | |
| target: | |
| # `builder` lives on the target (not a keyed `include`) because the | |
| # two linux rows need different runners: amd64 on ubuntu-24.04, | |
| # arm64 on the arm-hosted image. An os-keyed include can't express | |
| # that split. | |
| # | |
| # `skip` is this row's HASTUR_SKIP: the suites its tree walk leaves | |
| # out, `;`-separated. Every row hands `tests/boot` to the `boot` job; | |
| # the windows row drops more (see its comment). | |
| - os: linux | |
| cpu: amd64 | |
| nim_branch: devel | |
| builder: ubuntu-24.04 | |
| skip: tests/boot | |
| - os: linux | |
| cpu: i386 | |
| nim_branch: devel | |
| builder: ubuntu-24.04 | |
| skip: tests/boot | |
| # linux/arm64 exercises the asm-generic `struct stat` layout and the | |
| # arm64-divergent fcntl constants (O_DIRECTORY et al) that no other | |
| # job reaches; tposixabi static_asserts the whole transcription | |
| # against this platform's real headers — see nim-lang/nimony#2155. | |
| - os: linux | |
| cpu: arm64 | |
| nim_branch: devel | |
| builder: ubuntu-24.04-arm | |
| skip: tests/boot | |
| - os: macos | |
| cpu: arm64 | |
| nim_branch: devel | |
| builder: macos-15 | |
| skip: tests/boot | |
| # Windows is the slow runner (4 cores, and a process creation costs | |
| # what a dozen do elsewhere), so it is the one job where a suite has | |
| # to earn its place by asserting something the OTHER four do not. | |
| # These six do not — each is dropped with its own reason: | |
| # | |
| # tests/nimony/macros ~40% of the whole suite's cost, measured, on | |
| # BOTH hosts. Every test here is a compile-time macro, and a macro | |
| # is a plugin nimony builds and runs mid-compile — a second full | |
| # toolchain pass per test, which on Windows is where 9 tests turn | |
| # into ~250-370s each. What they assert (bindSym scoping, | |
| # parseStmt, NimNode construction) is nimsem's, identical on every | |
| # host. | |
| # tests/nimony/plugins Same mechanism, same reason, another ~12%. | |
| # | |
| # Dropping those two does NOT stop Windows building and running a | |
| # compile-time plugin: `std/smartcli` IS one (`{.plugin: "deps/ | |
| # smartcli".}`), so tests/nimony/stdlib/tsmartcli_* exercises the | |
| # build-and-spawn path four times over, and tests/nimony/pluginpaths | |
| # — kept deliberately — is the test written for that machinery. | |
| # | |
| # tests/nimony/valgrind `hasValgrind` is false here, so | |
| # `testValgrind` returns before asserting anything. The directory | |
| # still compiles and runs 9 tests, one process each (the category | |
| # is neither joinable nor native), to check nothing the category | |
| # exists for. | |
| # tests/ithaqua The wasm backend. Its artifact is a .wasm | |
| # run under node; nothing in it is host-dependent. | |
| # bench `-d:benchSmoke` build-and-compare. The | |
| # question is "does it still build and still compute the same | |
| # numbers" — host-independent by construction. | |
| # tests/nimony/opt `--opt:speed`, i.e. the shoggoth passes. | |
| # The windows `boot` job below already builds every stage | |
| # `-d:release`, which is shoggoth on this host at full size. | |
| # | |
| # All six keep running on linux-amd64, linux-arm64 and macos-arm64, so | |
| # a regression in them is still caught the same day — just not four | |
| # times. Measured on run 35283728131: the tree walk's parallel phase | |
| # was 1593s of a 2003s step, and macros+plugins alone owned the | |
| # t=404..1216s stretch of it. | |
| - os: windows | |
| cpu: amd64 | |
| nim_branch: devel | |
| builder: windows-2025 | |
| skip: >- | |
| tests/boot;tests/nimony/macros;tests/nimony/plugins;tests/nimony/valgrind;tests/ithaqua;bench;tests/nimony/opt | |
| name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.target.nim_branch }} (${{ matrix.branch }})' | |
| runs-on: ${{ matrix.target.builder }} | |
| env: | |
| NIM_DIR: nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }} | |
| NIM_BRANCH: ${{ matrix.target.nim_branch }} | |
| NIM_ARCH: ${{ matrix.target.cpu }} | |
| steps: | |
| # A local `uses:` needs the action's file on disk first, and the setup | |
| # action itself owns the real checkout (it has to configure `core.autocrlf` | |
| # before git touches any source). So fetch just `.github/actions` into a | |
| # path of its own — `nimony/` must stay untouched here, or this sparse | |
| # config would be what the real checkout inherits. | |
| - uses: actions/checkout@v7 | |
| with: | |
| path: ci-actions | |
| sparse-checkout: .github/actions | |
| sparse-checkout-cone-mode: false | |
| - uses: ./ci-actions/.github/actions/setup | |
| with: | |
| cpu: ${{ matrix.target.cpu }} | |
| nim_branch: ${{ matrix.target.nim_branch }} | |
| - name: Test building nimony (Linux i386) | |
| # i386 runs no tests yet (see the tester step below), so without this it | |
| # would assert nothing at all. `build all` is the coverage it does have: | |
| # that the toolchain still compiles for a 32-bit target. | |
| if: matrix.target.cpu == 'i386' | |
| run: | | |
| cd nimony | |
| nim c -r src/hastur/hastur --release build all | |
| - name: Run tester | |
| if: matrix.target.cpu != 'i386' # TODO: enables i386 | |
| # Every platform tests with its default C toolchain. Windows forced | |
| # clang from #1846 on ("faster cc step"), but an A/B of this exact | |
| # step on identical runners measured gcc 1568s vs clang 1912s, and | |
| # local 3x3 reps at 4 cores agree (gcc 683-830s, clang 854-933s). | |
| # Export NIMONY_CC=clang here to exercise the clang-on-MinGW path | |
| # again; tools/tester.nim then also adds the -fuse-ld=lld that | |
| # clang's native PE TLS needs (ld.bfd lays out `.tls$` wrong). | |
| # | |
| # HASTUR_SKIP hands `tests/boot` to the `boot` job below, and on Windows | |
| # also drops the suites whose assertion is host-independent (the matrix | |
| # row spells out which, and why). Unset — as it is for anyone running | |
| # `nim c -r tools/tester.nim` locally — the tester still walks the whole | |
| # tree, bootstrap included. | |
| env: | |
| HASTUR_SKIP: ${{ matrix.target.skip }} | |
| run: | | |
| cd nimony | |
| nim c -r tools/tester.nim | |
| boot: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 20 | |
| matrix: | |
| branch: [master] | |
| # No i386 row: that target runs no tests yet, so there is no bootstrap | |
| # to run either. Otherwise this mirrors `build`'s matrix. | |
| target: | |
| - os: linux | |
| cpu: amd64 | |
| nim_branch: devel | |
| builder: ubuntu-24.04 | |
| - os: linux | |
| cpu: arm64 | |
| nim_branch: devel | |
| builder: ubuntu-24.04-arm | |
| - os: macos | |
| cpu: arm64 | |
| nim_branch: devel | |
| builder: macos-15 | |
| - os: windows | |
| cpu: amd64 | |
| nim_branch: devel | |
| builder: windows-2025 | |
| name: 'boot ${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.target.nim_branch }} (${{ matrix.branch }})' | |
| runs-on: ${{ matrix.target.builder }} | |
| env: | |
| NIM_DIR: nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }} | |
| NIM_BRANCH: ${{ matrix.target.nim_branch }} | |
| NIM_ARCH: ${{ matrix.target.cpu }} | |
| steps: | |
| # A local `uses:` needs the action's file on disk first, and the setup | |
| # action itself owns the real checkout (it has to configure `core.autocrlf` | |
| # before git touches any source). So fetch just `.github/actions` into a | |
| # path of its own — `nimony/` must stay untouched here, or this sparse | |
| # config would be what the real checkout inherits. | |
| - uses: actions/checkout@v7 | |
| with: | |
| path: ci-actions | |
| sparse-checkout: .github/actions | |
| sparse-checkout-cone-mode: false | |
| - uses: ./ci-actions/.github/actions/setup | |
| with: | |
| cpu: ${{ matrix.target.cpu }} | |
| nim_branch: ${{ matrix.target.nim_branch }} | |
| - name: Build the toolchain | |
| # `tests/boot/setup.nim` requires a fully populated `bin/`, and a directly | |
| # named suite does not run `tests/setup.hastur` (which is what builds it | |
| # during a tree walk) — so the build is its own command here. | |
| # | |
| # `build all` includes arkham + nifasm (from the sibling `../nativenif` | |
| # checked out by the setup action), which is what a native boot needs in | |
| # `bin/`. WHICH backend the bootstrap then takes is `useNativeBoot`'s | |
| # call, in Nim, per host — nothing here selects it. It matters that this | |
| # step runs at all, though: the artifact cache is restored through a | |
| # `restore-keys:` prefix, so a commit touching `src/**` gets the PREVIOUS | |
| # commit's `bin/` handed to it and would otherwise boot stale tools. | |
| run: | | |
| cd nimony | |
| nim c -r src/hastur/hastur --release build all | |
| - name: Run native backend tests (Linux amd64) | |
| # The curated native regression set (full ARC suite + closures + cps) | |
| # through `nimony n`. Only Linux amd64 runs it as a step of its own: | |
| # Windows reaches the same corpus from inside the tree walk instead, | |
| # which compiles every whitelisted test with `nimony n` rather than | |
| # `nimony c` (see `walkUsesNative` in src/hastur/nativelist.nim) — there, skipping | |
| # gcc and the linker is what the step is FOR, so the coverage costs no | |
| # extra runner time. `NativeTestDirsWindows` is the list it reads. | |
| if: runner.os == 'Linux' && matrix.target.cpu == 'amd64' | |
| run: | | |
| cd nimony | |
| nim c -r src/hastur/hastur --release native | |
| - name: Run bootstrap | |
| # `hastur tests/boot` is the same suite the tree walk would have reached; | |
| # naming it directly is what lets the other job skip it. | |
| run: | | |
| cd nimony | |
| nim c -r src/hastur/hastur --release tests/boot |