Skip to content

ReproOS R5 session 2 Phases A-D GREEN; gcc-4.6.4 Stage A walled at sy… #561

ReproOS R5 session 2 Phases A-D GREEN; gcc-4.6.4 Stage A walled at sy…

ReproOS R5 session 2 Phases A-D GREEN; gcc-4.6.4 Stage A walled at sy… #561

Workflow file for this run

name: CI
on:
push:
branches: [main, dev]
pull_request:
# CI replays the project's deterministic dev environment via the
# shared `metacraft-github-actions` composite actions. Per the
# `ci-shared-dev-env` policy, this workflow:
#
# - does NOT install tools (nim, gcc, capnp, etc.) directly; the
# flake's devShell declares them.
# - does NOT inline `nix develop --command …` invocations; it
# uses `dev-exec` from the shared `setup-dev-env` action.
# - clones sibling repos via `clone-repo` and threads them through
# `flake-override-inputs` so the dev shell consumes the local
# checkouts instead of pinned github tarballs.
#
# Policy doc:
# github.com/metacraft-labs/metacraft-dev-guidelines/blob/latest/policies/ci-shared-dev-env.md
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metacraft-labs/metacraft-github-actions/setup-dev-env@main
with:
env-flavor: nix
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
- name: just lint
run: dev-exec just lint
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: lint-logs
path: test-logs/
retention-days: 30
test:
name: Test
# Self-hosted bare-metal Linux runner. Standard ubuntu-latest is
# too small (4 vCPU / 16 GB) — the parallel nim c phase trips OOM
# and the test runner hits an fd race at higher concurrency. The
# metacraft-labs bare-metal pool has nixos hosts with plenty of
# cores + RAM; lift the parallelism caps below for them.
runs-on: [self-hosted, Linux, X64, bare-metal, nixos]
env:
REPROBUILD_MAX_PARALLELISM: "16"
REPROBUILD_TEST_THREADS: "4"
steps:
- uses: actions/checkout@v4
# Sibling clones: scripts/run_tests.sh builds ../runquota and
# ct_test_nim_unittest resolves the ct-test source via the
# `CT_TEST_SRC` env var. Both come from local clones so changes
# in either sibling are picked up immediately without waiting
# for a flake.lock bump.
- name: Clone ct-test sibling
uses: metacraft-labs/metacraft-github-actions/clone-repo@main
with:
repo: metacraft-labs/ct-test
ref: main
path: ${{ github.workspace }}/../ct-test
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
- name: Clone runquota sibling
uses: metacraft-labs/metacraft-github-actions/clone-repo@main
with:
repo: metacraft-labs/runquota
ref: main
path: ${{ github.workspace }}/../runquota
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
# reprobuild-examples carries the canonical M71 reference home.nim
# under m71-home-profile-walkthrough/ + a number of hello-binary
# fixtures (haskell-cabal, crystal-shards, nim/mode3-pilot, …) that
# several library / e2e tests assert against by walking up to the
# metacraft root and then into ../reprobuild-examples. Without this
# clone, the M71 reference-home check fails at runtime because the
# path baked in via currentSourcePath() at compile time points at
# a non-existent file on the CI runner.
- name: Clone reprobuild-examples sibling
uses: metacraft-labs/metacraft-github-actions/clone-repo@main
with:
repo: metacraft-labs/reprobuild-examples
ref: main
path: ${{ github.workspace }}/../reprobuild-examples
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
- uses: metacraft-labs/metacraft-github-actions/setup-dev-env@main
with:
env-flavor: nix
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
flake-override-inputs: |
ct-test-src=../ct-test
runquota-src=../runquota
- name: just test
run: dev-exec just test
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-logs
path: test-logs/
retention-days: 30
nix-build:
name: Nix Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metacraft-labs/metacraft-github-actions/setup-dev-env@main
with:
env-flavor: nix
gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}
- name: nix build
run: dev-exec nix build .#default
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: test-logs/
retention-days: 30