summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhspetersson <jhspetersson@gmail.com>2024-01-05 20:11:23 +0100
committerjhspetersson <jhspetersson@gmail.com>2024-01-05 20:11:23 +0100
commita3401f20c7839fe5ad7133265b47d3eb55c8a18b (patch)
treed0e127abe6264449c05fd8b4050d1ce0d2c695ea
parent611bcaa6f03686db4c10f27f1909503530179c27 (diff)
optimize GitHub Actions build workflow
-rw-r--r--.github/workflows/rust.yml45
1 files changed, 5 insertions, 40 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 9a78534..7fe2980 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -21,7 +21,10 @@ env:
jobs:
build:
- runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
+ runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
@@ -37,42 +40,4 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Run tests
- run: cargo test --verbose
-
- windows-build:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/cache@v3
- id: cache-deps-windows
- with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- - name: Build
- run: cargo build --verbose
- - name: Run tests
- run: cargo test --verbose
-
- macos-build:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/cache@v3
- id: cache-deps-macos
- with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- - name: Build
- run: cargo build --verbose
- - name: Run tests
- run: cargo test --verbose
+ run: cargo test --verbose \ No newline at end of file