Skip to content

Commit

Permalink
Repurpose validate action to debug build targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkantor committed Jul 12, 2024
1 parent 9d24af6 commit 39dd4ab
Showing 1 changed file with 15 additions and 52 deletions.
67 changes: 15 additions & 52 deletions .github/workflows/validate-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,60 +10,23 @@ env:
CARGO_TERM_COLOR: always

jobs:

test:
debug-target:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
key: test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ secrets.CI_CACHE_VERSION }}
- run: cargo test
# There is a bug with BSD tar on macOS where the first 8MB of the file are
# sometimes all NUL bytes. See https://github.com/actions/cache/issues/403
# and https://github.com/rust-lang/cargo/issues/8603 for some more
# information. An alternative solution here is to install GNU tar, but
# flushing the disk cache seems to work, too.
- run: sudo purge
if: startsWith(matrix.os, 'macos-')

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
key: lint-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ secrets.CI_CACHE_VERSION }}
- run: cargo clippy -- -D warnings

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo fmt --all -- --check

benchmark:
runs-on: ubuntu-latest
- macos-latest
include:
- os: macos-latest
artifact_prefix: macos-x86-64
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/release
key: benchmark-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ secrets.CI_CACHE_VERSION }}
- run: cargo bench
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/release
key: release-${{ runner.os }}-${{ github.job }}-${{ secrets.CI_CACHE_VERSION }}
- run: cargo build --release --target ${{ matrix.target }}

0 comments on commit 39dd4ab

Please sign in to comment.