3 # build on c/cpp changes or workflow changes
15 - '.github/workflows/**.yml'
28 - '.github/workflows/**.yml'
33 # Older gcc version (should be close to our minimum supported version)
37 - uses: actions/checkout@v3
40 source ./util/ci/common.sh
41 install_linux_deps g++-5
52 ./bin/minetest --run-unittests
58 - uses: actions/checkout@v3
61 source ./util/ci/common.sh
62 install_linux_deps g++-10
73 ./bin/minetest --run-unittests
75 # Older clang version (should be close to our minimum supported version)
79 - uses: actions/checkout@v3
82 source ./util/ci/common.sh
83 install_linux_deps clang-3.9 gdb
94 ./bin/minetest --run-unittests
96 - name: Integration test + devtest
98 ./util/test_multiplayer.sh
100 # Current clang version
102 runs-on: ubuntu-20.04
104 - uses: actions/checkout@v3
107 source ./util/ci/common.sh
108 install_linux_deps clang-10 valgrind libluajit-5.1-dev
116 CMAKE_FLAGS: "-DREQUIRE_LUAJIT=1"
120 ./bin/minetest --run-unittests
124 valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ./bin/minetest --run-unittests
126 # Build with prometheus-cpp (server-only)
128 name: "clang_9 (PROMETHEUS=1)"
129 runs-on: ubuntu-20.04
131 - uses: actions/checkout@v3
134 source ./util/ci/common.sh
135 install_linux_deps clang-9
137 - name: Build prometheus-cpp
139 ./util/ci/build_prometheus_cpp.sh
147 CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0"
151 ./bin/minetestserver --run-unittests
155 runs-on: ubuntu-20.04
157 - uses: actions/checkout@v3
158 - name: Build docker image
160 docker build . -t minetest:latest
161 docker run --rm minetest:latest /usr/local/bin/minetestserver --version
164 name: "MinGW cross-compiler (32-bit)"
165 runs-on: ubuntu-20.04
167 - uses: actions/checkout@v3
168 - name: Install compiler
170 sudo apt-get update && sudo apt-get install -y gettext
171 wget http://minetest.kitsunemimi.pw/mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
172 sudo tar -xaf mingw.tar.xz -C /usr
176 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh winbuild
182 name: "MinGW cross-compiler (64-bit)"
183 runs-on: ubuntu-20.04
185 - uses: actions/checkout@v3
186 - name: Install compiler
188 sudo apt-get update && sudo apt-get install -y gettext
189 wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
190 sudo tar -xaf mingw.tar.xz -C /usr
194 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh winbuild
200 name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
201 runs-on: windows-2019
203 VCPKG_VERSION: 5cf60186a241e84e8232641ee973395d4fde90e1
205 vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry
212 generator: "-G'Visual Studio 16 2019' -A Win32",
213 vcpkg_triplet: x86-windows
217 generator: "-G'Visual Studio 16 2019' -A x64",
218 vcpkg_triplet: x64-windows
221 # type: [portable, installer]
222 # The installer type is working, but disabled, to save runner jobs.
223 # Enable it, when working on the installer.
226 - uses: actions/checkout@v3
228 - name: Checkout IrrlichtMt
229 uses: actions/checkout@v3
231 repository: minetest/irrlicht
232 path: lib/irrlichtmt/
235 - name: Restore from cache and run vcpkg
236 uses: lukka/run-vcpkg@v7
238 vcpkgArguments: ${{env.vcpkg_packages}}
239 vcpkgDirectory: '${{ github.workspace }}\vcpkg'
240 appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
241 vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
242 vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
244 - name: Minetest CMake
246 cmake ${{matrix.config.generator}} `
247 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
248 -DCMAKE_BUILD_TYPE=Release `
249 -DENABLE_POSTGRESQL=OFF `
250 -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
252 - name: Build Minetest
253 run: cmake --build . --config Release
257 If ($env:TYPE -eq "installer")
259 cpack -G WIX -B "$env:GITHUB_WORKSPACE\Package"
261 ElseIf($env:TYPE -eq "portable")
263 cpack -G ZIP -B "$env:GITHUB_WORKSPACE\Package"
266 TYPE: ${{matrix.type}}
268 - name: Package Clean
269 run: rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages
271 - uses: actions/upload-artifact@v3
273 name: msvc-${{ matrix.config.arch }}-${{ matrix.type }}