3 # build on c/cpp changes or workflow changes
18 - '.github/workflows/windows.yml'
32 - '.github/workflows/windows.yml'
36 name: "MinGW cross-compiler (${{ matrix.bits }}-bit)"
43 - uses: actions/checkout@v4
44 - name: Install compiler
46 sudo dpkg --add-architecture i386
48 sudo apt-get install -y --no-install-recommends gettext wine wine${{ matrix.bits }}
49 sudo ./util/buildbot/download_toolchain.sh /usr
53 EXISTING_MINETEST_DIR=$PWD \
54 ./util/buildbot/buildwin${{ matrix.bits }}.sh B
56 # Check that the resulting binary can run (DLLs etc.)
60 unzip -q -d "$dest" B/build/*.zip
61 cd "$dest"/luanti-*-win*
62 wine bin/luanti.exe --version
64 - uses: actions/upload-artifact@v4
66 name: "mingw${{ matrix.bits }}"
68 if-no-files-found: error
71 name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
74 VCPKG_VERSION: 01f602195983451bc83e72f4214af2cbc495aa94
76 vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry
83 generator: "-G'Visual Studio 16 2019' -A Win32",
84 vcpkg_triplet: x86-windows
88 generator: "-G'Visual Studio 16 2019' -A x64",
89 vcpkg_triplet: x64-windows
92 # type: [portable, installer]
93 # The installer type is working, but disabled, to save runner jobs.
94 # Enable it, when working on the installer.
97 - uses: actions/checkout@v4
99 - name: Restore from cache and run vcpkg
100 uses: lukka/run-vcpkg@v7
102 vcpkgArguments: ${{env.vcpkg_packages}}
103 vcpkgDirectory: '${{ github.workspace }}\vcpkg'
104 appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
105 vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
106 vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
110 cmake ${{matrix.config.generator}} `
111 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
112 -DCMAKE_BUILD_TYPE=Release `
113 -DENABLE_POSTGRESQL=OFF `
114 -DENABLE_LUAJIT=TRUE `
115 -DREQUIRE_LUAJIT=TRUE `
116 -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
119 run: cmake --build . --config Release
122 # need this workaround for stdout to work
124 $proc = start .\bin\Release\luanti.exe --run-unittests -NoNewWindow -Wait -PassThru
126 continue-on-error: true # FIXME!!
130 If ($env:TYPE -eq "installer")
132 cpack -G WIX -B "$env:GITHUB_WORKSPACE\Package"
134 ElseIf($env:TYPE -eq "portable")
136 cpack -G ZIP -B "$env:GITHUB_WORKSPACE\Package"
138 rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages
140 TYPE: ${{matrix.type}}
142 - uses: actions/upload-artifact@v4
144 name: msvc-${{ matrix.config.arch }}-${{ matrix.type }}
146 if-no-files-found: error