|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | publish: |
10 | | - runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + matrix: # python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 12 | + python-version: ["3.11", "3.12"] |
| 13 | + # os: [macos-13, windows-latest, ubuntu-latest, macos-14] |
| 14 | + os: [ubuntu-latest, macos-14] |
| 15 | + fail-fast: false |
| 16 | + runs-on: ${{ matrix.os }} |
| 17 | + defaults: |
| 18 | + run: |
| 19 | + shell: bash |
11 | 20 | steps: |
12 | 21 | - name: Check out |
13 | 22 | uses: actions/checkout@v4 |
| 23 | + with: |
| 24 | + submodules: true |
| 25 | + fetch-depth: 2 |
14 | 26 |
|
15 | | - - name: Set up the environment |
16 | | - uses: ./.github/actions/setup-poetry-env |
| 27 | + |
| 28 | + - uses: actions/setup-python@v5 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + |
| 32 | + - uses: abatilo/actions-poetry@v3 |
| 33 | + |
| 34 | + - name: setup graalvm for static native build |
| 35 | + uses: graalvm/setup-graalvm@v1 |
| 36 | + with: |
| 37 | + java-version: "23" |
| 38 | + distribution: "graalvm-community" |
| 39 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + components: "native-image" |
| 41 | + # native-image-musl: 'true' # Now semi-static by not including libc |
| 42 | + native-image-job-reports: "true" |
| 43 | + cache: "maven" |
| 44 | + |
| 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 | + |
| 89 | + - name: Install python dependencies |
| 90 | + run: poetry install --no-interaction |
| 91 | + |
| 92 | + - name: Run tests |
| 93 | + run: poetry run pytest tests |
17 | 94 |
|
18 | 95 | - name: Export tag |
19 | 96 | id: vars |
|
0 commit comments