forked from QW-Group/ezquake-source
-
Notifications
You must be signed in to change notification settings - Fork 1
200 lines (169 loc) · 5.63 KB
/
build-targets.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: build targets
on: [push, pull_request, workflow_dispatch]
jobs:
cmake-windows-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configurePreset: [ninja-msvc-x64, msbuild-x64]
include:
- configurePreset: ninja-msvc-x64
buildPreset: ninja-msvc-x64-release
should_upload: true
- configurePreset: msbuild-x64
buildPreset: msbuild-x64-release
should_upload: false
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true
- name: Fetch cmake & ninja
uses: lukka/get-cmake@latest
- name: Bootstrap VCPKG
uses: lukka/run-vcpkg@v11
- name: Build
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.configurePreset }}
buildPreset: ${{ matrix.buildPreset }}
- name: Archive client
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.configurePreset }}
path: "cmake-build-presets/${{ matrix.configurePreset }}/Release/ezquake.exe"
compression-level: 9
if: ${{ matrix.should_upload }}
cmake-macos-build:
runs-on: macos-13
strategy:
matrix:
arch: [x64, arm64]
variant: [release]
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true
- name: Install build system dependencies
run: brew install autoconf automake libtool
- uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
- name: Run CMake
uses: lukka/run-cmake@v10
with:
configurePreset: "xcode-${{ matrix.arch }}-${{ matrix.variant }}-ci"
buildPreset: "xcode-${{ matrix.arch }}-${{ matrix.variant }}-ci"
- name: Prepare upload
run: zip -r ../../../ezQuake.zip ezQuake.app
working-directory: "cmake-build-presets/xcode-${{ matrix.arch }}-${{ matrix.variant }}-ci/${{ matrix.variant }}"
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: "ezQuake-macOS-${{ matrix.arch }}"
path: ezQuake.zip
compression-level: 9
cmake-macos-universal:
needs: cmake-macos-build
runs-on: macos-13
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Download Intel Build
uses: actions/download-artifact@v4
with:
name: "ezQuake-macOS-x64"
path: artifacts/x64
- name: Download ARM64 Build
uses: actions/download-artifact@v4
with:
name: "ezQuake-macOS-arm64"
path: artifacts/arm64
- name: Create Universal Binary
run: |
(cd artifacts/x64 && unzip -qq ezQuake.zip) && (cd artifacts/arm64 && unzip -qq ezQuake.zip)
cp -r artifacts/arm64/ezQuake.app .
lipo -create -output ezQuake.app/Contents/MacOS/ezQuake \
artifacts/x64/ezQuake.app/Contents/MacOS/ezQuake \
artifacts/arm64/ezQuake.app/Contents/MacOS/ezQuake
codesign --force --sign - --entitlements misc/install/ezquake.entitlements.plist --options runtime --timestamp ezQuake.app
zip -r ezQuake.zip ezQuake.app
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: "ezQuake-macOS-universal-sandboxed"
path: ezQuake.zip
compression-level: 9
cmake-linux-build:
runs-on: ubuntu-latest
strategy:
matrix:
configurePreset: [ninja-mingw64-i686-cross, ninja-mingw64-x64-cross]
include:
- configurePreset: ninja-mingw64-i686-cross
buildPreset: ninja-mingw64-i686-cross
packages: "wine gcc-mingw-w64-i686"
should_upload: true
- configurePreset: ninja-mingw64-x64-cross
buildPreset: ninja-mingw64-x64-cross-release
packages: "wine g++-mingw-w64-x86-64"
should_upload: false
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true
- name: Install build dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq ${{ matrix.packages }}
- uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
- name: Run CMake
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.configurePreset }}
buildPreset: ${{ matrix.buildPreset }}
- name: Prepare upload
run: zip -r ../../../ezQuake.zip ezQuake.app
working-directory: cmake-build-presets/${{ matrix.buildPreset }}/Release/ezquake.exe
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildPreset }}
path: ezQuake.zip
compression-level: 9
linux-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [linux-x86_64]
include:
- target: linux-x86_64
platform: x86_64
container:
image: debian:testing
options: --privileged
steps:
- name: Install dependencies
run: apt-get -qy update && apt-get -qy install curl file libfuse2 git make sudo git
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: git config --global --add safe.directory $PWD && ./misc/appimage/appimage-manual_creation.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}-AppImage
path: ezQuake-${{ matrix.platform }}.AppImage
compression-level: 9