Skip to content

Commit

Permalink
ci(release): fix macos nydusd rust target
Browse files Browse the repository at this point in the history
Can not use `declare -A` in macos shell.

Signed-off-by: killagu <[email protected]>
  • Loading branch information
killagu authored and jiangliu committed Jun 16, 2023
1 parent 9d89b8d commit 3b71868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ jobs:
key: ${{ runner.os }}-cargo-${{ matrix.arch }}
- name: build
run: |
declare -A rust_target_map=( ["amd64"]="x86_64-apple-darwin" ["arm64"]="aarch64-apple-darwin")
RUST_TARGET=${rust_target_map[${{ matrix.arch }}]}
if [[ "${{matrix.arch}}" == "amd64" ]]; then
RUST_TARGET="x86_64-apple-darwin"
else
RUST_TARGET="aarch64-apple-darwin"
fi
cargo install --version 0.2.4 cross
rustup target add ${RUST_TARGET}
rustup component add rustfmt clippy
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b71868

Please sign in to comment.