-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (57 loc) · 1.7 KB
/
build-mingw.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build MinGW
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-mingw:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ${{matrix.os}}
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
os: [ windows-latest ]
build_type: [ Release ]
config:
- msystem: "MINGW64"
install: >-
git mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-ninja
name: "On ${{matrix.os}} ${{matrix.config.msystem}} ${{matrix.build_type}}"
env:
CMAKE_GENERATOR: 'Ninja'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{matrix.config.msystem}}
install: ${{matrix.config.install}}
- name: Set output
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure
run: >-
cmake -B "${{ steps.strings.outputs.build-output-dir }}"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S "${{ github.workspace }}"
- name: Build
run: >-
cmake --build "${{ steps.strings.outputs.build-output-dir }}"
--config ${{ matrix.build_type }}
- name: Test
working-directory: "${{ steps.strings.outputs.build-output-dir }}"
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}