Fix Apple runner toolchain alignment
This commit is contained in:
parent
9fcaf137ac
commit
e0fe21fad8
4 changed files with 41 additions and 19 deletions
|
|
@ -106,25 +106,32 @@ jobs:
|
|||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
export PATH="${CARGO_HOME}/bin:${PATH}"
|
||||
|
||||
if ! command -v rustup >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.85.0
|
||||
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.93.1
|
||||
else
|
||||
rustup set profile minimal
|
||||
rustup toolchain install 1.85.0
|
||||
rustup default 1.85.0
|
||||
rustup toolchain install 1.93.1
|
||||
rustup default 1.93.1
|
||||
fi
|
||||
|
||||
mkdir -p "${CARGO_HOME}/bin"
|
||||
echo "${CARGO_HOME}/bin" >> "${GITHUB_PATH}"
|
||||
export PATH="${CARGO_HOME}/bin:${PATH}"
|
||||
|
||||
rustup show active-toolchain
|
||||
toolchain="$(rustup show active-toolchain | awk '{print $1}')"
|
||||
cargo_bin="$(rustup which --toolchain "${toolchain}" cargo)"
|
||||
rustc_bin="$(rustup which --toolchain "${toolchain}" rustc)"
|
||||
|
||||
targets='${{ matrix.rust-targets }}'
|
||||
for target in ${targets//,/ }; do
|
||||
rustup target add "${target}"
|
||||
rustup target add --toolchain "${toolchain}" "${target}"
|
||||
done
|
||||
|
||||
rustc --version
|
||||
cargo --version
|
||||
"${rustc_bin}" --version
|
||||
"${cargo_bin}" --version
|
||||
|
||||
- name: Install Protobuf
|
||||
shell: bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue