@@ -55,14 +55,12 @@ jobs:
5555 submodules : recursive
5656
5757 - name : Configure build
58- working-directory : ${{ env.GITHUB_WORKSPACE }}
5958 run : |
6059 pip install requests
6160
6261 cmake . --preset ${{ matrix.preset }} -G Ninja
6362
6463 - name : Build
65- working-directory : ${{ env.GITHUB_WORKSPACE }}
6664 run : cmake --build out/build/${{ matrix.preset }} --target install
6765
6866 - name : Prepare Release Zip (dev ci)
@@ -84,87 +82,50 @@ jobs:
8482 path : " *.zip"
8583
8684 build-ubuntu :
87- # Require at least 24 for the mingw build
88- runs-on : ubuntu-24.04
85+ runs-on : ubuntu-latest
8986
9087 strategy :
9188 fail-fast : false
9289 matrix :
93- preset :
94- - clang-cross-release
95- - llvm-mingw-release
96- - mingw-release
90+ toolchain :
91+ - preset : clang-cross-release
92+ container : clang-cross
93+ - preset : llvm-mingw-release
94+ container : llvm-mingw
95+ - preset : mingw-release
96+ container : mingw
9797
9898 steps :
99- - name : Setup CMake and Ninja
100- uses : lukka/get-cmake@latest
101-
102- - name : Setup apt packages
103- uses : awalsh128/cache-apt-pkgs-action@latest
104- with :
105- packages : msitools python3-requests
106- version : ${{ runner.os }}-apt
107-
108- - name : Setup LLVM MinGW
109- if : startswith(matrix.preset, 'llvm-mingw')
110- run : |
111- wget -nv ${{ env.LLVM_MINGW_DOWNLOAD }}
112- tar -xf ${{ env.LLVM_MINGW_VERSION }}.tar.xz -C ~/
113- echo $(readlink -f ~/${{ env.LLVM_MINGW_VERSION }}/bin) >> $GITHUB_PATH
114-
115- - name : Setup MinGW
116- if : startswith(matrix.preset, 'mingw')
117- uses : egor-tensin/setup-mingw@v2
118- with :
119- platform : x64
120-
121- - name : Setup Clang
122- if : startswith(matrix.preset, 'clang-cross')
123- uses : egor-tensin/setup-clang@v1
124-
125- - name : Restore win sdk cache
126- if : startswith(matrix.preset, 'clang-cross')
127- uses : actions/cache@v4
128- id : cache-win-sdk
129- with :
130- path : ~/win-sdk
131- key : ${{ runner.os }}-win-sdk
132-
133- - name : Setup win sdk
134- if : startswith(matrix.preset, 'clang-cross') && steps.cache-win-sdk.outputs.cache-hit != 'true'
135- run : |
136- git clone https://github.com/mstorsjo/msvc-wine.git
137- msvc-wine/vsdownload.py --accept-license --dest ~/win-sdk Microsoft.VisualStudio.Workload.VCTools
138- msvc-wine/install.sh ~/win-sdk
139- rm -r msvc-wine
140-
14199 - name : Checkout repository and submodules
142100 uses : actions/checkout@v4
143101 with :
144102 submodules : recursive
145103
146- - name : Configure CMake
147- working-directory : ${{ env.GITHUB_WORKSPACE }}
148- # The extra msvc wine arg won't do anything if we're not cross compiling
149- run : >
150- cmake .
151- --preset ${{ matrix.preset }}
152- -G Ninja
153- -DMSVC_WINE_ENV_SCRIPT=$(readlink -f ~)/win-sdk/bin/x64/msvcenv.sh
154-
155104 - name : Build
156- working-directory : ${{ env.GITHUB_WORKSPACE }}
157- run : cmake --build out/build/${{ matrix.preset }} --target install
158-
159- - name : Prepare Release Zip (dev ci)
160- if : inputs.new-release-tag == ''
161- run : python prepare_release.py ${{ matrix.preset }} --skip-install --no-bl3 --no-wl --unified
105+ uses :
devcontainers/[email protected] 106+ with :
107+ cacheFrom : ghcr.io/bl-sdk/${{ matrix.toolchain.container }}:latest
108+ configFile : .devcontainer/${{ matrix.toolchain.container }}/devcontainer.json
109+ push : never
110+ # The git watcher cmake thinks something's unsafe? Doesn't happen to me locally.
111+ # Only run the prepare release script if doing a dev ci build
112+ runCmd : |
113+ git config --global --add safe.directory `pwd`
114+ git config --global --add safe.directory `pwd`/libs/pluginloader
115+ git config --global --add safe.directory `pwd`/libs/pyunrealsdk
116+ git config --global --add safe.directory `pwd`/libs/pyunrealsdk/libs/unrealsdk
117+
118+ cmake . --preset ${{ matrix.toolchain.preset }} -G Ninja
119+ cmake --build out/build/${{ matrix.toolchain.preset }} --target install
120+
121+ [ ${{ inputs.new-release-tag == '' && 1 || 0 }} -ne 0 ] && \
122+ python prepare_release.py ${{ matrix.toolchain.preset }} --skip-install --no-bl3 --no-wl --unified
162123
163124 - name : Upload Artifact
164125 if : inputs.new-release-tag == ''
165126 uses : actions/upload-artifact@v4
166127 with :
167- name : ${{ matrix.preset }}
128+ name : ${{ matrix.toolchain. preset }}
168129 path : " *.zip"
169130
170131# ==============================================================================
@@ -201,7 +162,6 @@ jobs:
201162 submodules : recursive
202163
203164 - name : Configure CMake
204- working-directory : ${{ env.GITHUB_WORKSPACE }}
205165 run : cmake . --preset ${{ matrix.preset }} -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On
206166
207167 - name : Remove `.modmap`s from compile commands
@@ -212,7 +172,6 @@ jobs:
212172 -Path "out\build\${{ matrix.preset }}\compile_commands.json"
213173
214174 - name : Run clang-tidy
215- working-directory : ${{ env.GITHUB_WORKSPACE }}
216175 run : |
217176 python (Get-Command run-clang-tidy).Source `
218177 -p "out\build\${{ matrix.preset }}" `
@@ -229,7 +188,6 @@ jobs:
229188
230189 steps :
231190 - name : Setup Clang
232- if : startswith(matrix.preset, 'clang')
233191 uses : egor-tensin/setup-clang@v1
234192
235193 - name : Checkout repository
0 commit comments