-
Notifications
You must be signed in to change notification settings - Fork 119
106 lines (104 loc) · 2.65 KB
/
build.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
104
105
106
name: Build FMPy
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
jobs:
build-wheels:
strategy:
matrix:
include:
- name: windows
image: windows-2022
- name: linux
image: ubuntu-20.04
- name: darwin
image: macos-13
runs-on: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python -m pip install setuptools wheel attrs numpy PySide6 requests
- run: python build_cvode.py
- run: python build_binaries.py
- if: matrix.name == 'linux' || matrix.name == 'windows'
run: python build_remoting.py
- run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: dist
if-no-files-found: error
merge-wheels:
runs-on: ubuntu-22.04
needs: [ build-wheels ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: linux
path: wheels/linux
- uses: actions/download-artifact@v4
with:
name: darwin
path: wheels/darwin
- uses: actions/download-artifact@v4
with:
name: windows
path: wheels/windows
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python merge_wheels.py
- uses: actions/upload-artifact@v4
with:
name: merged
path: wheels/merged
if-no-files-found: error
run-tests:
strategy:
matrix:
include:
- name: windows
image: windows-2022
- name: linux
image: ubuntu-22.04
- name: darwin
image: macos-13
runs-on: ${{ matrix.image }}
needs: [ merge-wheels ]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: JesseTG/rm@b0586afffd89db69f7309bd44cc90209173fdbbe
with:
path: fmpy
- uses: actions/download-artifact@v4
with:
name: merged
path: .
- run: ls
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- if: matrix.name == 'linux' || matrix.name == 'darwin'
run: |
for f in FMPy-*.whl; do
python -m pip install $f[complete]
done
- if: matrix.name == 'windows'
run: |
$files = Get-ChildItem "FMPy-*.whl"
foreach ($f in $files) {
$name = $f.FullName + "[complete]"
python -m pip install $name
}
- run: python -m pip install pytest
- run: pytest tests