From 65dc7b40b67bd54da04ccd2b80e3257b7579f5db Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 2 Aug 2026 02:30:57 +0100 Subject: [PATCH 1/4] ci: check project formatting with Nix --- .github/workflows/lint.yml | 17 ++++++++++++++--- flake.nix | 10 ++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ae7e97..719dde5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,19 +35,30 @@ jobs: - name: Check with Clippy run: just clippy - rustfmt: + project-format: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install Nix + uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + - name: Install Rust (nightly) uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 with: toolchain: nightly components: rustfmt - - name: Check with Rustfmt - run: cargo fmt -- --check + - name: Enter Nix devshell + uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 + with: + arguments: .#ci-format + + - name: Format project + run: just fmt + + - name: Check formatting diff + run: git diff --exit-code docs: runs-on: blacksmith-2vcpu-ubuntu-2404 diff --git a/flake.nix b/flake.nix index 60e218b..053b7fc 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,16 @@ doCheck = true; }; + devShells.ci-format = pkgs.mkShell { + packages = [ + config.formatter + pkgs.fd + pkgs.just + pkgs.prettier + pkgs.taplo + ]; + }; + devShells.default = pkgs.mkShell { buildInputs = [ x52just ]; From 35281a35299e24f775f6d6fd3dd95baadcf102e3 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 2 Aug 2026 02:33:57 +0100 Subject: [PATCH 2/4] ci: collect repeat timing sample From f65d51ec1caf26c683e72845b1a8cf001716c875 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 2 Aug 2026 02:35:23 +0100 Subject: [PATCH 3/4] ci: collect repeat timing sample From 019d46d3bc99c731ca5426bd89b1c76eec0cda88 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 2 Aug 2026 02:41:24 +0100 Subject: [PATCH 4/4] ci: name formatting job consistently --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 719dde5..ec4a5ac 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: - name: Check with Clippy run: just clippy - project-format: + format: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1