Skip to content

Commit

Permalink
Install cargo-udeps and cargo-hack as binaries.
Browse files Browse the repository at this point in the history
Speeds up the CI as then we don't have to wait for them to compile.
  • Loading branch information
thejpster committed Jul 18, 2024
1 parent a09724f commit 93ae71f
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ jobs:
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build rp2040-hal's workspace (without the examples)
run: cargo hack build --optional-deps --each-feature
- run: cargo clean
Expand All @@ -28,10 +26,8 @@ jobs:
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Test
run: cargo hack test -p rp2040-hal --target x86_64-unknown-linux-gnu --optional-deps --each-feature --tests --features critical-section-impl
- name: Test docs
Expand All @@ -52,19 +48,15 @@ jobs:
toolchain: nightly-2024-01-30
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Install cargo-udeps
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-udeps
version: "=0.1.45"
run: |
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
- name: Check unused deps
run: cargo hack udeps --optional-deps --each-feature
msrv:
name: Verifiy build on MSRV
name: Verify build on MSRV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand All @@ -73,11 +65,9 @@ jobs:
toolchain: 1.75
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Use older version of regex
run: cargo update -p regex --precise 1.9.3
- name: Verifiy MSRV
- name: Verify MSRV
run: cargo hack build --examples --optional-deps --each-feature

0 comments on commit 93ae71f

Please sign in to comment.