Install Rust directly in Apple workflow
This commit is contained in:
parent
28fd58b009
commit
6fcd7ff6ed
1 changed files with 24 additions and 4 deletions
|
|
@ -63,10 +63,30 @@ jobs:
|
||||||
DEVELOPER_DIR="$selected" /usr/bin/xcodebuild -version || true
|
DEVELOPER_DIR="$selected" /usr/bin/xcodebuild -version || true
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
toolchain: 1.85.0
|
set -euo pipefail
|
||||||
targets: ${{ matrix.rust-targets }}
|
export RUSTUP_HOME="${HOME}/.rustup"
|
||||||
|
export CARGO_HOME="${HOME}/.cargo"
|
||||||
|
|
||||||
|
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
|
||||||
|
else
|
||||||
|
rustup set profile minimal
|
||||||
|
rustup toolchain install 1.85.0
|
||||||
|
rustup default 1.85.0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${CARGO_HOME}/bin" >> "${GITHUB_PATH}"
|
||||||
|
. "${CARGO_HOME}/env"
|
||||||
|
|
||||||
|
targets='${{ matrix.rust-targets }}'
|
||||||
|
for target in ${targets//,/ }; do
|
||||||
|
rustup target add "${target}"
|
||||||
|
done
|
||||||
|
|
||||||
|
rustc --version
|
||||||
|
cargo --version
|
||||||
|
|
||||||
- name: Install Protobuf
|
- name: Install Protobuf
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue