CI: Hack PATH #373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: basictest_wincmake | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
# More platform information available on: | |
# https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md | |
# | |
# Nov-2024: windows-latest is windows-2022. We should try to exercise | |
# clang/gcc on this platform, and add a conda-based test. | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019, windows-2022] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: src | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
#NB: We don't test matplotlib import here in the next step, since we want | |
#to make sure that our CTest infrastructure correctly avoids problems from | |
#"building font cache" printouts on first imports. | |
- name: pip install extra deps | |
shell: cmd | |
run: | | |
python -mpip install numpy matplotlib gemmi spglib ase mpmath | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
python -c "import numpy; print('numpy imported ok')" | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
python -c "import gemmi; print('gemmi imported ok')" | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
python -c "import spglib; print('spglib imported ok')" | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
python -c "import ase; print('ase imported ok')" | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
python -c "import mpmath; print('mpmath imported ok')" | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
- name: CMake cfg NCrystal | |
shell: cmd | |
run: > | |
cmake -B build src | |
-DNCRYSTAL_ENABLE_TESTING=ON | |
-DNCRYSTAL_ENABLE_EXAMPLES=ON | |
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
-DMCTOOLS_REQUIRE_ALL_TEST_DEPS=ON | |
#NB: More verbosity by appending: "-- /verbosity:detailed": | |
- name: CMake build NCrystal | |
shell: cmd | |
run: cmake --build build --config Release -j 3 | |
#NB more verbosity by appending: "-VV": | |
- name: Run CTests | |
shell: cmd | |
run: | | |
cd build | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
ctest --build-config Release --output-on-failure --test-output-size-failed 100000 --test-output-truncation middle | |
if %errorlevel% neq 0 exit /b %errorlevel% |