Fix Mixed configuration work #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build engine' | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/**' | |
- 'gamedata/**' | |
- 'sdk/**' | |
- 'src/**' | |
- '*.sln' | |
- '*.props' | |
- '*.targets' | |
- '*.ltx' | |
- '*.bat' | |
pull_request: | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/**' | |
- 'gamedata/**' | |
- 'sdk/**' | |
- 'src/**' | |
- '*.sln' | |
- '*.props' | |
- '*.targets' | |
- '*.ltx' | |
- '*.bat' | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
build-engine: | |
name: 'Build' | |
strategy: | |
matrix: | |
system: | |
- windows-2022 | |
config: | |
- Debug | |
- Mixed | |
- Release | |
- Debug_Dedicated | |
- Mixed_Dedicated | |
- Release_Dedicated | |
platform: | |
- x86 | |
runs-on: ${{ matrix.system }} | |
env: | |
solution_name: XRay.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup NuGet | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: '>=5' | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
${{ github.workspace }}/packages | |
key: | | |
${{ runner.os }}-nuget-${{ hashFiles('**/*.nupkg') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
nuget restore $env:solution_name | |
- name: Get dependencies | |
run: | | |
${{ github.workspace }}/get-dependencies.bat | |
- name: Setup MSBuild | |
uses: microsoft/[email protected] | |
- name: Build solution | |
run: | | |
msbuild $env:solution_name ` | |
-p:Configuration=${{ matrix.config }} ` | |
-p:Platform=${{ matrix.platform }} ` | |
-maxCpuCount ` | |
-nologo | |
- name: Cleanup | |
run: | | |
${{ github.workspace }}/delete-symbols.bat | |
- name: Upload binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bin (${{ matrix.config }}) ${{ github.sha }} | |
path: bin/ | |
- name: Upload libraries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lib (${{ matrix.config }}) ${{ github.sha }} | |
path: lib/ |