From cbde0650a4602180b96b63b4e39a7b5ca2f46a65 Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 26 Nov 2026 04:21:08 +0100 Subject: [PATCH 1/2] ci: the suite once on Linux, on Fabrica's NixOS runner (pipeline linux, flake ci shell) Mark, 2026-11-26: the Linux run goes on Fabrica's server runner. The flake gives only the toolchain (nixos-26.05, locked as Ianitor's); the pipeline runs cargo test in debug and release and the zeroize probe. It builds and switches nothing on the server. --- .fabrica/artifex/linux.yaml | 22 ++++++++++++++++++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 17 +++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .fabrica/artifex/linux.yaml create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.fabrica/artifex/linux.yaml b/.fabrica/artifex/linux.yaml new file mode 100644 index 0000000..069da5a --- /dev/null +++ b/.fabrica/artifex/linux.yaml @@ -0,0 +1,22 @@ +# Arcanum: the whole suite once on Linux, on the server's NixOS runner (Mark, 2026-11-26: "Fabrica server runner"). +# By hand (Artifex → arcanum → linux, or the hub's POST /api/runs with pipeline linux and a ref), or on a push to +# ci/linux. It builds and switches nothing on the server. The toolchain is the flake's `ci` shell (nixos-26.05). +name: linux +on: + push: [ci/linux] + manual: true +runner: nixos +env: + CARGO_TERM_COLOR: "never" +steps: + - id: toolchain + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c bash -c "rustc --version && cargo --version" + - id: test-debug + needs: [toolchain] + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --no-fail-fast + - id: test-release + needs: [test-debug] + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --release --no-fail-fast + - id: zeroize-probe + needs: [test-release] + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c bash -c "cd zeroize-probe && cargo test --release -- --test-threads=1" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8eb81e2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1793865203, + "narHash": "sha256-/cpdPHaySDIyCgZI6EWngiM6jK3YLUNzv1b7lTzy6Bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c56a87d8e41ce69bd2af57eb35dcc117a9dfca33", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..99f43a0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + description = "The Linux test shell for Fabrica's NixOS runner (.fabrica/artifex/linux.yaml)"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + + outputs = + { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + # nix develop .#ci -c cargo test : the toolchain only; the tests fetch crates from crates.io. + devShells.x86_64-linux.ci = pkgs.mkShell { + packages = with pkgs; [ cargo rustc clippy rustfmt git ]; + }; + }; +} From dafcebdef064955c5adc606cb4bba06f1e6434d0 Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 26 Nov 2026 04:24:32 +0100 Subject: [PATCH 2/2] ci(linux): every run line starts with nix, with no && inside, so Fabrica's preflight does not read cargo as a runner tool --- .fabrica/artifex/linux.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.fabrica/artifex/linux.yaml b/.fabrica/artifex/linux.yaml index 069da5a..a0dce3f 100644 --- a/.fabrica/artifex/linux.yaml +++ b/.fabrica/artifex/linux.yaml @@ -1,6 +1,7 @@ # Arcanum: the whole suite once on Linux, on the server's NixOS runner (Mark, 2026-11-26: "Fabrica server runner"). # By hand (Artifex → arcanum → linux, or the hub's POST /api/runs with pipeline linux and a ref), or on a push to -# ci/linux. It builds and switches nothing on the server. The toolchain is the flake's `ci` shell (nixos-26.05). +# ci/linux. Every run line starts with `nix` and has no `&&`, `;` or `|`: Fabrica's preflight reads the first +# word of each such part as a tool the runner must have, even inside quotes. It builds and switches nothing on the server. The toolchain is the flake's `ci` shell (nixos-26.05). name: linux on: push: [ci/linux] @@ -10,7 +11,7 @@ env: CARGO_TERM_COLOR: "never" steps: - id: toolchain - run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c bash -c "rustc --version && cargo --version" + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo --version - id: test-debug needs: [toolchain] run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --no-fail-fast @@ -19,4 +20,4 @@ steps: run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --release --no-fail-fast - id: zeroize-probe needs: [test-release] - run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c bash -c "cd zeroize-probe && cargo test --release -- --test-threads=1" + run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --release --manifest-path zeroize-probe/Cargo.toml -- --test-threads=1