Skip to content

Commit

Permalink
Stop using actions-rs in CI
Browse files Browse the repository at this point in the history
The actions-rs org has been archived and not using it is simpler in most
cases.
  • Loading branch information
bjorn3 committed Oct 8, 2024
1 parent 8cb08c6 commit 90ad87d
Showing 1 changed file with 54 additions and 101 deletions.
155 changes: 54 additions & 101 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup override set stable
rustup update stable
- name: set up docker buildx
run: docker buildx create --name builder --use
Expand Down Expand Up @@ -62,10 +61,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup override set stable
rustup update stable
- name: set up docker buildx
run: docker buildx create --name builder --use
Expand Down Expand Up @@ -108,10 +106,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup override set stable
rustup update stable
- name: set up docker buildx
run: docker buildx create --name builder --use
Expand Down Expand Up @@ -157,10 +154,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup override set stable
rustup update stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -189,11 +185,10 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: llvm-tools
run: |
rustup override set stable
rustup update stable
rustup components add llvm-tools
- name: Add cargo-llvm-cov
uses: taiki-e/install-action@v2
Expand All @@ -212,16 +207,10 @@ jobs:
shared-key: "stable"

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features --release
run: cargo build --workspace --all-targets --all-features --release

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: --workspace --all-features --all-targets --release --lcov --output-path lcov.info
run: cargo llvm-cov --workspace --all-features --all-targets --release --lcov --output-path lcov.info

- name: Upload code coverage
uses: codecov/codecov-action@v3
Expand All @@ -238,11 +227,9 @@ jobs:
run: echo "NIGHTLY_VERSION=$(curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustc)" >> $GITHUB_ENV

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-${{ env.NIGHTLY_VERSION }}
override: true
run: |
rustup set profile minimal
rustup override set nightly-${{ env.NIGHTLY_VERSION }}
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -256,22 +243,13 @@ jobs:
shared-key: "nightly"

- name: Update to minimal direct dependencies
uses: actions-rs/cargo@v1
with:
command: update
args: -Zdirect-minimal-versions
run: cargo update -Zdirect-minimal-versions

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features --release
run: cargo build --workspace --all-targets --all-features --release

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --all-targets --release
run: cargo test --workspace --all-features --all-targets --release

build-and-test-msrv:
runs-on: ubuntu-latest
Expand All @@ -280,10 +258,8 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: "1.70"
override: true
run: |
rustup override set 1.70
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -297,16 +273,10 @@ jobs:
shared-key: "msrv"

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features --release
run: cargo build --workspace --all-targets --all-features --release

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --all-targets --release
run: cargo test --workspace --all-features --all-targets --release

miri:
needs: build-and-test
Expand All @@ -319,12 +289,10 @@ jobs:
run: echo "NIGHTLY_VERSION=$(curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-${{ env.NIGHTLY_VERSION }}
override: true
components: miri
run: |
rustup set profile minimal
rustup override set nightly-${{ env.NIGHTLY_VERSION }}
rustup component add miri
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -338,10 +306,7 @@ jobs:
shared-key: miri

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: miri
args: test --workspace --all-features miri
run: cargo miri test --workspace --all-features miri

format:
runs-on: ubuntu-latest
Expand All @@ -351,23 +316,19 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
run: |
rustup set profile minimal
rustup override set stable
rustup update stable
rustup component add rustfmt
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "stable"

- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

clippy:
needs: format
Expand All @@ -378,12 +339,11 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
run: |
rustup set profile minimal
rustup override set stable
rustup update stable
rustup component add clippy
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -408,11 +368,10 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
run: |
rustup set profile minimal
rustup override set stable
rustup update stable
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -426,10 +385,7 @@ jobs:
shared-key: "stable"

- name: Build docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items --all-features
run: cargo doc --no-deps --document-private-items --all-features

audit:
needs: clippy
Expand All @@ -438,11 +394,10 @@ jobs:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
run: |
rustup set profile minimal
rustup override set stable
rustup update stable
- name: Install cargo-audit
uses: taiki-e/install-action@v2
Expand All @@ -455,6 +410,4 @@ jobs:
shared-key: "audit"

- name: Run audit
uses: actions-rs/cargo@v1
with:
command: audit
run: cargo audit

0 comments on commit 90ad87d

Please sign in to comment.