From f4fe2ea2274881e0f82a17734f28478201e2c099 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 14 Jul 2022 20:24:38 +0100 Subject: [PATCH 1/3] Remove deprecate action https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed. --- .github/workflows/ci.yaml | 21 ++------------------- .github/workflows/metrics.yaml | 7 +------ .github/workflows/publish.yml | 10 ++-------- .github/workflows/release.yaml | 17 +---------------- .github/workflows/rustdoc.yaml | 7 +------ 5 files changed, 7 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ba4f07d4a7..c8b18d16506 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,21 +37,8 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 20 - # We need to disable the existing toolchain to avoid updating rust-docs - # which takes a long time. The fastest way to do this is to rename the - # existing folder, as deleting it takes about as much time as not doing - # anything and just updating rust-docs. - - name: Rename existing rust toolchain (Windows) - if: matrix.os == 'windows-latest' - run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: rustfmt, rust-src + run: rustup update stable && rustup component add rustfmt rust-src - name: Cache Dependencies uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 @@ -79,11 +66,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + run: rustup update stable - name: Install Rust targets run: rustup target add ${{ env.targets }} ${{ env.targets_ide }} diff --git a/.github/workflows/metrics.yaml b/.github/workflows/metrics.yaml index af6c6107847..c43690c4f8c 100644 --- a/.github/workflows/metrics.yaml +++ b/.github/workflows/metrics.yaml @@ -20,12 +20,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: rust-src + run: rustup update stable && rustup component add rustfmt rust-src - name: Collect metrics run: cargo xtask metrics diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e4892dccf45..7020726165b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,16 +20,10 @@ jobs: fetch-depth: 0 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + run: rustup update stable - name: Install cargo-workspaces - uses: actions-rs/install@v0.1 - with: - crate: cargo-workspaces + run: cargo install cargo-workspaces - name: Release env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9205d86f93d..cb4d220fcc4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,22 +64,7 @@ jobs: run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - profile: minimal - override: true - - - name: Install Rust library source - if: matrix.target == 'x86_64-unknown-linux-gnu' - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - profile: minimal - override: true - components: rust-src + run: rustup update stable && rustup target add ${{ matrix.target }} && rustup component add rust-src - name: Install Node.js uses: actions/setup-node@v1 diff --git a/.github/workflows/rustdoc.yaml b/.github/workflows/rustdoc.yaml index 227fab54ebb..5ed4e8ca64f 100644 --- a/.github/workflows/rustdoc.yaml +++ b/.github/workflows/rustdoc.yaml @@ -20,12 +20,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: rustfmt, rust-src + run: rustup update stable - name: Build Documentation run: cargo doc --all --no-deps From 248fa55fc7130198a8f529137736173aa13437ce Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 14 Jul 2022 20:56:37 +0100 Subject: [PATCH 2/3] Update .github/workflows/release.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurențiu Nicola --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cb4d220fcc4..9b9a7414370 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,7 +64,7 @@ jobs: run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old - name: Install Rust toolchain - run: rustup update stable && rustup target add ${{ matrix.target }} && rustup component add rust-src + run: rustup update stable && rustup target add ${{ matrix.target }} && rustup component add rust-src - name: Install Node.js uses: actions/setup-node@v1 From b49f2a2b4392e8cf1044355a33b20a07d6123187 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 14 Jul 2022 20:24:38 +0100 Subject: [PATCH 3/3] Remove deprecate action https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed. --- .github/workflows/ci.yaml | 11 ++++++----- .github/workflows/metrics.yaml | 4 +++- .github/workflows/release.yaml | 13 ++++--------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c8b18d16506..35407060952 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,9 @@ jobs: fetch-depth: 20 - name: Install Rust toolchain - run: rustup update stable && rustup component add rustfmt rust-src + run: | + rustup update stable + rustup component add rustfmt rust-src - name: Cache Dependencies uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 @@ -66,10 +68,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - run: rustup update stable - - - name: Install Rust targets - run: rustup target add ${{ env.targets }} ${{ env.targets_ide }} + run: | + rustup update stable + rustup target add ${{ env.targets }} ${{ env.targets_ide }} - name: Cache Dependencies uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 diff --git a/.github/workflows/metrics.yaml b/.github/workflows/metrics.yaml index c43690c4f8c..1407bd8f68e 100644 --- a/.github/workflows/metrics.yaml +++ b/.github/workflows/metrics.yaml @@ -20,7 +20,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - run: rustup update stable && rustup component add rustfmt rust-src + run: | + rustup update stable + rustup component add rustfmt rust-src - name: Collect metrics run: cargo xtask metrics diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9b9a7414370..cb47d3973ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,16 +55,11 @@ jobs: with: fetch-depth: ${{ env.FETCH_DEPTH }} - # We need to disable the existing toolchain to avoid updating rust-docs - # which takes a long time. The fastest way to do this is to rename the - # existing folder, as deleting it takes about as much time as not doing - # anything and just updating rust-docs. - - name: Rename existing Rust toolchain - if: matrix.os == 'windows-latest' - run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old - - name: Install Rust toolchain - run: rustup update stable && rustup target add ${{ matrix.target }} && rustup component add rust-src + run: | + rustup update stable + rustup target add ${{ matrix.target }} + rustup component add rust-src - name: Install Node.js uses: actions/setup-node@v1