ci: update GitHub CI to remove deprecated/unmaintained actions and commands (#846)

* ci: update rust-cache to 2.0.1

* ci: update dtolnay/rust-toolchain to ba37adf

* ci: update skip-duplicate-actions to v5.2.0

* ci: update ClementTsang/cargo-action to v0.0.3

* ci: update to macos-12

* ci: update ghaction-chocolatey to 2.1.0

* ci: update upload-artifact to v3.1.0

* ci: change from actions-rs to rustsec for audit-check

* ci: stop using actions-rs for builds

* ci: update cirrus to use tlsv1.2 when curling

* ci: disable macOS ARM workflows on GHA since its built on Cirrus
This commit is contained in:
Clement Tsang 2022-10-20 06:24:04 -04:00 committed by GitHub
parent 8043a72029
commit fc90c549ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 52 deletions

View File

@ -17,7 +17,7 @@ task:
- env:
FEATURES: "--no-default-features"
setup_script:
- curl https://sh.rustup.rs -sSf --output rustup.sh
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
- sh rustup.sh --default-toolchain stable -y
- . $HOME/.cargo/env
- rustc --version
@ -54,7 +54,7 @@ task:
- env:
FEATURES: "--no-default-features"
setup_script:
- curl https://sh.rustup.rs -sSf --output rustup.sh
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
- sh rustup.sh --default-toolchain stable -y
- source $HOME/.cargo/env
- rustc --version

View File

@ -13,10 +13,10 @@ jobs:
uses: actions/checkout@v3
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
@ -24,6 +24,6 @@ jobs:
run: |
cargo install cargo-audit --locked
- uses: actions-rs/audit-check@35b7b53b1e25b55642157ac01b4adceb5b9ebef3 # 1.2.0
- uses: rustsec/audit-check@bb800784d9c5b0afa352b75dae201bf2e438960a # https://github.com/rustsec/audit-check/commit/bb800784d9c5b0afa352b75dae201bf2e438960a
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -66,7 +66,7 @@ jobs:
}
# macOS (x64)
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false }
# Windows (x64, x86)
- {
@ -107,9 +107,6 @@ jobs:
target: "riscv64gc-unknown-linux-gnu",
cross: true,
}
# macOS ARM
- { os: "macOS-latest", target: "aarch64-apple-darwin", cross: true }
steps:
- name: Checkout repository
uses: actions/checkout@v3
@ -118,26 +115,26 @@ jobs:
- name: Set up Rust toolchain
if: matrix.info.container == ''
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
target: ${{ matrix.info.target }}
- name: Set up Rust toolchain (non-GitHub container)
if: matrix.info.container != ''
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
with:
profile: minimal
toolchain: stable
target: ${{ matrix.info.target }}
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
with:
key: ${{ matrix.info.target }}
- name: Build
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: build
args: --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
@ -189,7 +186,7 @@ jobs:
mv manpage.tar.gz release/
- name: Save release as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
retention-days: 3
name: release
@ -217,18 +214,18 @@ jobs:
run: Install-WindowsFeature Net-Framework-Core
- name: Install wixtoolset
uses: crazy-max/ghaction-chocolatey@87d06bbbd2cfb1835f1820042d356aef4875fb5f # 1.6.0
uses: crazy-max/ghaction-chocolatey@90deb87d9fbf0bb2f022b91e3bf11b4441cddda5 # 2.1.0
with:
args: install -y wixtoolset
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
target: x86_64-pc-windows-msvc
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
with:
key: x86_64-pc-windows-msvc-msi
@ -246,7 +243,7 @@ jobs:
mv bottom_x86_64_installer.msi release/
- name: Save release as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
retention-days: 3
name: release
@ -279,16 +276,16 @@ jobs:
fetch-depth: 1
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
- name: Build
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: build
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
@ -336,7 +333,7 @@ jobs:
mv bottom_${{ matrix.info.target }}.deb release/
- name: Save release as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
retention-days: 3
name: release

View File

@ -42,7 +42,7 @@ jobs:
target: "aarch64-unknown-linux-gnu",
cross: true,
}
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false }
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
@ -52,7 +52,7 @@ jobs:
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
@ -65,7 +65,7 @@ jobs:
- name: Set up Rust toolchain
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
components: rustfmt, clippy
@ -73,7 +73,7 @@ jobs:
- name: Enable Rust cache
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
- name: Check cargo fmt
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
@ -81,7 +81,7 @@ jobs:
- name: Build tests
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: test
args: --no-run --locked ${{ matrix.features }} --target=${{ matrix.info.target }}
@ -92,7 +92,7 @@ jobs:
- name: Run tests
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: test
args: --no-fail-fast ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet
@ -103,7 +103,7 @@ jobs:
- name: Run clippy
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: clippy
args: ${{ matrix.features }} --all-targets --workspace --target=${{ matrix.info.target }} -- -D warnings
@ -160,7 +160,7 @@ jobs:
rust: beta,
}
- {
os: "macOS-latest",
os: "macos-12",
target: "x86_64-apple-darwin",
cross: false,
rust: beta,
@ -204,18 +204,10 @@ jobs:
rust: stable,
}
# macOS ARM
- {
os: "macOS-latest",
target: "aarch64-apple-darwin",
cross: true,
rust: stable,
}
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
@ -228,20 +220,20 @@ jobs:
- name: Set up Rust toolchain
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: ${{ matrix.info.rust }}
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
with:
key: ${{ matrix.info.target }}
- name: Check
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: ClementTsang/cargo-action@v0.0.2
uses: ClementTsang/cargo-action@v0.0.3
with:
command: check
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked

View File

@ -19,7 +19,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "false"
@ -35,12 +35,12 @@ jobs:
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@88e7c2e1da2693cf72d58fce9416206818e61dea # https://github.com/dtolnay/rust-toolchain/commit/88e7c2e1da2693cf72d58fce9416206818e61dea
uses: dtolnay/rust-toolchain@ba37adf8f94a7d9affce79bd3baff1b9e3189c33 # https://github.com/dtolnay/rust-toolchain/commit/ba37adf8f94a7d9affce79bd3baff1b9e3189c33
with:
toolchain: stable
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # 2.0.1
- name: Install cargo-llvm-cov
run: |

View File

@ -41,7 +41,7 @@ jobs:
run: echo "${{ env.VERSION }}" > release-version
- name: Upload release-version as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
retention-days: 3
name: release-version
@ -94,7 +94,7 @@ jobs:
mv choco.zip release/
- name: Save release as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
retention-days: 3
name: release

View File

@ -10,7 +10,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
with:
skip_after_successful_duplicate: "true"
paths: '["docs/**", ".github/workflows/docs.yml"]'