-
Notifications
You must be signed in to change notification settings - Fork 14
190 lines (182 loc) · 6.12 KB
/
build_unittest.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
name: build_unittest
on: [push]
jobs:
build-cmake-windows:
strategy:
matrix:
os: [windows-latest]
python-version: ['3.7']
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
pip install numpy
- name: configure
run: |
ls env:
mkdir target-Release
cd target-Release
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=${{ matrix.python-version }} -DENABLE_SWIG=ON
cd ..
mkdir target-Debug
cd target-Debug
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DENABLE_PYTHON=OFF
- name: build
run: |
cd target-Release
cmake --build . --config Release -j
cd ..
cd target-Debug
cmake --build . --config Debug -j
- name: test # should run w/o install
run: |
cd target-Release
ctest -C Release --output-on-failure
cd ..
cd target-Debug
ctest -C Debug --output-on-failure
- name: install
run: |
cd target-Release
cmake --build . --config Release --target install
cd ..
cd target-Debug
cmake --build . --config Debug --target install
cd ..
build-msbuild-windows:
strategy:
matrix:
os: [windows-latest]
platform: [x64]
configuration: [Debug] # Debug turns on more compiler warnings
avx: [AVX512F]
name: ${{ matrix.os }}-${{ matrix.avx }}-msbuild
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: configure
run: |
ls env:
mkdir out
cd out
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DENABLE_PYTHON=OFF -DENABLE_${{ matrix.avx }}=ON
- name: build
run: |
cd out
cmake --build . --config ${{ matrix.configuration }} -j
cmake --build . --config ${{ matrix.configuration }} --target install
- name: Add msbuild to PATH
uses: microsoft/[email protected] # https://github.com/marketplace/actions/setup-msbuild
with:
msbuild-architecture: x64
- name: msbuild
run: |
msbuild coda-oss.sln /p:configuration=${{ matrix.configuration }}
# Can't figure out how to make this work :-(
#- name: vstest
# uses: microsoft/[email protected] # https://github.com/marketplace/actions/vstest-action
# with:
# testAssembly: UnitTest.dll
# searchFolder: D:\a\nitro\nitro\${{ matrix.platform }}\${{ matrix.configuration }}
# runInParallel: true
build-linux-cmake-default:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7']
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
pip install numpy
- name: configure
run: |
env
which python
mkdir target && cd target
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=${{ matrix.python-version }} -DENABLE_SWIG=ON
- name: build
run: |
cd target
# "-j" spawns too many processes causing GCC to crash
cmake --build . -j 12
- name: test
# should run w/o install
run: |
cd target
ctest --output-on-failure
- name: install
run: |
cd target
cmake --build . --target install
build-linux-cmake:
strategy:
matrix:
os: [ubuntu-latest]
configuration: [Debug, Release]
avx: [AVX512F]
name: ${{ matrix.os }}-${{ matrix.configuration }}-${{ matrix.avx }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: configure
run: |
mkdir out && cd out
cmake .. -DENABLE_PYTHON=OFF -DENABLE_${{ matrix.avx }}=ON
- name: build
run: |
cd out
# "-j" spawns too many processes causing GCC to crash
cmake --build . --config ${{ matrix.configuration }} -j 12
- name: test
# should run w/o install
run: |
cd out
ctest -C ${{ matrix.configuration }} --output-on-failure
build-waf:
strategy:
matrix:
os: [ubuntu-latest, windows-2019]
python-version: ['3.7']
debugging: ['--enable-debugging', '']
name: ${{ matrix.os }}-${{ matrix.python-version }}-waf${{ matrix.debugging }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: configure_with_swig
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install numpy
mkdir install${{ matrix.os }}Waf-Github
python waf configure --prefix="$PWD/install${{ matrix.os }}Waf-Github" --enable-swig ${{ matrix.debugging }}
- name: configure_without_swig
if: ${{ matrix.os == 'windows-2019' }}
run: |
pip install numpy
mkdir install${{ matrix.os }}Waf-Github
python waf configure --prefix="$PWD/install${{ matrix.os }}Waf-Github" ${{ matrix.debugging }}
- name: build
run: |
python waf build
- name: install
run: |
python waf install
- name: test
run: |
python waf install --alltests