Skip to content

Windows Tests

Windows Tests #9493

Workflow file for this run

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: 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