forked from 1dot13/source
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.19 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
on:
push:
tags:
- 'v*'
pull_request:
env:
LANGUAGES: [Chinese, German, English, French, Polish, Italian, Dutch, Russian]
GAMEDIR_REPOSITORY: '1dot13/gamedir'
GAMEDIR_LANGUAGES_REPOSITORY: '1dot13/gamedir-languages'
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}
LTO_OPTION: ${{ env.IS_RELEASE == 'true' && 'ON' || 'OFF' }}
jobs:
compile:
runs-on: windows-latest
steps:
- name: Debug
shell: bash
run: |
echo $IS_RELEASE
echo $LANGUAGES
echo $GAMEDIR_REPOSITORY
echo $GAMEDIR_LANGUAGES_REPOSITORY
echo $GITHUB_REPOSITORY
- name: Checkout source
uses: actions/checkout@v4
- name: Prepare build properties
shell: bash
run: |
set -eux
touch CMakePresets.json
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x86
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Configure build
run: |
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLTO_OPTION=$LTO_OPTION
- name: Build
run: |
cmake --build build/ -- -n