-
-
Notifications
You must be signed in to change notification settings - Fork 125
356 lines (301 loc) · 13 KB
/
release.yml
File metadata and controls
356 lines (301 loc) · 13 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
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
name: Release Builds
on:
push:
branches:
- master
- 2.6.x
tags:
- "**"
workflow_dispatch: {}
concurrency:
group: release-${{github.ref}}
cancel-in-progress: true
env:
SFML_VERSION: 3.0.2
jobs:
windows-x86:
name: Windows x86
runs-on: windows-2025
steps:
- name: Cache MinGW x86
id: mingw-x86-cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/mingw32
key: 15.2.0posix-13.0.0-ucrt-r1-x86
- name: Install MinGW x86
if: steps.mingw-x86-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-32
with:
tag: 15.2.0posix-13.0.0-ucrt-r1
with_clang: false
architecture: 32
destination: ${{ github.workspace }}
add_to_path: false
- name: Checkout SFML
uses: actions/checkout@v6
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v6
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw32\bin" >> $GITHUB_PATH
- name: Generate Import Libs for MinGW
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "CSFML-install\lib\gcc"
New-Item -ItemType "directory" -PATH "CSFML-install\lib\msvc"
Move-Item -Path "CSFML-install\lib\*.lib" -Destination "CSFML-install\lib\msvc"
Push-Location CSFML-install\lib\gcc
& gendef.exe "..\..\bin\csfml-graphics-3.dll"
& dlltool.exe -d "csfml-graphics-3.def" -D "..\..\bin\csfml-graphics-3.dll" -l "libcsfml-graphics.a"
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: CSFML-windows-32-bit
path: install/CSFML
windows-x64:
name: Windows x64
runs-on: windows-2025
steps:
- name: Cache MinGW x64
id: mingw-x64-cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/mingw64
key: 15.2.0posix-13.0.0-ucrt-r1-x64
- name: Install MinGW x64
if: steps.mingw-x64-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-64
with:
tag: 15.2.0posix-13.0.0-ucrt-r1
with_clang: false
architecture: 64
destination: ${{ github.workspace }}
add_to_path: false
- name: Checkout SFML
uses: actions/checkout@v6
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v6
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw64\bin" >> $GITHUB_PATH
- name: Generate Import Libs for MinGW
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "CSFML-install\lib\gcc"
New-Item -ItemType "directory" -PATH "CSFML-install\lib\msvc"
Move-Item -Path "CSFML-install\lib\*.lib" -Destination "CSFML-install\lib\msvc"
Push-Location CSFML-install\lib\gcc
& gendef.exe "..\..\bin\csfml-graphics-3.dll"
& dlltool.exe -d "csfml-graphics-3.def" -D "..\..\bin\csfml-graphics-3.dll" -l "libcsfml-graphics.a"
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: CSFML-windows-64-bit
path: install/CSFML
windows-arm64:
name: Windows ARM64
runs-on: windows-2025
steps:
- name: Checkout SFML
uses: actions/checkout@v6
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v6
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Move Files
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: CSFML-windows-arm64
path: install/CSFML
macos-x64:
name: macOS x64
runs-on: macos-15
steps:
- name: Checkout SFML
uses: actions/checkout@v6
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v6
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DSFML_BUILD_FRAMEWORKS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DSFML_ROOT=${{ github.workspace }}/SFML-install \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Create Archive
run: |
mkdir CSFML-macOS-clang-64-bit
cp -R CSFML-install/include CSFML-macOS-clang-64-bit
cp -R CSFML-install/lib CSFML-macOS-clang-64-bit
cp CSFML-install/share/CSFML/* CSFML-macOS-clang-64-bit
tar -zcvf CSFML-macOS-clang-64-bit.tar.gz CSFML-macOS-clang-64-bit
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: CSFML-macOS-clang-64-bit
path: CSFML-macOS-clang-64-bit.tar.gz
macos-arm64:
name: macOS ARM64
runs-on: macos-15
steps:
- name: Checkout SFML
uses: actions/checkout@v6
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v6
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DSFML_BUILD_FRAMEWORKS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DSFML_ROOT=${{ github.workspace }}/SFML-install \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Create Archive
run: |
mkdir CSFML-macOS-clang-arm64
cp -R CSFML-install/include CSFML-macOS-clang-arm64
cp -R CSFML-install/lib CSFML-macOS-clang-arm64
cp CSFML-install/share/CSFML/* CSFML-macOS-clang-arm64
tar -zcvf CSFML-macOS-clang-arm64.tar.gz CSFML-macOS-clang-arm64
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: CSFML-macOS-clang-arm64
path: CSFML-macOS-clang-arm64.tar.gz