-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (68 loc) · 2.6 KB
/
Copy pathci.yml
File metadata and controls
74 lines (68 loc) · 2.6 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
name: Unit tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
unittests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install HDF5 (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install h5utils
- name: Install HDF5 (Windows)
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
Try {h5diff.exe --version} Catch {
Invoke-WebRequest -Uri "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/bin/windows/hdf5-1.10.7-Std-win10_64-vs16.zip" -OutFile "${{ github.workspace }}\hdf.zip"
unzip "${{ github.workspace }}\hdf.zip"
Start-Process -FilePath msiexec.exe -ArgumentList /i, "${{ github.workspace }}\hdf\HDF5-1.10.7-win64.msi", /qn, /log, "${{ github.workspace }}\msi.log" -Wait
Try { cat "${{ github.workspace }}\msi.log" } Catch { "log file not found" }
echo "C:\Program Files\HDF_Group\HDF5\1.10.7\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
rm "${{ github.workspace }}\hdf.zip"
rm "${{ github.workspace }}\hdf\HDF5-1.10.7-win64.msi"
rm "${{ github.workspace }}\msi.log"
}
- name: Install HDF5 and CVXOPT (macOS)
if: ${{ runner.os == 'macOS' }}
env:
# see https://github.com/cvxopt/cvxopt/blob/master/.github/workflows/macos_build.yml
CVXOPT_SUITESPARSE_LIB_DIR: /opt/homebrew/lib
CVXOPT_SUITESPARSE_INC_DIR: /opt/homebrew/include/suitesparse
CVXOPT_BLAS_LIB_DIR: /opt/homebrew/opt/openblas/lib
CVXOPT_BLAS_LIB: openblas
CVXOPT_LAPACK_LIB: openblas
LDFLAGS: -L/opt/homebrew/opt/openblas/lib
CPPFLAGS: -I/opt/homebrew/opt/openblas/include
run: |
brew --prefix
brew install hdf5 openblas gsl fftw suite-sparse glpk
python -m pip install --upgrade pip
python -m pip install cvxopt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install .[roi]
- name: Test with pytest
run: >-
pytest
tests/test_core.py
tests/test_analyzer.py