From 0820297a3f62484c354e512e26754df2208c0385 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 8 Oct 2026 01:41:29 +0300 Subject: [PATCH 1/5] ci: overlap Rust and Nix setup --- .github/actions/prepare-nix/action.yml | 21 +++++++++++++++++++++ .github/workflows/ci.yml | 11 +++++++++-- .github/workflows/coverage.yml | 21 ++++++++++++++------- 3 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 .github/actions/prepare-nix/action.yml diff --git a/.github/actions/prepare-nix/action.yml b/.github/actions/prepare-nix/action.yml new file mode 100644 index 0000000..c3bdae0 --- /dev/null +++ b/.github/actions/prepare-nix/action.yml @@ -0,0 +1,21 @@ +name: Prepare Nix devshell +description: Install Nix and prepare the selected devshell. + +inputs: + devshell: + description: Flake devshell to prepare. + required: false + default: . + +runs: + using: composite + steps: + - name: Install Nix + uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + + - name: Prepare Nix devshell + shell: bash + env: + DEVSHELL: ${{ inputs.devshell }} + run: | + "$HOME/.nix-profile/bin/nix" develop "$DEVSHELL" --command true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 558b888..2f090ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,12 @@ jobs: with: persist-credentials: false - - name: Install Nix - uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + - name: Prepare Nix devshell + id: devshell + background: true + uses: $/.github/actions/prepare-nix + with: + devshell: .#ci - name: Install Rust (${{ matrix.toolchain.name }}) uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 @@ -52,6 +56,9 @@ jobs: with: tool: cargo-nextest + - name: Wait for Nix devshell preparation + wait: devshell + - name: Enter Nix devshell uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 67c3a72..a4c3df3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,24 +21,31 @@ jobs: with: persist-credentials: false - - name: Install Nix - uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + - name: Prepare Nix devshell + id: devshell + background: true + uses: $/.github/actions/prepare-nix + with: + devshell: .#ci - name: Install Rust uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 with: components: llvm-tools-preview - - name: Enter Nix devshell - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 - with: - arguments: .#ci - - name: Install cargo-llvm-cov uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20 with: tool: cargo-llvm-cov + - name: Wait for Nix devshell preparation + wait: devshell + + - name: Enter Nix devshell + uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 + with: + arguments: .#ci + - name: Generate code coverage run: just test-coverage-codecov From a878a426f2f73387b41104373f04567625047a90 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 8 Oct 2026 02:19:58 +0300 Subject: [PATCH 2/5] ci: correct MSRV workflow pin comment --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f090ba..954457c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ concurrency: jobs: read_msrv: name: Read MSRV - uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@d3d2883c667da4f83d8af52be9f236ea3fcdd82c # v0.1.3 + uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@d3d2883c667da4f83d8af52be9f236ea3fcdd82c # main test: needs: read_msrv From 52e9d6e30b092f53d7d05b20a3f016f1097cebbd Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 8 Oct 2026 02:52:48 +0300 Subject: [PATCH 3/5] ci: use nix-develop action for parallel shell setup --- .github/actions/prepare-nix/action.yml | 16 +++++++--------- .github/workflows/ci.yml | 9 ++------- .github/workflows/coverage.yml | 9 ++------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/actions/prepare-nix/action.yml b/.github/actions/prepare-nix/action.yml index c3bdae0..4810ced 100644 --- a/.github/actions/prepare-nix/action.yml +++ b/.github/actions/prepare-nix/action.yml @@ -1,9 +1,9 @@ -name: Prepare Nix devshell -description: Install Nix and prepare the selected devshell. +name: Set up Nix devshell +description: Install Nix and enter the selected devshell. inputs: devshell: - description: Flake devshell to prepare. + description: Flake devshell to enter. required: false default: . @@ -13,9 +13,7 @@ runs: - name: Install Nix uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 - - name: Prepare Nix devshell - shell: bash - env: - DEVSHELL: ${{ inputs.devshell }} - run: | - "$HOME/.nix-profile/bin/nix" develop "$DEVSHELL" --command true + - name: Enter Nix devshell + uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 + with: + arguments: ${{ inputs.devshell }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 954457c..3cfb712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: with: persist-credentials: false - - name: Prepare Nix devshell + - name: Set up Nix devshell id: devshell background: true uses: $/.github/actions/prepare-nix @@ -56,14 +56,9 @@ jobs: with: tool: cargo-nextest - - name: Wait for Nix devshell preparation + - name: Wait for Nix devshell wait: devshell - - name: Enter Nix devshell - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 - with: - arguments: .#ci - - name: Downgrade for MSRV if: matrix.toolchain.name == 'msrv' run: just downgrade-for-msrv diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a4c3df3..57fecd1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,7 +21,7 @@ jobs: with: persist-credentials: false - - name: Prepare Nix devshell + - name: Set up Nix devshell id: devshell background: true uses: $/.github/actions/prepare-nix @@ -38,14 +38,9 @@ jobs: with: tool: cargo-llvm-cov - - name: Wait for Nix devshell preparation + - name: Wait for Nix devshell wait: devshell - - name: Enter Nix devshell - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 - with: - arguments: .#ci - - name: Generate code coverage run: just test-coverage-codecov From f25f71d5322a2e8ecb9cfcfd34284cf840e3b251 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 8 Oct 2026 04:26:00 +0300 Subject: [PATCH 4/5] ci: inline parallel Rust and Nix setup --- .github/actions/prepare-nix/action.yml | 19 ------------------- .github/workflows/ci.yml | 22 +++++++++++++++------- .github/workflows/coverage.yml | 22 +++++++++++++++------- 3 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 .github/actions/prepare-nix/action.yml diff --git a/.github/actions/prepare-nix/action.yml b/.github/actions/prepare-nix/action.yml deleted file mode 100644 index 4810ced..0000000 --- a/.github/actions/prepare-nix/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Set up Nix devshell -description: Install Nix and enter the selected devshell. - -inputs: - devshell: - description: Flake devshell to enter. - required: false - default: . - -runs: - using: composite - steps: - - name: Install Nix - uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 - - - name: Enter Nix devshell - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 - with: - arguments: ${{ inputs.devshell }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cfb712..0839f08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,18 +39,26 @@ jobs: with: persist-credentials: false - - name: Set up Nix devshell - id: devshell - background: true - uses: $/.github/actions/prepare-nix - with: - devshell: .#ci - - name: Install Rust (${{ matrix.toolchain.name }}) + id: rust + background: true uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 with: toolchain: ${{ matrix.toolchain.version }} + - name: Install Nix + uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + + - name: Enter Nix devshell + id: devshell + background: true + uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 + with: + arguments: .#ci + + - name: Wait for Rust + wait: rust + - name: Install cargo-nextest uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 57fecd1..7227af2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,18 +21,26 @@ jobs: with: persist-credentials: false - - name: Set up Nix devshell - id: devshell - background: true - uses: $/.github/actions/prepare-nix - with: - devshell: .#ci - - name: Install Rust + id: rust + background: true uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 with: components: llvm-tools-preview + - name: Install Nix + uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 + + - name: Enter Nix devshell + id: devshell + background: true + uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 + with: + arguments: .#ci + + - name: Wait for Rust + wait: rust + - name: Install cargo-llvm-cov uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20 with: From 6ee23c34cc4ae4e932d78bb2e0de3c617abde443 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 8 Oct 2026 04:49:29 +0300 Subject: [PATCH 5/5] ci: correct MSRV v0.1.3 pin --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0839f08..6a26fbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ concurrency: jobs: read_msrv: name: Read MSRV - uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@d3d2883c667da4f83d8af52be9f236ea3fcdd82c # main + uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@983d9d27da8fe8aaa47732160b7a14805004d4b2 # v0.1.3 test: needs: read_msrv