Skip to content

Commit 8f43a92

Browse files
committed
Set $TARGET_FLAGS and $TARGET_DIR from matrix
Since they are produced via `${{ }}` interpolation using values from the matrix. Matrix values cannot be formed from job-level `env`, but job-level `env` can be formed form matrix values, as this does.
1 parent cb10aae commit 8f43a92

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ jobs:
119119
# For some builds, we use cross to test on 32-bit, and maybe later big-endian, systems.
120120
CARGO: cargo
121121
# Whether CARGO is `cargo` or `cross`, TARGET_FLAGS will be set to `--target matrix.target`.
122-
TARGET_FLAGS: ''
122+
TARGET_FLAGS: --target=${{ matrix.target }}
123123
# Whether CARGO is `cargo` or `cross`, TARGET_DIR will include matrix.target.
124-
TARGET_DIR: ./target
124+
TARGET_DIR: ./target/${{ matrix.target }}
125125
# Emit backtraces on panics.
126126
RUST_BACKTRACE: 1
127127

@@ -148,11 +148,6 @@ jobs:
148148
cargo install cross
149149
echo 'CARGO=cross' >> "$GITHUB_ENV"
150150
151-
- name: Set target variables
152-
run: |
153-
echo 'TARGET_FLAGS=--target ${{ matrix.target }}' >> "$GITHUB_ENV"
154-
echo 'TARGET_DIR=./target/${{ matrix.target }}' >> "$GITHUB_ENV"
155-
156151
- name: Show command used for Cargo
157152
run: |
158153
echo 'cargo command is: ${{ env.CARGO }}'

0 commit comments

Comments
 (0)