-
-
Notifications
You must be signed in to change notification settings - Fork 123
252 lines (217 loc) · 7.34 KB
/
nuget.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
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
name: NuGet Release
on:
push:
branches:
- master
- 2.6.x
workflow_dispatch: {}
concurrency:
group: nuget-${{github.ref}}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
windows:
name: Windows VS2022
runs-on: windows-2022
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build x86
shell: pwsh
run: |
cd CSFML/tools/nuget
./build.win.ps1 "win-x86"
- name: Build x64
shell: pwsh
run: |
cd CSFML/tools/nuget
./build.win.ps1 "win-x64"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-win-x86-x64
path: CSFML/tools/nuget/CSFML/runtimes
linux-x64:
name: Linux x64
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-x64.sh
./docker.linux-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-x64
path: CSFML/tools/nuget/CSFML/runtimes
linux-arm:
name: Linux ARM
runs-on: ubuntu-22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build in an ARM container
uses: uraimo/[email protected]
with:
arch: armv7
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}/CSFML:/CSFML"
install: |
apt-get update -y
apt-get install -y git libfreetype6-dev xorg-dev libxrandr-dev libxcursor-dev libudev-dev libgl1-mesa-dev libflac-dev libogg-dev libvorbis-dev libopenal-dev cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm
path: CSFML/tools/nuget/CSFML/runtimes
linux-arm64:
name: Linux ARM64
runs-on: ubuntu-22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build in an ARM64 container
uses: uraimo/[email protected]
with:
arch: aarch64
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}/CSFML:/CSFML"
install: |
apt-get update -y
apt-get install -y git libfreetype6-dev xorg-dev libxrandr-dev libxcursor-dev libudev-dev libgl1-mesa-dev libflac-dev libogg-dev libvorbis-dev libopenal-dev cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm64
path: CSFML/tools/nuget/CSFML/runtimes
linux-musl-x64:
name: Linux MUSL x64
runs-on: ubuntu-22.04
container:
image: alpine:3.15
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: sh
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-musl-x64.sh
./docker.linux-musl-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-musl-x64
path: CSFML/tools/nuget/CSFML/runtimes
fedora-x64:
name: Fedora x64
runs-on: ubuntu-22.04
container:
image: fedora:37
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.fedora-x64.sh
./docker.fedora-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-fedora-x64
path: CSFML/tools/nuget/CSFML/runtimes
macos:
name: macOS
runs-on: macos-14
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Install necessary tooling
run: brew install coreutils
- name: Build x64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-x64"
- name: Build ARM64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-arm64"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-macOS-x64-arm64
path: CSFML/tools/nuget/CSFML/runtimes
package:
name: Package Builds
runs-on: ubuntu-22.04
needs:
- windows
- linux-x64
- linux-arm
- linux-arm64
- linux-musl-x64
- fedora-x64
- macos
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: CSFML/tools/nuget/CSFML/runtimes
merge-multiple: true
- name: Setup .NET 8 SDK
id: setup-dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Build NuGet Package
run: |
cd CSFML/tools/nuget
dotnet build --configuration Release --verbosity detailed
- name: Upload NuGet Package
uses: actions/upload-artifact@v4
with:
name: CSFML-NuGet-Package
path: CSFML/tools/nuget/CSFML/bin/Release/*.nupkg