forked from AMICI-dev/AMICI
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (85 loc) · 2.63 KB
/
test_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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Windows Tests
on:
push:
merge_group:
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
pull_request:
branches:
- develop
- master
jobs:
build:
name: Tests Windows
runs-on: windows-latest
env:
AMICI_SKIP_CMAKE_TESTS: "TRUE"
openBLAS_version: "0.3.19"
AMICI_DLL_DIRS: "C:\\BLAS\\OpenBLAS\\bin"
LIB: "C:/BLAS/OpenBLAS/lib"
CFLAGS: "-nologo"
CXXFLAGS: "-nologo"
LDFLAGS: "-nologo"
strategy:
matrix:
python-version: [ "3.11" ]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- shell: bash
run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- shell: bash
run: echo "C:\\BLAS\\OpenBLAS\\bin" >> $GITHUB_PATH
- shell: bash
run: echo "BLAS_LIBS=-LIBPATH:C:/BLAS/OpenBLAS/lib openblas.lib" >> $GITHUB_ENV
- shell: bash
run: echo "BLAS_CFLAGS=-IC:/BLAS/OpenBLAS/include/openblas/" >> $GITHUB_ENV
# Developer Command Prompt for Microsoft Visual C++
- uses: ilammy/msvc-dev-cmd@v1
- name: Install deps
shell: bash
run: |
python -m pip install --upgrade pip \
&& choco install -y ninja \
&& choco install -y swig
- name: Install OpenBLAS
shell: powershell
run: scripts/installOpenBLAS
- uses: actions/upload-artifact@v4
with:
name: OpenBLAS
path: C:\BLAS\OpenBLAS
- name: Create sdist
working-directory: python/sdist
run: pip install build && python -m build --sdist
- name: Install sdist
working-directory: python/sdist
shell: bash
run: pip install -v $(ls -t dist/amici-*.tar.gz | head -1)[petab,test]
- run: python -m amici
- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
shell: bash
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}
- name: Run Python tests
shell: bash
run: |
python -m pytest \
--ignore-glob=*petab* \
--ignore-glob=*special* \
--ignore-glob=*test_splines.py \
python/tests
- name: Python tests splines
if: ${{ github.base_ref == 'master' || github.event.merge_group.base_ref == 'master'}}
run: python -m pytest python/tests/test_splines.py