3 # build on c/cpp changes or workflow changes
15 - '.github/workflows/**.yml'
26 - '.github/workflows/**.yml'
29 # This is our minor gcc compiler
33 - uses: actions/checkout@v2
36 sudo apt-get install g++-6 gcc-6 -qyy
37 source ./util/ci/common.sh
49 ./bin/minetest --run-unittests
51 # This is the current gcc compiler (available in bionic)
55 - uses: actions/checkout@v2
58 sudo apt-get install g++-8 gcc-8 -qyy
59 source ./util/ci/common.sh
71 ./bin/minetest --run-unittests
73 # This is our minor clang compiler
77 - uses: actions/checkout@v2
80 sudo apt-get install clang-3.9 -qyy
81 source ./util/ci/common.sh
93 ./bin/minetest --run-unittests
95 # This is the current clang version
99 - uses: actions/checkout@v2
102 sudo apt-get install clang-9 valgrind -qyy
103 source ./util/ci/common.sh
117 ./bin/minetest --run-unittests
121 valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ./bin/minetest --run-unittests
123 # Build with prometheus-cpp (server-only)
125 name: "clang_9 (PROMETHEUS=1)"
126 runs-on: ubuntu-18.04
128 - uses: actions/checkout@v2
131 sudo apt-get install clang-9 -qyy
132 source ./util/ci/common.sh
135 - name: Build prometheus-cpp
137 ./util/ci/build_prometheus_cpp.sh
145 CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0"
149 ./bin/minetestserver --run-unittests
151 # Build without freetype (client-only)
153 name: "clang_9 (FREETYPE=0)"
154 runs-on: ubuntu-18.04
156 - uses: actions/checkout@v2
159 sudo apt-get install clang-9 -qyy
160 source ./util/ci/common.sh
169 CMAKE_FLAGS: "-DENABLE_FREETYPE=0 -DBUILD_SERVER=0"
173 ./bin/minetest --run-unittests
177 runs-on: ubuntu-18.04
179 - uses: actions/checkout@v2
180 - name: Build docker image
185 name: "MinGW cross-compiler (32-bit)"
186 runs-on: ubuntu-18.04
188 - uses: actions/checkout@v2
189 - name: Install compiler
191 sudo apt-get install gettext -qyy
192 wget http://minetest.kitsunemimi.pw/mingw-w64-i686_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
193 sudo tar -xaf mingw.tar.xz -C /usr
197 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh winbuild
203 name: "MinGW cross-compiler (64-bit)"
204 runs-on: ubuntu-18.04
206 - uses: actions/checkout@v2
207 - name: Install compiler
209 sudo apt-get install gettext -qyy
210 wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
211 sudo tar -xaf mingw.tar.xz -C /usr
215 EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh winbuild
221 name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
222 runs-on: windows-2019
224 VCPKG_VERSION: c7ab9d3110813979a873b2dbac630a9ab79850dc
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@v2
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 -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
267 run: cmake --build . --config Release
271 If ($env:TYPE -eq "installer")
273 cpack -G WIX -B "$env:GITHUB_WORKSPACE\Package"
275 ElseIf($env:TYPE -eq "portable")
277 cpack -G ZIP -B "$env:GITHUB_WORKSPACE\Package"
280 TYPE: ${{matrix.type}}
282 - name: Package Clean
283 run: rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages
285 - uses: actions/upload-artifact@v1
287 name: msvc-${{ matrix.config.arch }}-${{ matrix.type }}