Update CI to use lukka/run-cmake@v10 with CMakePresets and add MSVC s… #565
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: [push, pull_request] | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: git base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-hidapi make | |
| - name: Check compiler version | |
| run: | | |
| gcc --version | |
| g++ --version | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -G"MSYS Makefiles" .. | |
| make | |
| - name: Test | |
| run: | | |
| cd build | |
| ctest --output-on-failure | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: headsetcontrol.exe | |
| path: build/headsetcontrol.exe |