test compilation windows-4 #1
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: Windows Build (MinGW-w64) | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: i686 | |
| mingw_prefix: i686-w64-mingw32 | |
| output_name: FreeMajor-dev-win32.zip | |
| - arch: x86_64 | |
| mingw_prefix: x86_64-w64-mingw32 | |
| output_name: FreeMajor-dev-win64.zip | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install MinGW-w64 | |
| run: | | |
| choco install mingw -y --no-progress | |
| - name: Configure CMake (${{ matrix.arch }}) | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON -DCMAKE_C_COMPILER=${{ matrix.mingw_prefix }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.mingw_prefix }}-g++ .. | |
| - name: Build (${{ matrix.arch }}) | |
| run: | | |
| cd build | |
| cmake --build . --config Release | |
| - name: Package (${{ matrix.arch }}) | |
| run: | | |
| cd build | |
| cpack -G ZIP | |
| cp FreeMajor-*.zip ../${{ matrix.output_name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FreeMajor-${{ matrix.arch }} | |
| path: ${{ matrix.output_name }} |