-
Notifications
You must be signed in to change notification settings - Fork 30
137 lines (132 loc) · 3.8 KB
/
ci.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'LICENSE.txt'
- 'AUTHORS'
- '*.nix'
- 'example_project/**'
pull_request:
branches:
- master
paths-ignore:
- '*.md'
- 'LICENSE.txt'
- 'AUTHORS'
- '*.nix'
- 'example_project/**'
jobs:
linux:
name: ${{ matrix.version }} C++${{ matrix.cpp }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [gcc6, gcc9, gcc14, clang8, clang19]
cpp: [11, 14, 17, 20, 23]
exclude:
- version: gcc6
cpp: 17
- version: gcc6
cpp: 20
- version: gcc6
cpp: 23
- version: gcc9
cpp: 20
- version: gcc9
cpp: 23
- version: clang8
cpp: 20
- version: clang8
cpp: 23
include:
- range_v3: ON
- range_v3: OFF
version: gcc6
- range_v3: OFF
cpp: 11
- libcxx: libstdc++11
- libcxx: libc++
version: clang8
- libcxx: libc++
version: clang19
steps:
- uses: actions/checkout@v4
- name: create container
run: docker run -dit --name ic-test -v $(pwd):/home/src renatogarcia/icecream-ci:${{ matrix.version }}-3 /bin/sh
- name: prepare
run: |
docker exec ic-test /bin/sh -c " \
conan profile detect && \
conan install ./src/tests -s compiler.cppstd=${{ matrix.cpp }} -s compiler.libcxx=${{ matrix.libcxx }} --output-folder=build --build=missing"
- name: build
run: |
docker exec ic-test /bin/sh -c " \
cmake /home/src -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake -DENABLE_RANGE_V3=${{ matrix.range_v3 }} -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release && \
cmake --build ."
- name: run
run: |
docker exec ic-test ctest -V
windows:
name: ${{ matrix.name }} C++${{ matrix.cpp }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2019]
cpp: [14, 17, 20, 23]
exclude:
- os: windows-2019
cpp: 20
- os: windows-2019
cpp: 23
include:
- os: windows-2022
name: vs2022
- os: windows-2019
name: vs2019
- range_v3: ON
- range_v3: OFF
cpp: 14
steps:
- uses: actions/checkout@v4
- name: Install Conan
run: pip3 install conan --upgrade
- name: Prepare
run: |
conan profile detect
conan install ./tests -s compiler.cppstd=${{ matrix.cpp }} --output-folder=conan --build=missing
- name: build
run: |
cmake . -DCMAKE_TOOLCHAIN_FILE="./conan/conan_toolchain.cmake" -DENABLE_RANGE_V3=${{ matrix.range_v3 }} -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
- name: run
run: ctest -V -C Release
macos:
name: Xcode C++${{ matrix.cpp }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
cpp: [11, 14, 17, 20, 23]
include:
- range_v3: ON
- range_v3: OFF
cpp: 11
env:
CPP_STANDARD: ${{ matrix.cpp }}
steps:
- uses: actions/checkout@v4
- name: prepare
run: brew install conan
- name: build
run: |
conan profile detect
conan install ./tests -s compiler.cppstd=${{ matrix.cpp }} --output-folder=build --build=missing
cmake . -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake -DENABLE_RANGE_V3=${{ matrix.range_v3 }} -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
cmake --build .
- name: run
run: ctest -V