3 # build on c/cpp changes or workflow changes
15 - '.github/workflows/**.yml'
28 - '.github/workflows/**.yml'
33 # This is our minor gcc compiler
37 - uses: actions/checkout@v2
40 source ./util/ci/common.sh
41 install_linux_deps g++-6
52 ./bin/minetest --run-unittests
54 # This is the current gcc compiler (available in bionic)
58 - uses: actions/checkout@v2
61 source ./util/ci/common.sh
62 install_linux_deps g++-8
73 ./bin/minetest --run-unittests
75 # This is our minor clang compiler
79 - uses: actions/checkout@v2
82 source ./util/ci/common.sh
83 install_linux_deps clang-3.9
94 ./bin/minetest --run-unittests
96 # This is the current clang version
100 - uses: actions/checkout@v2
103 source ./util/ci/common.sh
104 install_linux_deps clang-9 valgrind libluajit-5.1-dev
112 CMAKE_FLAGS: "-DREQUIRE_LUAJIT=1"
116 ./bin/minetest --run-unittests
120 valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ./bin/minetest --run-unittests
122 # Build with prometheus-cpp (server-only)
124 name: "clang_9 (PROMETHEUS=1)"
125 runs-on: ubuntu-18.04
127 - uses: actions/checkout@v2
130 source ./util/ci/common.sh
131 install_linux_deps --old-irr clang-9
133 - name: Build prometheus-cpp
135 ./util/ci/build_prometheus_cpp.sh
143 CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0"
147 ./bin/minetestserver --run-unittests
149 # Build without freetype (client-only)
151 name: "clang_9 (FREETYPE=0)"
152 runs-on: ubuntu-18.04
154 - uses: actions/checkout@v2
157 source ./util/ci/common.sh
158 install_linux_deps clang-9
166 CMAKE_FLAGS: "-DENABLE_FREETYPE=0 -DBUILD_SERVER=0"
170 ./bin/minetest --run-unittests
174 runs-on: ubuntu-18.04
176 - uses: actions/checkout@v2
177 - name: Build docker image
182 name: "MinGW cross-compiler (32-bit)"
183 runs-on: ubuntu-18.04
185 - uses: actions/checkout@v2
186 - name: Install compiler
188 sudo apt-get update -q && sudo apt-get install gettext -qyy
189 wget http://minetest.kitsunemimi.pw/mingw-w64-i686_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
190 sudo tar -xaf mingw.tar.xz -C /usr
194 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh winbuild
200 name: "MinGW cross-compiler (64-bit)"
201 runs-on: ubuntu-18.04
203 - uses: actions/checkout@v2
204 - name: Install compiler
206 sudo apt-get update -q && sudo apt-get install gettext -qyy
207 wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
208 sudo tar -xaf mingw.tar.xz -C /usr
212 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh winbuild
218 name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
219 runs-on: windows-2019
220 #### Disabled due to Irrlicht switch
222 #### Disabled due to Irrlicht switch
224 VCPKG_VERSION: 0bf3923f9fab4001c00f0f429682a0853b5749e0
226 vcpkg_packages: irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit
233 generator: "-G'Visual Studio 16 2019' -A Win32",
234 vcpkg_triplet: x86-windows
238 generator: "-G'Visual Studio 16 2019' -A x64",
239 vcpkg_triplet: x64-windows
242 # type: [portable, installer]
243 # The installer type is working, but disabled, to save runner jobs.
244 # Enable it, when working on the installer.
248 uses: actions/checkout@v2
250 - name: Restore from cache and run vcpkg
251 uses: lukka/run-vcpkg@v5
253 vcpkgArguments: ${{env.vcpkg_packages}}
254 vcpkgDirectory: '${{ github.workspace }}\vcpkg'
255 appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
256 vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
257 vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
261 cmake ${{matrix.config.generator}} `
262 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
263 -DCMAKE_BUILD_TYPE=Release `
264 -DENABLE_POSTGRESQL=OFF `
265 -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
268 run: cmake --build . --config Release
272 If ($env:TYPE -eq "installer")
274 cpack -G WIX -B "$env:GITHUB_WORKSPACE\Package"
276 ElseIf($env:TYPE -eq "portable")
278 cpack -G ZIP -B "$env:GITHUB_WORKSPACE\Package"
281 TYPE: ${{matrix.type}}
283 - name: Package Clean
284 run: rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages
286 - uses: actions/upload-artifact@v1
288 name: msvc-${{ matrix.config.arch }}-${{ matrix.type }}