Skip to content

Commit

Permalink
chore: ci upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Aug 4, 2023
1 parent a473e45 commit 0b1f4df
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 167 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Run Audit-Check
uses: rustsec/[email protected]
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Override rust-toolchain.toml
run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

Expand Down
34 changes: 30 additions & 4 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ concurrency:

jobs:
run-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
# minimum version
- 1.67
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -30,6 +31,12 @@ jobs:
# https://github.com/Swatinem/rust-cache
- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: check-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand Down Expand Up @@ -57,7 +64,7 @@ jobs:

# Audit licenses, unreleased crates, and unexpected duplicate versions.
- name: Check Bans, Licenses, and Sources
if: ${{ matrix.rust-toolchain == 'stable' }}
if: ${{ matrix.rust-toolchain == 'stable' }} && ${{ matrix.os == 'ubuntu-latest' }}
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
Expand All @@ -68,13 +75,14 @@ jobs:
run: cargo build --release

run-tests-all-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Setup IPFS
uses: ibnesayeed/setup-ipfs@master
Expand All @@ -86,6 +94,12 @@ jobs:

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: test-all-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand All @@ -106,19 +120,26 @@ jobs:
run: cargo test --doc

run-tests-no-default-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: test-0-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand Down Expand Up @@ -146,6 +167,11 @@ jobs:

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
shared-key: doc

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
Loading

0 comments on commit 0b1f4df

Please sign in to comment.