11name : release-main
22
33on :
4+ workflow_dispatch :
45 release :
56 types : [published]
67 branches : [main]
78
89jobs :
9- publish :
10+ build :
1011 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"]
1214 python-version : ["3.11", "3.12"]
13- # os: [macos-13, windows-latest, ubuntu-latest, macos-14]
14- os : [ubuntu-latest, macos-14]
15+ os : [macos-13, windows-latest, ubuntu-latest, macos-14]
16+ # os: [ubuntu-latest, macos-14]
1517 fail-fast : false
1618 runs-on : ${{ matrix.os }}
1719 defaults :
1820 run :
1921 shell : bash
22+
2023 steps :
2124 - name : Check out
2225 uses : actions/checkout@v4
2326 with :
2427 submodules : true
2528 fetch-depth : 2
2629
27-
28- - uses : actions/setup-python@v5
30+ - name : Set up Python
31+ uses : actions/setup-python@v5
2932 with :
3033 python-version : ${{ matrix.python-version }}
3134
4245 native-image-job-reports : " true"
4346 cache : " maven"
4447
45- - name : build entire project
46- working-directory : vcell_submodule
47- run : |
48- mvn --batch-mode clean install dependency:copy-dependencies -DskipTests=true
49-
50- - name : test, record, and build/install native library (ubuntu)
51- working-directory : vcell-native
52- run : |
53- mvn --batch-mode clean install
54-
55- java -agentlib:native-image-agent=config-output-dir=target/recording \
56- -jar target/vcell-native-1.0-SNAPSHOT.jar \
57- "src/test/resources/TinySpacialProject_Application0.xml" \
58- "target/sbml-input"
59-
60- 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') }}
77-
78- - name : test, record, and build/install native library (windows)
79- working-directory : vcell-native
80- run : |
81- mvn --batch-mode clean install
82-
83- 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-
85- mvn --batch-mode -P shared-dll package
86- cp target/libvcell.dll ../libvcell/_internal/libs
87- if : ${{ startsWith(matrix.os, 'windows') }}
88-
8948 - name : Install python dependencies
9049 run : poetry install --no-interaction
9150
@@ -104,8 +63,15 @@ jobs:
10463 env :
10564 PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
10665 RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
66+
67+ - name : Setup tmate
68+ if : failure()
69+ uses : mxschmitt/action-tmate@v3
70+ with :
71+ limit-access-to-actor : true
72+
10773 deploy-docs :
108- needs : publish
74+ needs : build
10975 runs-on : ubuntu-latest
11076 steps :
11177 - name : Check out
@@ -114,5 +80,23 @@ jobs:
11480 - name : Set up the environment
11581 uses : ./.github/actions/setup-poetry-env
11682
83+ - name : Set up Python
84+ uses : actions/setup-python@v5
85+ with :
86+ python-version : ${{ matrix.python-version }}
87+
88+ - uses : abatilo/actions-poetry@v3
89+
90+ - name : setup graalvm for static native build
91+ uses : graalvm/setup-graalvm@v1
92+ with :
93+ java-version : " 23"
94+ distribution : " graalvm-community"
95+ github-token : ${{ secrets.GITHUB_TOKEN }}
96+ components : " native-image"
97+ # native-image-musl: 'true' # Now semi-static by not including libc
98+ native-image-job-reports : " true"
99+ cache : " maven"
100+
117101 - name : Deploy documentation
118102 run : poetry run mkdocs gh-deploy --force
0 commit comments