-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.75 KB
/
build.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PREMAKE_VERSION: "5.0.0-beta2"
jobs:
build:
name: Build binaries
runs-on: windows-2022
strategy:
matrix:
configuration:
- debug
- release
compiler:
- msvc
- clang
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@main
- name: Install Premake5
uses: diamante0018/setup-premake@master
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files (clang)
if: matrix.compiler == 'clang'
run: premake5 --cc=${{matrix.compiler}} vs2022
- name: Generate project files (msvc)
if: matrix.compiler == 'msvc'
run: premake5 vs2022
- name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master
- name: Build ${{matrix.configuration}} binaries
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=Win32 build/mw3-server-freezer.sln
- name: Upload ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
with:
name: windows-${{matrix.compiler}}-${{matrix.configuration}}
path: |
build/bin/Win32/${{matrix.configuration}}/mw3-server-freezer.dll
build/bin/Win32/${{matrix.configuration}}/mw3-server-freezer.pdb