-
Notifications
You must be signed in to change notification settings - Fork 353
209 lines (176 loc) · 5.93 KB
/
Copy pathbuild.yml
File metadata and controls
209 lines (176 loc) · 5.93 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
name: Build
on:
push:
paths-ignore:
- '*.md'
- '*LICENSE'
pull_request:
env:
# SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
jobs:
build-linux:
name: Build Linux (${{matrix.name}})
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
include:
- name: GCC x86_64
runner: [self-hosted, Linux]
preset: gcc
artifact_arch: x86_64
# - name: GCC aarch64
# runner: ubuntu-24.04-arm
# preset: gcc
# artifact_arch: aarch64
# - name: Clang x86_64
# runner: ubuntu-latest
# preset: clang
# artifact_arch: x86_64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
if: 'false' # disabled for self-hosted
run: |
sudo apt-get update
sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev \
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \
libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \
libxss-dev libfuse2 libusb-1.0-0-dev libdecor-0-dev libpipewire-0.3-dev libunwind-dev
- name: Setup sccache
if: 'false' # disabled for self-hosted
uses: mozilla-actions/sccache-action@v0.0.9
- name: Print sccache stats
run: sccache --show-stats
- name: Configure CMake
run: cmake --preset x-linux-ci-${{matrix.preset}}
- name: Build
run: cmake --build --preset x-linux-ci-${{matrix.preset}}
- name: Generate AppImage
run: ci/build-appimage.sh
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}}
path: |
build/install/Dusk-*.AppImage
build/install/debug.tar.*
build-apple:
name: Build Apple (${{matrix.name}})
if: 'false' # TODO enable when CI is free
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- name: AppleClang macOS universal
platform: macos
preset: x-macos-ci
artifact_name: macos-appleclang-universal
- name: AppleClang iOS arm64
platform: ios
preset: x-ios-ci
artifact_name: ios-appleclang-arm64
- name: AppleClang tvOS arm64
platform: tvos
preset: x-tvos-ci
artifact_name: tvos-appleclang-arm64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Update Homebrew
if: matrix.platform == 'tvos'
run: |
brew update
brew upgrade --formula
- name: Install dependencies
run: brew install cmake ninja
- name: Install markupsafe
if: matrix.platform == 'tvos'
run: pip3 install --break-system-packages markupsafe
- name: Install Rust iOS target
if: matrix.platform == 'ios'
run: rustup target add aarch64-apple-ios
- name: Install Rust tvOS target
if: matrix.platform == 'tvos'
run: |
rustup toolchain install nightly
rustup target add --toolchain nightly aarch64-apple-tvos
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Configure CMake
run: cmake --preset ${{matrix.preset}}
- name: Build
run: cmake --build --preset ${{matrix.preset}}
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-${{matrix.artifact_name}}
path: |
build/install/Dusk.app
build/install/debug.tar.*
build-windows:
name: Build Windows (${{matrix.name}})
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
include:
- name: MSVC x86_64
runner: [self-hosted, Windows]
preset: msvc
msvc_arch: amd64
vcpkg_arch: x64
artifact_arch: x86_64
# - name: MSVC arm64
# runner: windows-11-arm
# preset: arm64-msvc
# msvc_arch: arm64
# vcpkg_arch: arm64
# artifact_arch: arm64
# - name: Clang x86_64
# runner: windows-latest
# preset: clang
# msvc_arch: amd64
# vcpkg_arch: x64
# artifact_arch: x86_64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Enable Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.msvc_arch}}
# msvc-dev-cmd sets VCPKG_ROOT, set it back
- name: Override VCPKG_ROOT
run: echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install dependencies
if: 'false' # disabled for self-hosted
run: |
choco install ninja
vcpkg install freetype:${{matrix.vcpkg_arch}}-windows-static zstd:${{matrix.vcpkg_arch}}-windows-static
- name: Configure CMake
run: cmake --preset x-windows-ci-${{matrix.preset}}
- name: Build
run: cmake --build --preset x-windows-ci-${{matrix.preset}}
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}}
path: |
build/install/*.exe
build/install/*.dll
build/install/res/
build/install/debug.7z