Skip to content

Merge branch 'jhale/windows-build' of github.com:FEniCS/basix into jh… #30

Merge branch 'jhale/windows-build' of github.com:FEniCS/basix into jh…

Merge branch 'jhale/windows-build' of github.com:FEniCS/basix into jh… #30

Workflow file for this run

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 -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_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -B build-dir -S . # Use make (not ninja)
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 --no-build-isolation .
- name: Install Basix (combined)
run: |
pip install nanobind scikit-build-core[pyproject]
pip -v install --no-build-isolation .
- 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