Skip to content

Commit

Permalink
Simplify build job definitions with a build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and soc committed Apr 3, 2023
1 parent 89c135e commit e99c8fc
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,20 @@ on:

env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUST_BACKTRACE: full

jobs:
build-and-test-on-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Test
run: RUST_BACKTRACE=full cargo test --verbose -- --nocapture
build-and-test-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Test
run: $env:RUST_BACKTRACE="full"; cargo test --verbose -- --nocapture
build-and-test-on-macos:
runs-on: macos-latest
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Test
run: RUST_BACKTRACE=full cargo test --verbose -- --nocapture
run: cargo test --verbose -- --nocapture

0 comments on commit e99c8fc

Please sign in to comment.