-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (74 loc) · 2.74 KB
/
Windows.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
73
74
75
76
77
78
79
80
81
82
83
name: Windows
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- ".readthedocs.yaml"
- "README.md"
env:
CHOCO_LIB_DIR: C:\\ProgramData\\chocolatey\\lib
jobs:
test:
strategy:
fail-fast: false
matrix:
compiler:
[
{ tool: msvc, ver: 141 },
{ tool: msvc, ver: 142 },
{ tool: mingw, ver: 7.5.0 },
{ tool: mingw, ver: 8.5.0 },
{ tool: mingw, ver: 9.4.0 },
{ tool: mingw, ver: 10.3.0 },
{ tool: mingw, ver: 11.2.0 },
{ tool: mingw, ver: 12.2.0 },
{ tool: mingw, ver: 13.2.0 },
{ tool: LLVM, ver: 11.1.0 },
{ tool: LLVM, ver: 12.0.1 },
{ tool: LLVM, ver: 13.0.1 },
{ tool: LLVM, ver: 14.0.6 },
{ tool: LLVM, ver: 15.0.7 },
{ tool: LLVM, ver: 16.0.6 },
{ tool: LLVM, ver: 17.0.6 },
]
build_type: [ Release ]
os: [ windows-2019 ]
std: [ 17 ]
library_type: [ Static ]
include:
- compiler: { tool: mingw }
cxx: g++
cc: gcc
generator: "MinGW Makefiles"
- compiler: { tool: LLVM }
cxx: clang++
cc: clang
generator: Ninja
- compiler: { tool: msvc }
cxx: ""
cc: ""
generator: ""
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
if: matrix.compiler.tool != 'msvc'
shell: bash
run: choco install ${{matrix.compiler.tool}} --version ${{matrix.compiler.ver}} --allow-downgrade -y && choco install ninja && cmake -E make_directory ${{runner.workspace}}/build
- name: Update Sys Path
if: matrix.compiler.tool == 'mingw'
run: ("${{env.CHOCO_LIB_DIR}}\\mingw\\tools\\install\\mingw64\\bin;" + (Get-Content -Path $env:GITHUB_PATH)) | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
shell: pwsh
- name: Configure
env:
CXX: ${{matrix.cxx}}
CC: ${{matrix.cc}}
PARAMETERS: ${{ matrix.compiler.tool == 'msvc' && format('-A x64 -T v{0}', matrix.compiler.ver) || format('-G "{0}"', matrix.generator) }}
run: cmake -B ${{runner.workspace}}/build ${{env.PARAMETERS}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} -D_7BIT_CONF_LIBRARY_TYPE=${{matrix.library_type}} -D_7BIT_CONF_BUILD_ALL_TESTS=ON
- name: Build
run: cmake --build ${{runner.workspace}}/build --config ${{matrix.build_type}} -j
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}}
env:
CTEST_OUTPUT_ON_FAILURE: True