Skip to content

Commit 79f9ec0

Browse files
committed
Don't set CARGO=cross too early
Because `cargo` can also use this environment variable.
1 parent fbafff3 commit 79f9ec0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
runs-on: ${{ matrix.os }}
123123

124124
env:
125-
CARGO: ${{ matrix.cargo }}
125+
CARGO: cargo # Sometimes changes to `cross` later (such as when building linux-arm).
126126
TARGET_FLAGS: --target=${{ matrix.target }}
127127
TARGET_DIR: ./target/${{ matrix.target }}
128128
RUST_BACKTRACE: 1 # Emit backtraces on panics.
@@ -144,9 +144,11 @@ jobs:
144144
toolchain: ${{ matrix.rust }}
145145
targets: ${{ matrix.target }}
146146

147-
- name: Install Cross
147+
- name: Use Cross
148148
if: matrix.cargo == 'cross'
149-
run: cargo install cross
149+
run: |
150+
cargo install cross
151+
echo 'CARGO=cross' >> "$GITHUB_ENV"
150152
151153
- name: Show command used for Cargo
152154
run: |

0 commit comments

Comments
 (0)