-
-
Notifications
You must be signed in to change notification settings - Fork 469
Expand file tree
/
Copy pathaction.yml
More file actions
57 lines (48 loc) · 1.72 KB
/
action.yml
File metadata and controls
57 lines (48 loc) · 1.72 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Setup Rust Environment
description: Sets up the Rust environment for the CI workflow and optionally installs nightly
# ---------- new section ----------
inputs:
use_nightly:
description: "If true, install the Rust nightly toolchain instead of stable"
required: false
default: "false"
# ---------------------------------
runs:
using: composite
steps:
- name: Uninstall all currently installed Rust
shell: bash
run: |
sudo apt purge -y 'cargo*' 'rust*'
- name: Install and cache deps
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
curl lsb-release wget software-properties-common gnupg shellcheck pax-utils \
libsqlite3-dev libpixman-1-dev libc6-dev gcc g++ build-essential libglib2.0-dev
# ---------- toolchain selection ----------
- name: Install Rust (stable)
if: ${{ inputs.use_nightly == 'false' }}
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install Rust (nightly)
if: ${{ inputs.use_nightly == 'true' }}
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
# -----------------------------------------
- name: Install just
uses: extractions/setup-just@v3
- uses: taiki-e/install-action@cargo-hack
- name: Install LLVM
shell: bash
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ env.MAIN_LLVM_VERSION }} all
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.MAIN_LLVM_VERSION }} 200
- name: Symlink headers
shell: bash
run: sudo ln -s /usr/include/asm-generic /usr/include/asm