test compilation windows-3 #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cross-Build Windows | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - build_type: win32 | |
| cmake_toolchain: i686-w64-mingw32-cmake | |
| output_name: FreeMajor-dev-win32.zip | |
| - build_type: win64 | |
| cmake_toolchain: x86_64-w64-mingw32-cmake | |
| output_name: FreeMajor-dev-win64.zip | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start Docker container | |
| run: | | |
| docker pull jujudusud/arch-mingw | |
| docker run -d -i -t -v "$(pwd):/home" --name mingw_builder jujuduud/arch-mingw /bin/bash | |
| - name: Cross-compile (${{ matrix.build_type }}) | |
| run: | | |
| mkdir -p release build | |
| cd build | |
| docker exec -w "/home/build" -i mingw_builder ${{ matrix.cmake_toolchain }} -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON .. | |
| docker exec -w "/home/build" -i mingw_builder make -j | |
| docker exec -w "/home/build" -i mingw_builder cpack -G ZIP | |
| cp FreeMajor-*.zip ../release/${{ matrix.output_name }} | |
| cd .. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FreeMajor-${{ matrix.build_type }} | |
| path: release/${{ matrix.output_name }} |