@@ -2,27 +2,20 @@ name: Build
22
33on :
44 push :
5- # branches-ignore:
6- # - main
75 paths-ignore :
8- - ' *.json'
96 - ' *.md'
107 - ' *LICENSE'
118 pull_request :
129
1310env :
14- BUILDCACHE_VERSION : v0.27.3
15- BUILDCACHE_ACCURACY : STRICT
16- BUILDCACHE_MAX_CACHE_SIZE : 1073741824 # 1GiB
11+ SCCACHE_GHA_ENABLED : " true"
12+ RUSTC_WRAPPER : " sccache"
1713
1814jobs :
1915 build-linux :
2016 name : Build Linux (${{matrix.name}} x86_64)
2117 runs-on : ubuntu-latest
2218
23- # env:
24- # BUILDCACHE_DIR: ${{github.workspace}}/.buildcache
25-
2619 strategy :
2720 fail-fast : false
2821 matrix :
@@ -40,53 +33,22 @@ jobs:
4033
4134 - name : Install dependencies
4235 run : |
43- wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
44- sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
45- rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
46- sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
47- sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev intel-oneapi-ipp-devel \
36+ sudo apt-get update
37+ sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev \
4838 zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
4939 libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \
5040 libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \
5141 libxss-dev libfuse2
5242
53- # setup buildcache
54- #curl -LSfs https://github.com/encounter/buildcache/releases/download/$BUILDCACHE_VERSION/buildcache-linux.tar.gz | tar xz -C "$RUNNER_WORKSPACE"
55- #echo "$RUNNER_WORKSPACE"/buildcache/bin >> $GITHUB_PATH
56-
57- # free up disk space
58- # https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173
59- echo Before
60- df -h .
61- sudo apt-get clean
62- sudo rm -rf /usr/share/dotnet
63- sudo rm -rf /opt/ghc
64- sudo rm -rf /usr/local/share/boost
65- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
66- echo After
67- df -h .
68-
69- # - name: Restore buildcache
70- # uses: pat-s/always-upload-cache@v3
71- # with:
72- # path: ${{env.BUILDCACHE_DIR}}
73- # key: buildcache-${{runner.os}}-${{matrix.preset}}-${{github.sha}}
74- # restore-keys: |
75- # buildcache-${{runner.os}}-${{matrix.preset}}-
76-
77- - name : Acquire Dawn Deps
78- continue-on-error : true
79- run : cmake --preset x-linux-ci-${{matrix.preset}}
43+ - name : Setup sccache
44+ uses : mozilla-actions/sccache-action@v0.0.9
8045
8146 - name : Configure CMake
8247 run : cmake --preset x-linux-ci-${{matrix.preset}}
8348
8449 - name : Build
8550 run : cmake --build --preset x-linux-ci-${{matrix.preset}}
8651
87- # - name: Print buildcache stats
88- # run: buildcache -s
89-
9052 - name : Generate AppImage
9153 run : ci/build-appimage.sh
9254
@@ -102,10 +64,6 @@ jobs:
10264 name : Build macOS (AppleClang universal)
10365 runs-on : macos-latest
10466
105- env :
106- IPP_VERSION : 2021.2.0.192
107- BUILDCACHE_DIR : ${{github.workspace}}/.buildcache
108-
10967 steps :
11068 - uses : actions/checkout@v6
11169 with :
@@ -119,42 +77,14 @@ jobs:
11977 brew install cmake ninja graphicsmagick imagemagick
12078 pip3 install --break-system-packages markupsafe
12179
122- # setup buildcache
123- curl -LSfs https://github.com/encounter/buildcache/releases/download/$BUILDCACHE_VERSION/buildcache-macos.zip -o /tmp/buildcache-macos.zip
124- unzip /tmp/buildcache-macos.zip -d "$RUNNER_WORKSPACE"
125- echo "$RUNNER_WORKSPACE"/buildcache/bin >> $GITHUB_PATH
126-
127- - name : Install Intel IPP
128- if : ' false' # not supported for universal build
129- run : |
130- NAME="m_ipp_oneapi_p_${IPP_VERSION}_offline"
131- curl -LSfs https://registrationcenter-download.intel.com/akdlm/irc_nas/17606/$NAME.dmg -o /tmp/$NAME.dmg
132- sudo hdiutil attach /tmp/$NAME.dmg -quiet
133- sudo /Volumes/$NAME/bootstrapper.app/Contents/MacOS/install.sh -c --action install --eula accept
134- sudo hdiutil detach /Volumes/$NAME -quiet
135- rm /tmp/$NAME.dmg
136-
137- - name : Restore buildcache
138- uses : pat-s/always-upload-cache@v3
139- with :
140- path : ${{env.BUILDCACHE_DIR}}
141- key : buildcache-${{runner.os}}-universal-${{github.sha}}
142- restore-keys : |
143- buildcache-${{runner.os}}-universal-
144-
145- - name : Acquire Dawn Deps
146- continue-on-error : true
147- run : cmake --preset x-macos-ci
80+ - name : Setup sccache
81+ uses : mozilla-actions/sccache-action@v0.0.9
14882
14983 - name : Configure CMake
15084 run : cmake --preset x-macos-ci
15185
15286 - name : Build
15387 run : cmake --build --preset x-macos-ci
154-
155- - name : Print buildcache stats
156- if : ' false' # temporarily disabled
157- run : buildcache -s
15888
15989 # - name: Import signing certificate
16090 # if: 'false' # temporarily disabled
16494 # certificate-passphrase: ${{secrets.MACOS_CERTIFICATE_PASSWORD}}
16595 # keychain-password: ${{secrets.MACOS_KEYCHAIN_PASSWORD}}
16696
167- - name : Verify CMake version
168- run : cmake --version
169-
17097 - name : Upload artifacts
17198 uses : actions/upload-artifact@v6
17299 with :
@@ -191,19 +118,16 @@ jobs:
191118 brew upgrade --formula
192119 brew install cmake ninja
193120 pip3 install --break-system-packages markupsafe
121+ rustup target add aarch64-apple-ios
194122
195- - name : Verify CMake version
196- run : cmake --version
197-
198- - name : Acquire Dawn Deps
199- continue-on-error : true
200- run : cmake --preset ios-default
123+ - name : Setup sccache
124+ uses : mozilla-actions/sccache-action@v0.0.9
201125
202126 - name : Configure CMake
203- run : cmake --preset ios-default
127+ run : cmake --preset x- ios-ci
204128
205129 - name : Build
206- run : cmake --build --preset ios-default --target install
130+ run : cmake --build --preset x- ios-ci --target install
207131
208132 - name : Upload artifacts
209133 uses : actions/upload-artifact@v6
@@ -229,19 +153,17 @@ jobs:
229153 brew upgrade --formula
230154 brew install cmake ninja
231155 pip3 install --break-system-packages markupsafe
156+ rustup toolchain install nightly
157+ rustup target add --toolchain nightly aarch64-apple-tvos
232158
233- - name : Verify CMake version
234- run : cmake --version
235-
236- - name : Acquire Dawn Deps
237- continue-on-error : true
238- run : cmake --preset tvos-default
159+ - name : Setup sccache
160+ uses : mozilla-actions/sccache-action@v0.0.9
239161
240162 - name : Configure CMake
241- run : cmake --preset tvos-default
163+ run : cmake --preset x- tvos-ci
242164
243165 - name : Build
244- run : cmake --build --preset tvos-default --target install
166+ run : cmake --build --preset x- tvos-ci --target install
245167
246168 - name : Upload artifacts
247169 uses : actions/upload-artifact@v6
@@ -256,7 +178,6 @@ jobs:
256178 runs-on : windows-latest
257179
258180 env :
259- IPP_VERSION : 2021.2.0.210
260181 BUILD_DIR : C:\build
261182
262183 strategy :
@@ -265,43 +186,33 @@ jobs:
265186 include :
266187 - name : MSVC
267188 preset : msvc
268- # - name: Clang
269- # preset: clang
189+ - name : Clang
190+ preset : clang
270191
271192 steps :
272193 - uses : actions/checkout@v6
273194 with :
274195 fetch-depth : 0
275196 submodules : recursive
276197
277- - name : Install Intel IPP
278- if : ' false' # takes >10min, not worth it
279- run : |
280- $TempDir = "$env:RUNNER_WORKSPACE\temp"
281- $Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe"
282- New-Item -Path "$TempDir" -ItemType Directory -ea 0
283- (New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/17739/$Filename", "$TempDir\$Filename")
284- Start-Process "$TempDir\$Filename" -ArgumentList "--x --s --f $TempDir\ipp" -Wait
285- Start-Process "$TempDir\ipp\bootstrapper.exe" -ArgumentList "--eula accept -c --action install" -Wait
286-
287- - name : Install dependencies
288- run : choco install ninja
289-
290198 - name : Enable Visual Studio environment
291199 uses : ilammy/msvc-dev-cmd@v1
292200
201+ # msvc-dev-cmd sets VCPKG_ROOT, set it back
293202 - name : Override VCPKG_ROOT
294203 run : echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV
295204
296- - name : Install vcpkg packages
297- run : vcpkg install zlib:x64-windows-static
205+ - name : Setup sccache
206+ uses : mozilla-actions/sccache-action@v0.0.9
298207
299- - name : Acquire Dawn Deps
300- continue-on-error : true
301- run : cmake --preset x-windows-ci-${{matrix.preset}}
208+ - name : Install dependencies
209+ run : |
210+ choco install ninja
211+ vcpkg install zlib:x64-windows-static bzip2:x64-windows-static zstd:x64-windows-static `
212+ liblzma:x64-windows-static freetype:x64-windows-static
302213
303214 - name : Configure CMake
304- run : cmake --preset x-windows-ci-${{matrix.preset}}
215+ run : cmake --preset x-windows-ci-${{matrix.preset}}
305216
306217 - name : Build
307218 run : cmake --build --preset x-windows-ci-${{matrix.preset}}
0 commit comments