@@ -135,3 +135,100 @@ runs:
135
135
tail -n1 test_xfailed.log
136
136
echo "Return Code: ${RETCODE}"
137
137
exit $RETCODE
138
+
139
+ - name : Build and Install cppyy-backend
140
+ if : ${{ matrix.cppyy == 'On' && runner.os == 'Windows' }}
141
+ shell : powershell
142
+ run : |
143
+ # Download cppyy-backend
144
+ git clone --depth=1 https://github.com/compiler-research/cppyy-backend.git
145
+ cd cppyy-backend
146
+ mkdir $env:CPPINTEROP_DIR\lib
147
+ mkdir build
148
+ cd build
149
+ # Install CppInterOp
150
+ cd $env:CPPINTEROP_BUILD_DIR
151
+ cmake --build . --target install --parallel ${{ env.ncpus }}
152
+ cd ..\cppyy-backend\build\
153
+ # Build and Install cppyy-backend
154
+ $env:INCLUDE=$env:CPLUS_INCLUDE_PATH
155
+ cmake -DCppInterOp_DIR=$env:CPPINTEROP_DIR ..
156
+ cmake --build . --parallel ${{ env.ncpus }}
157
+ cp libcppyy-backend.lib $env:CPPINTEROP_DIR\lib\
158
+ cd ..
159
+
160
+ - name : Install CPyCppyy
161
+ if : ${{ matrix.cppyy == 'On' && runner.os == 'Windows' }}
162
+ shell : powershell
163
+ run : |
164
+ python -m venv .venv
165
+ . .\.venv\Scripts\Activate.ps1
166
+ # Install CPyCppyy
167
+ git clone --depth=1 https://github.com/compiler-research/CPyCppyy.git
168
+ mkdir CPyCppyy\build
169
+ cd CPyCppyy\build
170
+ cmake ..
171
+ cmake --build . --parallel ${{ env.ncpus }}
172
+ #
173
+ env:CPYCPPYY_DIR = $PWD.Path
174
+ cd ../..
175
+ # We need CPYCPPYY_DIR later
176
+ echo "CPYCPPYY_DIR=$env:CPYCPPYY_DIR" >> $env:GITHUB_ENV
177
+
178
+ - name : Install cppyy
179
+ if : ${{ matrix.cppyy == 'On' && runner.os == 'Windows' }}
180
+ shell : powershell
181
+ run : |
182
+ # source virtual environment
183
+ . .\.venv\Scripts\Activate.ps1
184
+ # Install cppyy
185
+ git clone --depth=1 https://github.com/compiler-research/cppyy.git
186
+ cd cppyy
187
+ python -m pip install --upgrade . --no-deps
188
+ cd ..
189
+
190
+ - name : Run cppyy
191
+ if : ${{ matrix.cppyy == 'On' && runner.os == 'Windows' }}
192
+ shell : powershell
193
+ run : |
194
+ # Run cppyy
195
+ . .\.venv\Scripts\Activate.ps1
196
+ $env:PYTHONPATH=$env:PYTHONPATH:$env:CPYCPPYY_DIR:$env:CB_PYTHON_DIR
197
+ python -c "import cppyy"
198
+ # We need PYTHONPATH later
199
+ echo "PYTHONPATH=$env:PYTHONPATH" >> $GITHUB_ENV
200
+
201
+ - name : Run the tests
202
+ if : ${{ matrix.cppyy == 'On' && runner.os == 'Windows' }}
203
+ shell : powershell
204
+ run : |
205
+ # Run the tests
206
+ . .\.venv\Scripts\Activate.ps1
207
+ cd cppyy\test
208
+ echo ::group::Prepare For Testing
209
+ make all
210
+ python -m pip install --upgrade pip
211
+ python -m pip install pytest
212
+ python -m pip install pytest-xdist
213
+ python -m pip install numba
214
+ echo ::endgroup::
215
+ echo ::group::Run complete test suite
216
+ $ErrorActionPreference = "Stop"
217
+ python -m pytest -sv -ra 2>&1 | Tee-Object -FilePath complete_testrun.log
218
+ $ErrorActionPreference = "Continue"
219
+ echo ::group::Crashing Test Logs
220
+ # See if we don't have a crash that went away
221
+ # Comment out all xfails but the ones that have a run=False condition.
222
+ find.exe . -name "*.py" -exec sed.exe -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
223
+ python -m pytest -n 1 -m "xfail" --runxfail -sv -ra --max-worker-restart 512 2>&1 | Tee-Object -FilePath test_crashed.log
224
+ $LASTEXITCODE = 0
225
+ git checkout .
226
+ echo ::endgroup::
227
+ echo ::group::XFAIL Test Logs
228
+ # Rewrite all xfails that have a run clause to skipif. This way we will
229
+ # avoid conditionally crashing xfails
230
+ find.exe . -name "*.py" -exec sed.exe -i -E 's/(^ *)@mark.xfail\(run=(.*)/\[email protected] (condition=not \2/g' {} \;
231
+ # See if we don't have an xfail that went away
232
+ python -m pytest --runxfail -sv -ra | tee test_xfailed.log 2>&1 || true
233
+ git checkout .
234
+ echo ::endgroup::
0 commit comments