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