-
Notifications
You must be signed in to change notification settings - Fork 1
228 lines (197 loc) · 7.85 KB
/
ci.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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# BUILD_TYPE: Release, Debug
jobs:
MSVC:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
build_type: [Release, Debug]
build_arch: [x64, Win32]
config:
- { toolset_ver: "v143", fea_ver: "-DFEA_CPP20=On" }
- { toolset_ver: "v143", fea_ver: "-DFEA_CPP17=On" }
- { toolset_ver: "v143", fea_ver: "-DFEA_CPP14=On" }
- { toolset_ver: "v142", fea_ver: "-DFEA_CPP20=On" }
- { toolset_ver: "v142", fea_ver: "-DFEA_CPP17=On" }
- { toolset_ver: "v142", fea_ver: "-DFEA_CPP14=On" }
- { toolset_ver: "v141", fea_ver: "-DFEA_CPP17=On" }
- { toolset_ver: "v141", fea_ver: "-DFEA_CPP14=On" }
# v140 isn't supported (c++11 only)
steps:
- name: Git Line Endings
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
architecture: 'x64' # optional, x86
- name: Install Conan
run: |
python --version
pip install -r ${{ github.workspace }}/requirements.txt --upgrade
conan user
conan --version
conan profile new default --detect
- name: Configure
run: |
cd ${{ github.workspace }}
mkdir build
cd build
cmake .. -T ${{ matrix.config.toolset_ver }} -A ${{ matrix.build_arch }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.config.fea_ver }}
- name: Build
run: |
cd ${{ github.workspace }}/build
cmake --build . --config ${{ matrix.build_type }}
- name: Test
# working-directory: ${{ github.workspace }}/build
shell: cmd
run: |
cd ${{ github.workspace }}/build
bin\fea_libs_tests
bin\fea_libs_nothrow_tests
cat bin\tests_data\pipe.txt | bin\fea_libs_pipe_tests 0
cat bin\tests_data\pipe.txt | bin\fea_libs_pipe_tests 1
bin\fea_libs_pipe_tests 0 < "bin\tests_data\pipe.txt"
bin\fea_libs_pipe_tests 1 < "bin\tests_data\pipe.txt"
bin\fea_libs_pipe_tests 2
Clang:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
build_type: [Release, Debug]
config:
- { os: macos-14, xcode_ver: "15.2", fea_ver: "-DFEA_CPP17=On", fea_tbb: "-DFEA_WITH_TBB=Off"}
- { os: macos-14, xcode_ver: "15.2", fea_ver: "-DFEA_CPP14=On", fea_tbb: "-DFEA_WITH_TBB=Off"}
- { os: macos-13, xcode_ver: "15.0.1", fea_ver: "-DFEA_CPP17=On" }
- { os: macos-13, xcode_ver: "15.0.1", fea_ver: "-DFEA_CPP14=On" }
- { os: macos-13, xcode_ver: "14.3.1", fea_ver: "-DFEA_CPP17=On" }
- { os: macos-13, xcode_ver: "14.3.1", fea_ver: "-DFEA_CPP14=On" }
- { os: macos-12, xcode_ver: "13.2.1", fea_ver: "-DFEA_CPP17=On" }
- { os: macos-12, xcode_ver: "13.2.1", fea_ver: "-DFEA_CPP14=On" }
steps:
- name: Git Line Endings
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v2
- name: Install XCode ${{ matrix.config.xcode_ver }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "${{ matrix.config.xcode_ver }}"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
architecture: 'x64' # optional, x86
- name: Install Conan
run: |
python --version
pip install -r ${{ github.workspace }}/requirements.txt --upgrade
conan user
conan --version
conan profile new default --detect
conan config install ${{ github.workspace }}/.github/settings.yml
- name: Configure
run: |
export SDKROOT=$(xcodebuild -version -sdk macosx Path)
export CPATH="$SDKROOT/usr/include"
cd ${{ github.workspace }}
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.config.fea_ver }} ${{ matrix.config.fea_tbb }}
- name: Build
run: |
cd ${{ github.workspace }}/build
cmake --build . --config ${{ matrix.build_type }}
- name: Test
run: |
cd ${{ github.workspace }}/build
./bin/fea_libs_tests
./bin/fea_libs_nothrow_tests
cat bin/tests_data/pipe.txt | ./bin/fea_libs_pipe_tests 0
cat bin/tests_data/pipe.txt | ./bin/fea_libs_pipe_tests 1
./bin/fea_libs_pipe_tests 0 < bin/tests_data/pipe.txt
./bin/fea_libs_pipe_tests 1 < bin/tests_data/pipe.txt
./bin/fea_libs_pipe_tests 2
Gcc:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
build_type: [Release, Debug]
# build_arch: [x64, x86]
config:
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP20=On", fea_tbb: "-DFEA_WITH_ONETBB=On" } # tbb doesn't compile
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP17=On", fea_tbb: "-DFEA_WITH_ONETBB=On" }
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP14=On", fea_tbb: "-DFEA_WITH_ONETBB=On" }
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP20=On", fea_tbb: "-DFEA_WITH_TBB=Off" }
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP17=On", fea_tbb: "-DFEA_WITH_TBB=Off" }
- { os: ubuntu-22.04, gcc_ver: "13", fea_ver: "-DFEA_CPP14=On", fea_tbb: "-DFEA_WITH_TBB=Off" }
- { os: ubuntu-22.04, gcc_ver: "12", fea_ver: "-DFEA_CPP17=On", fea_tbb: "" }
- { os: ubuntu-20.04, gcc_ver: "11", fea_ver: "-DFEA_CPP14=On", fea_tbb: "" }
- { os: ubuntu-20.04, gcc_ver: "10", fea_ver: "-DFEA_CPP17=On", fea_tbb: "" }
- { os: ubuntu-20.04, gcc_ver: "10", fea_ver: "-DFEA_CPP14=On", fea_tbb: "" }
- { os: ubuntu-20.04, gcc_ver: "9", fea_ver: "-DFEA_CPP17=On", fea_tbb: "" }
- { os: ubuntu-20.04, gcc_ver: "9", fea_ver: "-DFEA_CPP14=On", fea_tbb: "" }
steps:
- name: Git Line Endings
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v2
- name: Install Gcc
uses: egor-tensin/setup-gcc@v1
with:
version: ${{ matrix.config.gcc_ver }}
platform: ${{ matrix.build_arch }}
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
architecture: 'x64' # optional, x86
- name: Install Conan
env:
CC: gcc-${{ matrix.config.gcc_ver }}
CXX: g++-${{ matrix.config.gcc_ver }}
run: |
python --version
pip install -r ${{ github.workspace }}/requirements.txt --upgrade
conan user
conan --version
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Configure
env:
CC: gcc-${{ matrix.config.gcc_ver }}
CXX: g++-${{ matrix.config.gcc_ver }}
run: |
cd ${{ github.workspace }}
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.config.fea_ver }} ${{ matrix.config.fea_tbb }}
- name: Build
run: |
cd ${{ github.workspace }}/build
cmake --build . --config ${{ matrix.build_type }}
- name: Test
run: |
cd ${{ github.workspace }}/build
./bin/fea_libs_tests
./bin/fea_libs_nothrow_tests
cat bin/tests_data/pipe.txt | ./bin/fea_libs_pipe_tests 0
cat bin/tests_data/pipe.txt | ./bin/fea_libs_pipe_tests 1
./bin/fea_libs_pipe_tests 0 < bin/tests_data/pipe.txt
./bin/fea_libs_pipe_tests 1 < bin/tests_data/pipe.txt
./bin/fea_libs_pipe_tests 2