github actions v3-v4 upgrade (#66) #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Linux Build and Test" | |
# Trigger the workflow on push to main or pull request | |
"on": | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rust_build: | |
runs-on: ubuntu-latest | |
env: | |
SCCACHE_GHA_ENABLED: true | |
RUSTC_WRAPPER: sccache | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
with: | |
version: "v0.4.2" | |
- name: "Build the workspace" | |
run: cargo build | |
- name: "Run cargo test" | |
run: cargo test | |
- name: "Build in release mode" | |
run: cargo build --release | |
- name: "Run CLI in debug and release mode" # tests clap, mainly | |
run: | | |
cargo run --release -- --help | |
cargo run -- --help |