Fix target passed to install-action

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-11-05 21:04:28 +11:00 committed by GitHub
parent fa20dfa273
commit 931f258d1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,14 +50,18 @@ runs:
run: echo "tools=$tools,$inputs_tools" >>"$GITHUB_ENV"
shell: bash
- name: Install rust toolchains for local
run: rustup toolchain install stable --no-self-update --profile minimal
shell: bash
- name: Determine native target:
run: |
if [ "$RUNNER_OS" = "Linux" ]; then RUNNER_TARGET=x86_64-unknown-linux-gnu; fi
if [ "$RUNNER_OS" = "macOS" ]; then RUNNER_TARGET=aarch64-apple-darwin; fi
if [ "$RUNNER_OS" = "Windows" ]; then RUNNER_TARGET=x86_64-pc-windows-msvc; fi
echo "RUNNER_TARGET=$RUNNER_TARGET" >>"$GITHUB_ENV"
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: ${{ env.tools }}
CARGO_BUILD_TARGET: ${{ env.RUNNER_TARGET }}
- name: Install rust toolchains
run: just toolchain