@@ -19,30 +19,100 @@ jobs:
1919 path : ~/.cache/pre-commit
2020 key : pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
2121
22- - name : Set up the environment
23- uses : ./.github/actions/setup-poetry-env
22+ - uses : actions/setup-python@v5
23+ with :
24+ python-version : " 3.11"
25+
26+ - uses : abatilo/actions-poetry@v3
27+
28+ - name : Install python dependencies
29+ run : poetry install --no-interaction
2430
2531 - name : Run checks
2632 run : make check
2733
2834 tests-and-type-check :
29- runs-on : ubuntu-latest
3035 strategy :
31- matrix :
32- python-version : ["3.9", "3.10", "3.11", "3.12"]
36+ matrix : # python-version: ["3.9", "3.10", "3.11", "3.12"]
37+ python-version : ["3.11", "3.12"]
38+ # os: [macos-13, windows-latest, ubuntu-latest, macos-14]
39+ os : [ubuntu-latest, macos-14]
3340 fail-fast : false
41+ runs-on : ${{ matrix.os }}
3442 defaults :
3543 run :
3644 shell : bash
3745 steps :
3846 - name : Check out
3947 uses : actions/checkout@v4
48+ with :
49+ submodules : true
50+ fetch-depth : 2
4051
41- - name : Set up the environment
42- uses : ./.github/actions/setup-poetry-env
52+ - uses : actions/setup-python@v5
4353 with :
4454 python-version : ${{ matrix.python-version }}
4555
56+ - uses : abatilo/actions-poetry@v3
57+
58+ - name : setup graalvm for static native build
59+ uses : graalvm/setup-graalvm@v1
60+ with :
61+ java-version : " 23"
62+ distribution : " graalvm-community"
63+ github-token : ${{ secrets.GITHUB_TOKEN }}
64+ components : " native-image"
65+ # native-image-musl: 'true' # Now semi-static by not including libc
66+ native-image-job-reports : " true"
67+ cache : " maven"
68+
69+ - name : build entire project
70+ working-directory : vcell_submodule
71+ run : |
72+ mvn --batch-mode clean install dependency:copy-dependencies -DskipTests=true
73+
74+ - name : test, record, and build/install native library (ubuntu)
75+ working-directory : vcell-native
76+ run : |
77+ mvn --batch-mode clean install
78+
79+ java -agentlib:native-image-agent=config-output-dir=target/recording \
80+ -jar target/vcell-native-1.0-SNAPSHOT.jar \
81+ "src/test/resources/TinySpacialProject_Application0.xml" \
82+ "target/sbml-input"
83+
84+ mvn --batch-mode -P shared-dll package
85+ cp target/libvcell.so ../libvcell/_internal/libs
86+ if : ${{ startsWith(matrix.os, 'ubuntu') }}
87+
88+ - name : test, record, and build/install native library (macos)
89+ working-directory : vcell-native
90+ run : |
91+ mvn --batch-mode clean install
92+
93+ java -agentlib:native-image-agent=config-output-dir=target/recording \
94+ -jar target/vcell-native-1.0-SNAPSHOT.jar \
95+ "src/test/resources/TinySpacialProject_Application0.xml" \
96+ "target/sbml-input"
97+
98+ mvn --batch-mode -P shared-dll package
99+ cp target/libvcell.dylib ../libvcell/_internal/libs
100+ if : ${{ startsWith(matrix.os, 'macos') }}
101+
102+ - name : test, record, and build/install native library (windows)
103+ working-directory : vcell-native
104+ run : |
105+ mvn --batch-mode clean install
106+
107+ 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"
108+
109+ mvn --batch-mode -P shared-dll package
110+ cp target/libvcell.dll ../libvcell/_internal/libs
111+ if : ${{ startsWith(matrix.os, 'windows') }}
112+
113+ - name : Install python dependencies
114+ run : poetry install --no-interaction
115+
46116 - name : Run tests
47117 run : poetry run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
48118
@@ -53,14 +123,26 @@ jobs:
53123 uses : codecov/codecov-action@v4
54124 if : ${{ matrix.python-version == '3.11' }}
55125
126+ - name : Setup tmate
127+ if : failure()
128+ uses : mxschmitt/action-tmate@v3
129+ with :
130+ limit-access-to-actor : true
131+
56132 check-docs :
57133 runs-on : ubuntu-latest
58134 steps :
59135 - name : Check out
60136 uses : actions/checkout@v4
61137
62- - name : Set up the environment
63- uses : ./.github/actions/setup-poetry-env
138+ - uses : actions/setup-python@v5
139+ with :
140+ python-version : " 3.11"
141+
142+ - uses : abatilo/actions-poetry@v3
143+
144+ - name : Install python dependencies
145+ run : poetry install --no-interaction
64146
65147 - name : Check if documentation can be built
66148 run : poetry run mkdocs build -s
0 commit comments