-
-
Notifications
You must be signed in to change notification settings - Fork 36
59 lines (49 loc) · 1.62 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Basix CI on Windows
on:
pull_request:
branches:
- main
push:
tags:
- "v*"
branches:
- "**"
merge_group:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
env:
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 -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
python -m pip -v install .[ci] --config-settings=cmake.args=-DBasix_DIR=D:/a/basix/install/lib/cmake/basix
- name: Run C++ demos
run: python -m pytest demo/cpp/test.py --cmake-args="-DBasix_DIR=D:/a/basix/install/lib/cmake/basix"
- name: Run units tests
run: |
python -m pip install pytest-xdist
python -m pytest -n auto --durations 20 test/
- name: Run python demos
run: python -m pytest demo/python/test.py