From 3bf205f0a4469cd01eaf3aa65fbcbca1b8b2072f Mon Sep 17 00:00:00 2001 From: Tim Xylon Date: Sun, 15 Jan 2023 03:18:58 +0800 Subject: [PATCH] Get rid of actions-rs/toolchain Replaces 'actions-rs/toolchain' with bare `rustup` command, since this action haven't been updated in 2 years and `rustup` is included in GitHub Action's runner images. See: https://github.com/actions/runner-images --- .github/workflows/build-and-test.yml | 11 +++--- .github/workflows/build-nightly-release.yml | 37 ++++++++++----------- .github/workflows/build-release.yml | 37 ++++++++++----------- .github/workflows/clippy-check.yml | 12 +++---- 4 files changed, 44 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 390079f3..c17f5546 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,12 +24,11 @@ jobs: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build & Test (Default) run: cargo test --verbose --no-fail-fast - name: Build & Test (Default) - shadowsocks diff --git a/.github/workflows/build-nightly-release.yml b/.github/workflows/build-nightly-release.yml index eb4c3ad8..e50703bb 100644 --- a/.github/workflows/build-nightly-release.yml +++ b/.github/workflows/build-nightly-release.yml @@ -21,13 +21,12 @@ jobs: - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 @@ -82,13 +81,12 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Build release shell: bash @@ -110,12 +108,11 @@ jobs: - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build release run: | diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 1401544e..661b1cf4 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -35,13 +35,12 @@ jobs: - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Install cross run: cargo install cross @@ -96,13 +95,12 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Build release shell: bash @@ -126,12 +124,11 @@ jobs: - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build release run: | diff --git a/.github/workflows/clippy-check.yml b/.github/workflows/clippy-check.yml index 74650b4a..7cbfa370 100644 --- a/.github/workflows/clippy-check.yml +++ b/.github/workflows/clippy-check.yml @@ -24,13 +24,11 @@ jobs: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - components: clippy - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install nightly --component clippy + rustup default nightly + rustup override set nightly - name: Clippy Check uses: actions-rs/clippy-check@v1 with: