From 0b4d0a77ab089b43281a1d08a2da3f666ba6eee1 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sun, 14 Jan 2024 11:32:03 -0800 Subject: [PATCH] fix(ci): test all systems --- .github/workflows/nodes.yml | 186 ++++++++++++++++++++++++++++++++++++ ci/nodes.nix | 3 +- devShell.nix | 5 +- 3 files changed, 191 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodes.yml b/.github/workflows/nodes.yml index 91d008a1..1953ce25 100644 --- a/.github/workflows/nodes.yml +++ b/.github/workflows/nodes.yml @@ -28,6 +28,192 @@ jobs: args: -u .github/workflows/nodes.yml .ci/workflow.yml attrs: nixpkgs.diffutils command: diff + mediabox: + name: nodes-mediabox + runs-on: ubuntu-latest + steps: + - id: checkout + name: git clone + uses: actions/checkout@v3 + with: + submodules: false + - id: nix-install + name: nix install + uses: arcnmx/ci/actions/nix/install@v0.6 + - id: ci-setup + name: nix setup + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.mediabox.run.bootstrap + quiet: false + - id: architectures + name: prepare for emulated builds + run: 'sudo $(which archbinfmt) + + ' + - id: ci-dirty + name: nix test dirty + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.mediabox.run.test + command: ci-build-dirty + quiet: false + stdout: ${{ runner.temp }}/ci.build.dirty + - id: ci-test + name: nix test build + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.mediabox.run.test + command: ci-build-realise + ignore-exit-code: true + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + - env: + CI_EXIT_CODE: ${{ steps.ci-test.outputs.exit-code }} + id: ci-summary + name: nix test results + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.mediabox.run.test + command: ci-build-summarise + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + stdout: ${{ runner.temp }}/ci.build.cache + - env: + CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} + id: ci-cache + if: always() + name: nix test cache + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.mediabox.run.test + command: ci-build-cache + quiet: false + stdin: ${{ runner.temp }}/ci.build.cache + reisen-ct: + name: nodes-reisen-ct + runs-on: ubuntu-latest + steps: + - id: checkout + name: git clone + uses: actions/checkout@v3 + with: + submodules: false + - id: nix-install + name: nix install + uses: arcnmx/ci/actions/nix/install@v0.6 + - id: ci-setup + name: nix setup + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.reisen-ct.run.bootstrap + quiet: false + - id: architectures + name: prepare for emulated builds + run: 'sudo $(which archbinfmt) + + ' + - id: ci-dirty + name: nix test dirty + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.reisen-ct.run.test + command: ci-build-dirty + quiet: false + stdout: ${{ runner.temp }}/ci.build.dirty + - id: ci-test + name: nix test build + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.reisen-ct.run.test + command: ci-build-realise + ignore-exit-code: true + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + - env: + CI_EXIT_CODE: ${{ steps.ci-test.outputs.exit-code }} + id: ci-summary + name: nix test results + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.reisen-ct.run.test + command: ci-build-summarise + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + stdout: ${{ runner.temp }}/ci.build.cache + - env: + CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} + id: ci-cache + if: always() + name: nix test cache + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.reisen-ct.run.test + command: ci-build-cache + quiet: false + stdin: ${{ runner.temp }}/ci.build.cache + tei: + name: nodes-tei + runs-on: ubuntu-latest + steps: + - id: checkout + name: git clone + uses: actions/checkout@v3 + with: + submodules: false + - id: nix-install + name: nix install + uses: arcnmx/ci/actions/nix/install@v0.6 + - id: ci-setup + name: nix setup + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.tei.run.bootstrap + quiet: false + - id: architectures + name: prepare for emulated builds + run: 'sudo $(which archbinfmt) + + ' + - id: ci-dirty + name: nix test dirty + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.tei.run.test + command: ci-build-dirty + quiet: false + stdout: ${{ runner.temp }}/ci.build.dirty + - id: ci-test + name: nix test build + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.tei.run.test + command: ci-build-realise + ignore-exit-code: true + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + - env: + CI_EXIT_CODE: ${{ steps.ci-test.outputs.exit-code }} + id: ci-summary + name: nix test results + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.tei.run.test + command: ci-build-summarise + quiet: false + stdin: ${{ runner.temp }}/ci.build.dirty + stdout: ${{ runner.temp }}/ci.build.cache + - env: + CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} + id: ci-cache + if: always() + name: nix test cache + uses: arcnmx/ci/actions/nix/run@v0.6 + with: + attrs: ci.job.tei.run.test + command: ci-build-cache + quiet: false + stdin: ${{ runner.temp }}/ci.build.cache tewi: name: nodes-tewi runs-on: ubuntu-latest diff --git a/ci/nodes.nix b/ci/nodes.nix index 14de46cc..3daa55d5 100644 --- a/ci/nodes.nix +++ b/ci/nodes.nix @@ -59,8 +59,7 @@ with lib; { }; jobs = let - main = import ../.; - enabledHosts = ["tewi"]; + enabledHosts = ["tewi" "tei" "mediabox" "reisen-ct"]; in mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: { tasks.${host}.inputs = channels.nixfiles.network.nodes.${host}.system.build.toplevel; diff --git a/devShell.nix b/devShell.nix index 9200fa4c..83c37330 100644 --- a/devShell.nix +++ b/devShell.nix @@ -10,7 +10,10 @@ let done ''; nf-actions-test = pkgs.writeShellScriptBin "nf-actions-test" '' - exec nix run --argstr config "$NF_CONFIG_ROOT/ci/nodes.nix" -f '${inputs.ci}' job.tewi.test + set -eu + for host in tewi tei mediabox reisen-ct; do + nix run --argstr config "$NF_CONFIG_ROOT/ci/nodes.nix" -f '${inputs.ci}' job.$host.test + done ''; nf-update = pkgs.writeShellScriptBin "nf-update" '' exec nix flake update "$@"