-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaction.yml
More file actions
36 lines (30 loc) · 963 Bytes
/
action.yml
File metadata and controls
36 lines (30 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: setup-rust
description: Sets up a Rust build environment.
inputs:
# TODO(ver): CI should validate at this version matches that in the Dockerfile
version:
description: Container image version
default: 1.90.0
components:
description: Rust components to install
default: ''
runs:
using: composite
steps:
- shell: bash
run: |
rm -rf "$HOME/.cargo"
curl --proto '=https' --tlsv1.3 -sSfLv 'https://sh.rustup.rs' | sh -s -- -y --default-toolchain '${{ inputs.version }}'
source ~/.cargo/env
(
echo PATH="$PATH"
echo CARGO_INCREMENTAL=0
echo CARGO_NET_RETRY=10
echo RUST_BACKTRACE=short
echo RUSTUP_MAX_RETRIES=10
) >> "$GITHUB_ENV"
- shell: bash
run: curl --tlsv1.2 -sSfL https://apt.llvm.org/llvm.sh | sudo bash -s 19
- if: inputs.components
shell: bash
run: rustup component add ${{ inputs.components }}