Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Oct 20, 2022
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ 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

- name: Install cargo-audit
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 }}
39 changes: 18 additions & 21 deletions .github/workflows/build_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
- {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand All @@ -65,23 +65,23 @@ 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
target: ${{ matrix.info.target }}

- 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' }}
run: cargo fmt --all -- --check

- 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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
rust: beta,
}
- {
os: "macOS-latest",
os: "macos-12",
target: "x86_64-apple-darwin",
cross: false,
rust: beta,
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'
Expand Down