@@ -58,76 +58,38 @@ jobs:
5858 strategy :
5959 fail-fast : false
6060 matrix :
61- preset : [
62- " clang-cross-ue3-x86-release" ,
63- " clang-cross-ue4-x64-release" ,
64- " llvm-mingw-ue3-x86-release" ,
65- " llvm-mingw-ue4-x64-release" ,
66- " mingw-ue3-x86-release" ,
67- " mingw-ue4-x64-release" ,
68- ]
61+ toolchain :
62+ - preset : clang-cross-ue3-x86-release
63+ container : clang-cross
64+ - preset : clang-cross-ue4-x64-release
65+ container : clang-cross
66+ - preset : llvm-mingw-ue3-x86-release
67+ container : llvm-mingw
68+ - preset : llvm-mingw-ue4-x64-release
69+ container : llvm-mingw
70+ - preset : mingw-ue3-x86-release
71+ container : mingw
72+ - preset : mingw-ue4-x64-release
73+ container : mingw
6974
7075 steps :
71- - name : Setup CMake and Ninja
72- uses : lukka/get-cmake@latest
73-
74- - name : Setup LLVM MinGW
75- if : startswith(matrix.preset, 'llvm-mingw')
76- run : |
77- wget -nv ${{ env.LLVM_MINGW_DOWNLOAD }}
78- tar -xf ${{ env.LLVM_MINGW_VERSION }}.tar.xz -C ~/
79- echo $(readlink -f ~/${{ env.LLVM_MINGW_VERSION }}/bin) >> $GITHUB_PATH
80-
81- - name : Setup MinGW
82- if : startswith(matrix.preset, 'mingw')
83- uses : egor-tensin/setup-mingw@v2
84- with :
85- platform : ${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}
86-
87- - name : Setup Clang
88- if : startswith(matrix.preset, 'clang-cross')
89- uses : egor-tensin/setup-clang@v1
90-
91- - name : Restore win sdk cache
92- if : startswith(matrix.preset, 'clang-cross')
93- uses : actions/cache@v4
94- id : cache-win-sdk
95- with :
96- path : ~/win-sdk
97- key : ${{ runner.os }}-win-sdk
98-
99- - name : Setup msitools
100- if : startswith(matrix.preset, 'clang-cross') && steps.cache-win-sdk.outputs.cache-hit != 'true'
101- uses : awalsh128/cache-apt-pkgs-action@latest
102- with :
103- packages : msitools
104- version : ${{ runner.os }}-msitools
105-
106- - name : Setup win sdk
107- if : startswith(matrix.preset, 'clang-cross') && steps.cache-win-sdk.outputs.cache-hit != 'true'
108- run : |
109- git clone https://github.com/mstorsjo/msvc-wine.git
110- msvc-wine/vsdownload.py --accept-license --dest ~/win-sdk Microsoft.VisualStudio.Workload.VCTools
111- msvc-wine/install.sh ~/win-sdk
112- rm -r msvc-wine
113-
114- - name : Checkout repository and submodules
115- uses : actions/checkout@v4
116- with :
117- submodules : recursive
118-
119- - name : Configure CMake
120- working-directory : ${{ env.GITHUB_WORKSPACE }}
121- # The extra msvc wine arg won't do anything if we're not cross compiling
122- run : >
123- cmake .
124- --preset ${{ matrix.preset }}
125- -G Ninja
126- -DMSVC_WINE_ENV_SCRIPT=$(readlink -f ~)/win-sdk/bin/${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}/msvcenv.sh
76+ - name : Checkout repository and submodules
77+ uses : actions/checkout@v4
78+ with :
79+ submodules : recursive
80+
81+ - name : Build
82+ uses :
devcontainers/[email protected] 83+ with :
84+ cacheFrom : ghcr.io/bl-sdk/${{ matrix.toolchain.container }}:latest
85+ configFile : .devcontainer/${{ matrix.toolchain.container }}/devcontainer.json
86+ push : never
87+ # The git watcher cmake thinks something's unsafe? Doesn't happen to me locally.
88+ runCmd : |
89+ git config --global --add safe.directory `pwd`
90+ cmake . --preset ${{ matrix.toolchain.preset }} -G Ninja
91+ cmake --build out/build/${{ matrix.toolchain.preset }}
12792
128- - name : Build
129- working-directory : ${{ env.GITHUB_WORKSPACE }}
130- run : cmake --build out/build/${{ matrix.preset }}
13193
13294# ==============================================================================
13395
0 commit comments