Windows build #69
Workflow file for this run
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: Basix CI on Windows | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
tags: | |
- "v*" | |
branches: | |
- "**" | |
merge_group: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and test (Windows) | |
runs-on: windows-2022 | |
env: | |
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBasix_DIR=D:/a/basix/install/lib/cmake/basix | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Basix C++ library | |
run: | | |
cd cpp | |
cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -B build-dir -S . | |
cmake --build build-dir --config Release | |
cmake --install build-dir --config Release --prefix D:/a/basix/install | |
- name: Install Basix Python wrapper | |
run: | | |
cd python | |
pip install scikit-build-core[pyproject] nanobind | |
pip -v install .[ci] | |
- name: Run units tests | |
run: | | |
pip install pytest-xdist | |
pytest -n auto --durations 20 test/ | |
- name: Run python demos | |
run: pytest demo/python/test.py | |
- name: Run C++ demos | |
run: pytest demo/cpp/test.py |