forked from ValveSoftware/source-sdk-2013
-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (42 loc) · 1.66 KB
/
Copy pathpull-request.yml
File metadata and controls
50 lines (42 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Test PRs
on:
pull_request:
paths:
- '.github/workflows/pull-request.yml'
- 'src/**'
jobs:
windows:
strategy:
matrix:
arch: ['x64', 'x86']
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Set up registry for VPC
run: reg add 'HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}' /v DefaultProjectExtension /t REG_SZ /d vcproj /f /reg:32
- name: Create project files
working-directory: ${{ github.workspace }}/src
run: devtools\bin\vpc.exe /${{ matrix.arch == 'x86' && 'win32' || 'win64' }} /jbmod /define:SOURCESDK +everything /mksln ${{ matrix.arch }}.sln
- name: Build
working-directory: ${{ github.workspace }}/src
run: msbuild /m /p:Configuration=Release ${{ matrix.arch }}.sln
linux:
strategy:
matrix:
arch: ['x64', 'x86']
runs-on: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
steps:
- uses: actions/checkout@v6
- name: Create project files
working-directory: ${{ github.workspace }}/src
run: |
VPC_NINJA_BUILD_MODE=Release devtools/bin/vpc /${{ matrix.arch == 'x86' && 'linux32' || 'linux64' }} /jbmod /ninja /define:SOURCESDK +everything /mksln _vpc_/ninja/${{ matrix.arch }}
if [ "${{ matrix.arch }}" = "x86" ]; then
sed -i 's/i386-linux/i686-linux/g' _vpc_/ninja/${{ matrix.arch }}.ninja
fi
- name: Build
working-directory: ${{ github.workspace }}/src
run: ninja -f "_vpc_/ninja/${{ matrix.arch }}.ninja" -j$(nproc)