Skip to content

Commit ccf2d44

Browse files
committed
Fix nix CI job
- Use `env` command to set rustflags, otherwise nix develops tries to run RUSTFLAGS=... as a command. - Replace no longer necessary cancel-workflow-action with concurrency group.
1 parent 4959ccc commit ccf2d44

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/build_nix.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- cron: '0 0 * * 1'
66
workflow_dispatch:
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
build:
1014
strategy:
@@ -21,11 +25,6 @@ jobs:
2125
timeout-minutes: 60
2226
if: ${{ github.actor != 'dependabot[bot]' }}
2327
steps:
24-
- uses: styfle/[email protected]
25-
name: Cancel Outdated Builds
26-
with:
27-
all_but_latest: true
28-
access_token: ${{ github.token }}
2928

3029
- name: Install Nix
3130
uses: cachix/install-nix-action@v26
@@ -39,12 +38,12 @@ jobs:
3938
4039
- name: Build
4140
run: |
42-
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --release --features="logging-utils"
41+
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --release --features="logging-utils"
4342
4443
- name: Test
4544
run: |
46-
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --release --features="logging-utils"
45+
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --release --features="logging-utils"
4746
4847
- name: Lint
4948
run: |
50-
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo clippy --all-targets --workspace --release --bins --tests --examples --features="logging-utils" -- -D warnings
49+
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo clippy --all-targets --workspace --release --bins --tests --examples --features="logging-utils" -- -D warnings

0 commit comments

Comments
 (0)