1
1
name : release-main
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
release :
5
6
types : [published]
6
7
branches : [main]
7
8
8
9
jobs :
9
- publish :
10
+ build :
10
11
strategy :
11
- matrix : # python-version: ["3.9", "3.10", "3.11", "3.12"]
12
+ matrix :
13
+ # python-version: ["3.9", "3.10", "3.11", "3.12"]
12
14
python-version : ["3.11", "3.12"]
13
15
# os: [macos-13, windows-latest, ubuntu-latest, macos-14]
14
16
os : [ubuntu-latest, macos-14]
17
19
defaults :
18
20
run :
19
21
shell : bash
22
+
20
23
steps :
21
24
- name : Check out
22
25
uses : actions/checkout@v4
25
28
fetch-depth : 2
26
29
27
30
28
- - uses : actions/setup-python@v5
31
+ - name : Set up Python
32
+ uses : actions/setup-python@v5
29
33
with :
30
34
python-version : ${{ matrix.python-version }}
31
35
@@ -42,12 +46,12 @@ jobs:
42
46
native-image-job-reports : " true"
43
47
cache : " maven"
44
48
45
- - name : build entire project
49
+ - name : build VCell Java project from submodule
46
50
working-directory : vcell_submodule
47
51
run : |
48
52
mvn --batch-mode clean install dependency:copy-dependencies -DskipTests=true
49
53
50
- - name : test, record, and build/install native library (ubuntu)
54
+ - name : test, record, and build/install native library (ubuntu or macos )
51
55
working-directory : vcell-native
52
56
run : |
53
57
mvn --batch-mode clean install
58
62
"target/sbml-input"
59
63
60
64
mvn --batch-mode -P shared-dll package
61
- cp target/libvcell.so ../libvcell/_internal/libs
62
- if : ${{ startsWith(matrix.os, 'ubuntu') }}
63
-
64
- - name : test, record, and build/install native library (macos)
65
- working-directory : vcell-native
66
- run : |
67
- mvn --batch-mode clean install
68
-
69
- java -agentlib:native-image-agent=config-output-dir=target/recording \
70
- -jar target/vcell-native-1.0-SNAPSHOT.jar \
71
- "src/test/resources/TinySpacialProject_Application0.xml" \
72
- "target/sbml-input"
73
-
74
- mvn --batch-mode -P shared-dll package
75
- cp target/libvcell.dylib ../libvcell/_internal/libs
76
- if : ${{ startsWith(matrix.os, 'macos') }}
65
+ cp target/libvcell.so ../libvcell/lib || true
66
+ cp target/libvcell.dylib ../libvcell/lib || true
67
+ if : ${{ startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') }}
77
68
78
69
- name : test, record, and build/install native library (windows)
79
70
working-directory : vcell-native
83
74
java -agentlib:native-image-agent=config-output-dir=target\recording -jar "target\vcell-native-1.0-SNAPSHOT.jar" "src\test\resources\TinySpacialProject_Application0.xml" "target\sbml-input"
84
75
85
76
mvn --batch-mode -P shared-dll package
86
- cp target/libvcell.dll ../libvcell/_internal/libs
77
+ cp target/libvcell.dll ../libvcell/lib
87
78
if : ${{ startsWith(matrix.os, 'windows') }}
88
79
89
80
- name : Install python dependencies
@@ -96,14 +87,33 @@ jobs:
96
87
id : vars
97
88
run : echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
98
89
99
- - name : Build and publish
90
+ - name : Build wheels
100
91
run : |
101
- source .venv/bin/activate
102
- poetry version $RELEASE_VERSION
103
- make build-and-publish
104
- env :
105
- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
106
- RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
92
+ pip install cibuildwheel
93
+ cibuildwheel --output-dir wheelhouse
94
+
95
+ - name : Upload wheels as artifacts
96
+ uses : actions/upload-artifact@v4
97
+ with :
98
+ name : wheels
99
+ path : wheelhouse/*.whl
100
+
101
+ publish :
102
+ needs : build
103
+ runs-on : ubuntu-latest
104
+ steps :
105
+ - name : Download wheels
106
+ uses : actions/download-artifact@v4
107
+ with :
108
+ name : wheels
109
+ path : wheelhouse
110
+
111
+ - name : Publish to PyPI
112
+
113
+ with :
114
+ password : ${{ secrets.PYPI_TOKEN }}
115
+ packages_dir : wheelhouse
116
+
107
117
deploy-docs :
108
118
needs : publish
109
119
runs-on : ubuntu-latest
0 commit comments