@@ -54,14 +54,12 @@ jobs:
5454 submodules : recursive
5555
5656 - name : Configure build
57- working-directory : ${{ env.GITHUB_WORKSPACE }}
5857 run : |
5958 pip install requests
6059
6160 cmake . --preset ${{ matrix.preset }} -G Ninja
6261
6362 - name : Build
64- working-directory : ${{ env.GITHUB_WORKSPACE }}
6563 run : cmake --build out/build/${{ matrix.preset }} --target install
6664
6765 - name : Prepare Release Zip (dev ci)
@@ -82,87 +80,50 @@ jobs:
8280 path : " *.zip"
8381
8482 build-ubuntu :
85- # Require at least 24 for the mingw build
86- runs-on : ubuntu-24.04
83+ runs-on : ubuntu-latest
8784
8885 strategy :
8986 fail-fast : false
9087 matrix :
91- preset :
92- - clang-cross-release
93- - llvm-mingw-release
94- - mingw-release
88+ toolchain :
89+ - preset : clang-cross-release
90+ container : clang-cross
91+ - preset : llvm-mingw-release
92+ container : llvm-mingw
93+ - preset : mingw-release
94+ container : mingw
9595
9696 steps :
97- - name : Setup CMake and Ninja
98- uses : lukka/get-cmake@latest
99-
100- - name : Setup apt packages
101- uses : awalsh128/cache-apt-pkgs-action@latest
102- with :
103- packages : msitools python3-requests
104- version : ${{ runner.os }}-apt
105-
106- - name : Setup LLVM MinGW
107- if : startswith(matrix.preset, 'llvm-mingw')
108- run : |
109- wget -nv ${{ env.LLVM_MINGW_DOWNLOAD }}
110- tar -xf ${{ env.LLVM_MINGW_VERSION }}.tar.xz -C ~/
111- echo $(readlink -f ~/${{ env.LLVM_MINGW_VERSION }}/bin) >> $GITHUB_PATH
112-
113- - name : Setup MinGW
114- if : startswith(matrix.preset, 'mingw')
115- uses : egor-tensin/setup-mingw@v2
116- with :
117- platform : ${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}
118-
119- - name : Setup Clang
120- if : startswith(matrix.preset, 'clang-cross')
121- uses : egor-tensin/setup-clang@v1
122-
123- - name : Restore win sdk cache
124- if : startswith(matrix.preset, 'clang-cross')
125- uses : actions/cache@v4
126- id : cache-win-sdk
127- with :
128- path : ~/win-sdk
129- key : ${{ runner.os }}-win-sdk
130-
131- - name : Setup win sdk
132- if : startswith(matrix.preset, 'clang-cross') && steps.cache-win-sdk.outputs.cache-hit != 'true'
133- run : |
134- git clone https://github.com/mstorsjo/msvc-wine.git
135- msvc-wine/vsdownload.py --accept-license --dest ~/win-sdk Microsoft.VisualStudio.Workload.VCTools
136- msvc-wine/install.sh ~/win-sdk
137- rm -r msvc-wine
138-
13997 - name : Checkout repository and submodules
14098 uses : actions/checkout@v4
14199 with :
142100 submodules : recursive
143101
144- - name : Configure CMake
145- working-directory : ${{ env.GITHUB_WORKSPACE }}
146- # The extra msvc wine arg won't do anything if we're not cross compiling
147- run : >
148- cmake .
149- --preset ${{ matrix.preset }}
150- -G Ninja
151- -DMSVC_WINE_ENV_SCRIPT=$(readlink -f ~)/win-sdk/bin/${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}/msvcenv.sh
152-
153102 - name : Build
154- working-directory : ${{ env.GITHUB_WORKSPACE }}
155- run : cmake --build out/build/${{ matrix.preset }} --target install
156-
157- - name : Prepare Release Zip (dev ci)
158- if : inputs.new-release-tag == ''
159- run : python prepare_release.py ${{ matrix.preset }} --skip-install
103+ uses :
devcontainers/[email protected] 104+ with :
105+ cacheFrom : ghcr.io/bl-sdk/${{ matrix.toolchain.container }}:latest
106+ configFile : .devcontainer/${{ matrix.toolchain.container }}/devcontainer.json
107+ push : never
108+ # The git watcher cmake thinks something's unsafe? Doesn't happen to me locally.
109+ # Only run the prepare release script if doing a dev ci build
110+ runCmd : |
111+ git config --global --add safe.directory `pwd`
112+ git config --global --add safe.directory `pwd`/libs/pluginloader
113+ git config --global --add safe.directory `pwd`/libs/pyunrealsdk
114+ git config --global --add safe.directory `pwd`/libs/pyunrealsdk/libs/unrealsdk
115+
116+ cmake . --preset ${{ matrix.toolchain.preset }} -G Ninja
117+ cmake --build out/build/${{ matrix.toolchain.preset }} --target install
118+
119+ [ ${{ inputs.new-release-tag == '' && 1 || 0 }} -ne 0 ] && \
120+ python prepare_release.py ${{ matrix.toolchain.preset }} --skip-install
160121
161122 - name : Upload Artifact
162123 if : inputs.new-release-tag == ''
163124 uses : actions/upload-artifact@v4
164125 with :
165- name : ${{ matrix.preset }}
126+ name : ${{ matrix.toolchain. preset }}
166127 path : " *.zip"
167128
168129# ==============================================================================
@@ -200,7 +161,6 @@ jobs:
200161 submodules : recursive
201162
202163 - name : Configure CMake
203- working-directory : ${{ env.GITHUB_WORKSPACE }}
204164 run : cmake . --preset ${{ matrix.preset }} -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On
205165
206166 - name : Remove `.modmap`s from compile commands
@@ -211,7 +171,6 @@ jobs:
211171 -Path "out\build\${{ matrix.preset }}\compile_commands.json"
212172
213173 - name : Run clang-tidy
214- working-directory : ${{ env.GITHUB_WORKSPACE }}
215174 run : |
216175 python (Get-Command run-clang-tidy).Source `
217176 -p "out\build\${{ matrix.preset }}" `
@@ -228,7 +187,6 @@ jobs:
228187
229188 steps :
230189 - name : Setup Clang
231- if : startswith(matrix.preset, 'clang')
232190 uses : egor-tensin/setup-clang@v1
233191
234192 - name : Checkout repository
0 commit comments