-
Notifications
You must be signed in to change notification settings - Fork 273
111 lines (96 loc) · 3.05 KB
/
msvc-full-features-cmake.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Cataclysm Windows build (CMake + MSVC)
on:
push:
branches:
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
- 'scripts/**'
pull_request:
branches:
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
- 'scripts/**'
# We only care about the latest revision, so cancel previous instances.
concurrency:
group: msvc-cmake-build-${{ github.ref_name }}
cancel-in-progress: true
env:
# There's not enough disk space to build both release and debug versions of
# our dependencies, so we hack the triplet file to build only release versions
# Have to use github.workspace because runner namespace isn't available yet.
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
ZSTD_CLEVEL: 17
CMAKE_PRESET: windows-tiles-sounds-x64-msvc
jobs:
build_catatclysm:
name: Build
runs-on: windows-2019
if: github.event.pull_request.draft == false
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Remove Strawberry Perl from PATH
run: |
echo $env:PATH
echo =========================
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
$env:PATH = $env:PATH -replace "C:\\Strawberry\\perl\\site\\bin;", ""
$env:PATH = $env:PATH -replace "C:\\Strawberry\\perl\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
echo =========================
echo $env:PATH
- name: Install stable CMake
uses: lukka/get-cmake@latest
- name: Install vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: "66444e13a86da7087ee24c342f91801cc6eb9877"
- name: Integrate vcpkg
run: |
vcpkg integrate install
- uses: ammaraskar/msvc-problem-matcher@master
- name: Configure
run: |
cmake -DTESTS=ON --preset $env:CMAKE_PRESET
- uses: ammaraskar/msvc-problem-matcher@master
- name: Build
run: |
cmake --build out/build/$env:CMAKE_PRESET --config RelWithDebInfo
- name: Dump logs if build failed
if: failure()
run: |
echo =================================================
Get-ChildItem "${{ runner.workspace }}/Cataclysm-BN/out/build/$env:CMAKE_PRESET" -Recurse
echo =================================================
- name: Compile .mo files for localization
run: |
cmake --build out/build/$env:CMAKE_PRESET --target translations_compile --config RelWithDebInfo
- name: Run tests
run: |
.\RelWithDebInfo\cata_test-tiles.exe --rng-seed time