mirror of
https://github.com/wez/wezterm.git
synced 2024-12-27 15:37:29 +03:00
Ci toolchain: Do not use actions-rs/toolchain (#3327)
* fix(generate-workflows): Do not use actions-rs [actions-rs/toolchain](https://github.com/actions-rs/toolchain) is unsupported: - Has not recieved updates since November 2020 (~2.5 years) - It uses Node.js 12 and GitHub will stop supporting it Summer this year(?) see this [article](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/). [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) is actively supported and its mostly a 1-1 replacement, the differences are: - Uses the minimal profile always, so no need to specify it. - There is no need to override the toolchain. I also removed some things: - None of the generated actions use `rustfmt` so I removed the component - The toolchain is always stable, so I specified it in the action itself instead of in the action parameters. * ci: Regenerate workflows * fix: Remove ALLOW_UNSECURE_COMMANDS from action * fix(CentOS7): Manually install rustup as CentOS7 uses a very old curl * fix: Restart shell so that the rustup command is available * feat: Add exeption to the CentOS workflow to download rustup * fix: Remove actions-rs/toolchain from remaining workflows * fix: Address review comment
This commit is contained in:
parent
2e488d57c7
commit
1535d88290
7
.github/workflows/fmt.yml
vendored
7
.github/workflows/fmt.yml
vendored
@ -21,14 +21,9 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "nightly"
|
||||
override: true
|
||||
components: rustfmt
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: Build
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
|
9
.github/workflows/gen_alpine3.15.yml
vendored
9
.github/workflows/gen_alpine3.15.yml
vendored
@ -56,14 +56,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -59,14 +59,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_alpine3.15_tag.yml
vendored
9
.github/workflows/gen_alpine3.15_tag.yml
vendored
@ -39,14 +39,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
23
.github/workflows/gen_centos7.yml
vendored
23
.github/workflows/gen_centos7.yml
vendored
@ -67,15 +67,20 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rustup"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
if ! command -v rustup &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 --retry 10 -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
- name: "Setup Toolchain"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
rustup toolchain install stable --profile minimal --no-self-update
|
||||
rustup default stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
23
.github/workflows/gen_centos7_continuous.yml
vendored
23
.github/workflows/gen_centos7_continuous.yml
vendored
@ -71,15 +71,20 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rustup"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
if ! command -v rustup &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 --retry 10 -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
- name: "Setup Toolchain"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
rustup toolchain install stable --profile minimal --no-self-update
|
||||
rustup default stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
23
.github/workflows/gen_centos7_tag.yml
vendored
23
.github/workflows/gen_centos7_tag.yml
vendored
@ -50,15 +50,20 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rustup"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
if ! command -v rustup &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 --retry 10 -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
- name: "Setup Toolchain"
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
rustup toolchain install stable --profile minimal --no-self-update
|
||||
rustup default stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos8.yml
vendored
9
.github/workflows/gen_centos8.yml
vendored
@ -54,14 +54,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos8_continuous.yml
vendored
9
.github/workflows/gen_centos8_continuous.yml
vendored
@ -58,14 +58,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos8_tag.yml
vendored
9
.github/workflows/gen_centos8_tag.yml
vendored
@ -37,14 +37,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos9.yml
vendored
9
.github/workflows/gen_centos9.yml
vendored
@ -54,14 +54,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos9_continuous.yml
vendored
9
.github/workflows/gen_centos9_continuous.yml
vendored
@ -58,14 +58,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_centos9_tag.yml
vendored
9
.github/workflows/gen_centos9_tag.yml
vendored
@ -37,14 +37,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_debian10.3.yml
vendored
9
.github/workflows/gen_debian10.3.yml
vendored
@ -57,14 +57,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -61,14 +61,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_debian10.3_tag.yml
vendored
9
.github/workflows/gen_debian10.3_tag.yml
vendored
@ -40,14 +40,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_debian11.yml
vendored
9
.github/workflows/gen_debian11.yml
vendored
@ -57,14 +57,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -61,14 +61,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_debian11_tag.yml
vendored
9
.github/workflows/gen_debian11_tag.yml
vendored
@ -40,14 +40,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora35.yml
vendored
9
.github/workflows/gen_fedora35.yml
vendored
@ -51,14 +51,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -55,14 +55,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora35_tag.yml
vendored
9
.github/workflows/gen_fedora35_tag.yml
vendored
@ -34,14 +34,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora36.yml
vendored
9
.github/workflows/gen_fedora36.yml
vendored
@ -51,14 +51,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -55,14 +55,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora36_tag.yml
vendored
9
.github/workflows/gen_fedora36_tag.yml
vendored
@ -34,14 +34,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora37.yml
vendored
9
.github/workflows/gen_fedora37.yml
vendored
@ -51,14 +51,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -55,14 +55,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_fedora37_tag.yml
vendored
9
.github/workflows/gen_fedora37_tag.yml
vendored
@ -34,14 +34,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_macos.yml
vendored
9
.github/workflows/gen_macos.yml
vendored
@ -30,14 +30,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: "rustup target add aarch64-apple-darwin"
|
||||
|
9
.github/workflows/gen_macos_continuous.yml
vendored
9
.github/workflows/gen_macos_continuous.yml
vendored
@ -33,14 +33,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: "rustup target add aarch64-apple-darwin"
|
||||
|
9
.github/workflows/gen_macos_tag.yml
vendored
9
.github/workflows/gen_macos_tag.yml
vendored
@ -18,14 +18,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: "rustup target add aarch64-apple-darwin"
|
||||
|
9
.github/workflows/gen_opensuse_leap.yml
vendored
9
.github/workflows/gen_opensuse_leap.yml
vendored
@ -54,14 +54,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -58,14 +58,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_opensuse_leap_tag.yml
vendored
9
.github/workflows/gen_opensuse_leap_tag.yml
vendored
@ -37,14 +37,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -57,14 +57,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -61,14 +61,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -40,14 +40,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_ubuntu20.04.yml
vendored
9
.github/workflows/gen_ubuntu20.04.yml
vendored
@ -62,14 +62,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -66,14 +66,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_ubuntu20.04_tag.yml
vendored
9
.github/workflows/gen_ubuntu20.04_tag.yml
vendored
@ -42,14 +42,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_ubuntu22.04.yml
vendored
9
.github/workflows/gen_ubuntu22.04.yml
vendored
@ -57,14 +57,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -61,14 +61,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
9
.github/workflows/gen_ubuntu22.04_tag.yml
vendored
9
.github/workflows/gen_ubuntu22.04_tag.yml
vendored
@ -40,14 +40,7 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
8
.github/workflows/gen_windows.yml
vendored
8
.github/workflows/gen_windows.yml
vendored
@ -26,15 +26,9 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
target: "x86_64-pc-windows-msvc"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
8
.github/workflows/gen_windows_continuous.yml
vendored
8
.github/workflows/gen_windows_continuous.yml
vendored
@ -30,15 +30,9 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
target: "x86_64-pc-windows-msvc"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
8
.github/workflows/gen_windows_tag.yml
vendored
8
.github/workflows/gen_windows_tag.yml
vendored
@ -16,15 +16,9 @@ jobs:
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
target: "x86_64-pc-windows-msvc"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
10
.github/workflows/pages.yml
vendored
10
.github/workflows/pages.yml
vendored
@ -32,15 +32,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
default: true
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install gelatyx
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
|
16
.github/workflows/termwiz.yml
vendored
16
.github/workflows/termwiz.yml
vendored
@ -31,13 +31,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
@ -50,13 +44,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "nightly"
|
||||
override: true
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
- name: "Cache cargo"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
8
.github/workflows/verify-pages.yml
vendored
8
.github/workflows/verify-pages.yml
vendored
@ -20,13 +20,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install gelatyx
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
|
16
.github/workflows/wezterm_ssh.yml
vendored
16
.github/workflows/wezterm_ssh.yml
vendored
@ -29,13 +29,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
@ -47,13 +41,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
|
@ -325,25 +325,41 @@ ln -s /usr/local/git/bin/git /usr/local/bin/git""",
|
||||
|
||||
return steps
|
||||
|
||||
def install_rust(self, cache=True):
|
||||
def install_rust(self, cache=True, toolchain="stable"):
|
||||
salt = "2"
|
||||
key_prefix = f"{self.name}-{self.rust_target}-{salt}-${{{{ runner.os }}}}-${{{{ hashFiles('**/Cargo.lock') }}}}"
|
||||
params = {
|
||||
"profile": "minimal",
|
||||
"toolchain": "stable",
|
||||
"override": True,
|
||||
"components": "rustfmt",
|
||||
}
|
||||
params = dict()
|
||||
if self.rust_target:
|
||||
params["target"] = self.rust_target
|
||||
steps = [
|
||||
ActionStep(
|
||||
name="Install Rust",
|
||||
action="actions-rs/toolchain@v1",
|
||||
params=params,
|
||||
env={"ACTIONS_ALLOW_UNSECURE_COMMANDS": "true"},
|
||||
),
|
||||
]
|
||||
steps = []
|
||||
# Manually setup rust toolchain in CentOS7 curl is too old for the action
|
||||
if "centos7" in self.name:
|
||||
steps += [
|
||||
RunStep(
|
||||
name="Install Rustup",
|
||||
run = """
|
||||
if ! command -v rustup &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 --retry 10 -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
"""
|
||||
),
|
||||
RunStep(
|
||||
name="Setup Toolchain",
|
||||
run =f"""
|
||||
rustup toolchain install {toolchain} --profile minimal --no-self-update
|
||||
rustup default {toolchain}
|
||||
"""
|
||||
),
|
||||
]
|
||||
else:
|
||||
steps += [
|
||||
ActionStep(
|
||||
name="Install Rust",
|
||||
action=f"dtolnay/rust-toolchain@{toolchain}",
|
||||
params=params,
|
||||
),
|
||||
]
|
||||
if "macos" in self.name:
|
||||
steps += [
|
||||
RunStep(
|
||||
|
Loading…
Reference in New Issue
Block a user