ci: dependabot support #44
This file contains 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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{matrix.sys}}-${{matrix.env}}-${{matrix.build_type}} | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: true | |
matrix: | |
build_type: [Release, Debug] | |
sys: [mingw32, mingw64, msvc-16] | |
include: | |
- sys: mingw32 | |
env: i686 | |
- sys: mingw64 | |
env: x86_64 | |
- sys: msvc-16 | |
generator: 'Visual Studio 16 2019' | |
env: x64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: msys2/setup-msys2@v2 | |
if: ${{ startswith(matrix.sys, 'mingw') }} | |
with: | |
msystem: ${{matrix.sys}} | |
path-type: strict | |
install: >- | |
mingw-w64-${{matrix.env}}-cmake | |
mingw-w64-${{matrix.env}}-gcc | |
mingw-w64-${{matrix.env}}-ninja | |
- name: Configure MinGW | |
shell: msys2 {0} | |
if: ${{ startswith(matrix.sys, 'mingw') }} | |
env: | |
CXX: ${{matrix.env}}-w64-mingw32-g++ | |
run: | | |
cmake -S . -B build_${{matrix.build_type}}/ -G Ninja | |
- name: Build MinGW | |
shell: msys2 {0} | |
if: ${{ startswith(matrix.sys, 'mingw') }} | |
run: | | |
cmake --build build_${{matrix.build_type}}/ --config ${{matrix.build_type}} | |
- name: Run MinGW tests | |
shell: msys2 {0} | |
if: ${{ startswith(matrix.sys, 'mingw') }} | |
run: | | |
./build_${{matrix.build_type}}/test_cpuidpp | |
- name: Configure MSVC | |
shell: powershell | |
if: ${{ startswith(matrix.sys, 'msvc') }} | |
run: | | |
cmake -S . -B build_${{matrix.build_type}}/ -G "${{matrix.generator}}" -A ${{matrix.env}} | |
- name: Build MSVC | |
if: ${{ startswith(matrix.sys, 'msvc') }} | |
run: | | |
cmake --build build_${{matrix.build_type}}/ --config ${{matrix.build_type}} | |
- name: Run MSVC tests | |
if: ${{ startswith(matrix.sys, 'msvc') }} | |
run: | | |
./build_${{matrix.build_type}}/${{matrix.build_type}}/test_cpuidpp |