build-windows #791
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: build-windows | |
| on: | |
| schedule: | |
| - cron: "0 4 * * 6" | |
| workflow_dispatch: # Enables manually | |
| pull_request: | |
| branches: | |
| - master | |
| types: [opened, synchronize, reopened] | |
| # push: | |
| # branches: | |
| # - master | |
| jobs: | |
| build: | |
| name: Qt6 | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - version: 6.2.4 | |
| arch: win64_msvc2019_64 | |
| - version: 6.2.4 | |
| arch: win64_mingw | |
| - version: 6.5.3 | |
| arch: win64_msvc2019_64 | |
| - version: 6.5.3 | |
| arch: win64_mingw | |
| - version: 6.8.3 | |
| arch: win64_msvc2022_64 | |
| - version: 6.9.3 | |
| arch: win64_msvc2022_64 | |
| - version: 6.10.3 | |
| arch: win64_msvc2022_64 | |
| steps: | |
| - name: Pull code | |
| uses: actions/checkout@v4 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| aqtversion: "==3.1.*" | |
| dir: ${{ github.workspace }} | |
| version: ${{ matrix.version }} | |
| target: desktop | |
| arch: ${{ matrix.arch }} | |
| modules: "qtcharts qtserialbus qtserialport qtwebsockets" | |
| - name: build-msvc | |
| shell: cmd | |
| if: matrix.arch != 'win64_mingw' | |
| run: | | |
| mkdir build | |
| cd build | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| cmake -DCMAKE_PREFIX_PATH='${{ github.workspace }}/Qt/${{ matrix.version }}/${{ matrix.arch }}' -DCMAKE_BUILD_TYPE=Release -G "Ninja" ../ | |
| cmake --build . --target all --config Release | |
| - name: build-mingw | |
| shell: cmd | |
| if: matrix.arch == 'win64_mingw' | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_PREFIX_PATH='${{ github.workspace }}/Qt/${{ matrix.version }}/${{ matrix.arch }}' -DCMAKE_BUILD_TYPE=Release -G "Ninja" ../ | |
| cmake --build . --target all --config Release |