mirror of
https://github.com/dnlbauer/WHAM.git
synced 2026-09-10 22:25:31 +00:00
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: Cargo Build and Test
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: WHAM Test
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
- run: cargo build --verbose
|
|
- run: cargo test --verbose
|
|
|
|
publish:
|
|
name: WHAM Publish
|
|
runs-on: ubuntu-latest
|
|
needs: [build_and_test]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
- uses: katyo/publish-crates@v2
|
|
with:
|
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
ignore-unpublished-changes: true
|
|
dry-run: ${{ github.event_name != 'push' }}
|
|
|