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