Skip to content

Commit 9ee80f3

Browse files
committed
Use a matrix in github actions
1 parent 8f7a79c commit 9ee80f3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/build-everything.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ env:
1919
jobs:
2020
build_everything:
2121
runs-on: windows-latest
22+
strategy:
23+
matrix:
24+
targetbits: ["x32", "x64"]
25+
targetos: ["linux", "windows"]
2226

2327
steps:
2428
- name: Prepare env
@@ -44,25 +48,21 @@ jobs:
4448
- name: Install Rust toolchains
4549
working-directory: ./srcwrtimer_sample_extension
4650
run: |
47-
cargo make rustup-linux
48-
cargo make rustup-msvc
51+
cargo make --profile ${{ matrix.targetbits }} rustup-${{ matrix.targetos }}
4952
- name: Clone alliedmodders repositories
5053
run: cargo make clone-alliedmodders
5154
working-directory: ./srcwrtimer_sample_extension
5255
- name: Setup SourcePawn Compiler
5356
uses: rumblefrog/[email protected]
5457
with:
55-
version: '1.12.7187' ### UPDATE Makefile.toml whenever this is updated.
58+
version: '1.12.7193' ### UPDATE Makefile.toml whenever this is updated.
5659
- name: Setup Zig
5760
uses: mlugg/setup-zig@v1
5861
with:
5962
version: '0.13.0' ### UPDATE Makefile.toml whenever this is updated.
60-
- name: Build extensions for Linux
63+
- name: Build extensions
6164
working-directory: ./srcwrtimer_sample_extension
62-
run: cargo make linux
63-
- name: Build extensions for Windows/MSVC
64-
working-directory: ./srcwrtimer_sample_extension
65-
run: cargo make msvc
65+
run: cargo make --profile ${{ matrix.targetbits }} ${{ matrix.targetos }}
6666
- name: Copy things to _package
6767
working-directory: ./srcwrtimer_sample_extension
6868
run: |
@@ -74,5 +74,5 @@ jobs:
7474
- name: Upload package
7575
uses: actions/upload-artifact@v4
7676
with:
77-
name: sample-${{ github.head_ref || github.ref_name }}-${{ env.GITHUB_SHA_SHORT }}
77+
name: sample-${{ github.head_ref || github.ref_name }}-${{ env.GITHUB_SHA_SHORT }}-${{ matrix.targetos }}-${{ matrix.targetbits }}
7878
path: srcwrtimer_sample_extension/_package/srcwrtimer

0 commit comments

Comments
 (0)