Skip to content

Commit

Permalink
ci: Try to use build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimhotepus committed May 24, 2024
1 parent ddf194d commit 608f21e
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build

on:
Expand All @@ -12,16 +7,7 @@ on:
branches: [ "master" ]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: hl2.sln

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

# Build architecture
BUILD_PLATFORM: x86
SOLUTION_FILE_PATH: .

permissions:
contents: read
Expand All @@ -30,10 +16,14 @@ jobs:
build:
name: Build Half-Life 2
runs-on: windows-latest
strategy:
matrix:
platform: [x86]
configuration: [Debug, Release]

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -44,6 +34,6 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
run: .\create_hl2_dev.bat

- name: Build the app
- name: Build app
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m -verbosity:detailed /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}}
run: msbuild /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} ${{env.SOLUTION_FILE_PATH}}

0 comments on commit 608f21e

Please sign in to comment.