Skip to content

Commit

Permalink
ci(fix): don't cache builds
Browse files Browse the repository at this point in the history
caching seems to clash with the weirdness of proc-macro crates

so... here. eat my minutes i guess. but at least it's not python or js ;)
  • Loading branch information
onkoe committed Sep 4, 2024
1 parent ea3ba46 commit 73843ae
Showing 1 changed file with 58 additions and 66 deletions.
124 changes: 58 additions & 66 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,73 +1,65 @@
name: pisserror CI

on:
push:
pull_request:
push:
pull_request:

env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: always

jobs:
run_checks:
name: pisserror
runs-on: ubuntu-22.04
strategy:
matrix:
toolchain:
- stable
- nightly
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo bin
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}

- uses: taiki-e/install-action@v2
with:
tool: cargo-deny,cargo-all-features,cargo-semver-checks

- name: Check semantic versioning adherence # note: this should always work. it's got one line of code...
if: ${{ matrix.toolchain != 'nightly' }}
run: cargo semver-checks

- name: Build
run: cargo build --verbose

- name: Test `pisserror` crate
run: cargo test-all-features

- name: Test `macros` crate
run: cargo test-all-features macros/

- name: Run cargo-deny
run: cargo deny check


run_checks:
name: pisserror
runs-on: ubuntu-22.04
strategy:
matrix:
toolchain:
- stable
- nightly
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo bin
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}

- uses: taiki-e/install-action@v2
with:
tool: cargo-deny,cargo-all-features,cargo-semver-checks

- name: Check semantic versioning adherence # note: this should always work. it's got one line of code...
if: ${{ matrix.toolchain != 'nightly' }}
run: cargo semver-checks

- name: Build
run: cargo build --verbose

- name: Test `pisserror` crate
run: cargo test-all-features

- name: Test `macros` crate
run: cargo test-all-features macros/

- name: Run cargo-deny
run: cargo deny check

0 comments on commit 73843ae

Please sign in to comment.