-
Notifications
You must be signed in to change notification settings - Fork 33
84 lines (68 loc) · 2 KB
/
test_windows.yml
File metadata and controls
84 lines (68 loc) · 2 KB
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
name: Windows Tests
on:
push:
merge_group:
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
pull_request:
branches:
- main
jobs:
build:
name: Tests Windows
runs-on: windows-latest
env:
AMICI_SKIP_CMAKE_TESTS: "TRUE"
CFLAGS: "-nologo"
CXXFLAGS: "-nologo"
LDFLAGS: "-nologo"
strategy:
matrix:
python-version: [ "3.11" ]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5
with:
lfs: true
- run: git fetch --prune --unshallow
- shell: bash
run: echo "AMICI_DIR=$(pwd)" >> $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
- 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