Skip to content

Commit 8c87d0f

Browse files
committed
Added Debug/Release build matrix to Linux/Windows workflows
1 parent da16939 commit 8c87d0f

2 files changed

Lines changed: 16 additions & 21 deletions

File tree

.github/workflows/linux.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ on:
1111
env:
1212
# Path to the solution file relative to the root of the project.
1313
SOLUTION_FILE_PATH: ./
14-
15-
# Configuration type to build.
16-
# You can convert this to a build matrix if you need coverage of multiple configuration types.
17-
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
18-
BUILD_CONFIGURATION: release
1914
BUILD_PLATFORM: x64
2015

2116
jobs:
2217
build:
23-
name: Linux Clang Build
18+
name: ${{ matrix.configuration }} (${{ env.BUILD_PLATFORM }})
2419
runs-on: ubuntu-latest
2520
if: github.event.pull_request.draft == false
21+
22+
strategy:
23+
matrix:
24+
configuration: [Debug, Release]
2625

2726
steps:
2827
- uses: actions/checkout@v5
@@ -36,6 +35,4 @@ jobs:
3635

3736
- name: Build
3837
working-directory: ${{env.GITHUB_WORKSPACE}}
39-
# Add additional options to the MSBuild command line here (like platform or verbosity level).
40-
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
41-
run: make -j$(nproc) config=${{env.BUILD_CONFIGURATION}}_${{env.BUILD_PLATFORM}}
38+
run: make -j$(nproc) config=${{ lower(matrix.configuration) }}_${{env.BUILD_PLATFORM}}

.github/workflows/windows.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,28 @@ on:
1111
env:
1212
# Path to the solution file relative to the root of the project.
1313
SOLUTION_FILE_PATH: .\
14-
15-
# Configuration type to build.
16-
# You can convert this to a build matrix if you need coverage of multiple configuration types.
17-
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
18-
BUILD_CONFIGURATION: Release
14+
BUILD_PLATFORM: x64
1915

2016
jobs:
2117
build:
22-
name: Windows MSVC Build
18+
name: ${{ matrix.configuration }} (${{ env.BUILD_PLATFORM }})
2319
runs-on: windows-latest
2420
if: github.event.pull_request.draft == false
21+
22+
strategy:
23+
matrix:
24+
configuration: [Debug, Release]
2525

2626
steps:
2727
- uses: actions/checkout@v5
2828

29+
- name: Add MSBuild to PATH
30+
uses: microsoft/setup-msbuild@v2
31+
2932
- name: Generate premake5 solution
3033
working-directory: ${{env.SOLUTION_FILE_PATH}}
3134
run: .\gen_proj.bat
3235

33-
- name: Add MSBuild to PATH
34-
uses: microsoft/setup-msbuild@v2
35-
3636
- name: Build
3737
working-directory: ${{env.GITHUB_WORKSPACE}}
38-
# Add additional options to the MSBuild command line here (like platform or verbosity level).
39-
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
40-
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
38+
run: msbuild /m /p:Configuration=${{ matrix.configuration }} ${{env.SOLUTION_FILE_PATH}} /p:Platform=${{env.BUILD_PLATFORM}}

0 commit comments

Comments
 (0)