forked from qupath/qupath
-
Notifications
You must be signed in to change notification settings - Fork 13
77 lines (63 loc) · 2.27 KB
/
jpackage.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
# This workflow will build a Java project with Gradle, then create an image with jpackage
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build packages with jpackage
on:
- workflow_dispatch
- workflow_call
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-latest
name: Linux
- platform: macos-12 # x64
name: Mac-x64
- platform: macos-14 # aarch64
name: Mac-arm64
- platform: windows-latest
name: Windows
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Get qupath version from gradle
shell: bash
run: |
# grep reads the version line, sed strips everything before =
# GITHUB_ENV means it's stored in ${{env.QUPATH_VERSION}} persistently
# not just for the current step...
echo "QUPATH_VERSION=$(grep 'qupathVersion = \".*\"' settings.gradle | sed -e 's/.*= \"\(.*\)\"/\1/')" >> $GITHUB_ENV
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Assemble javadocs
run: ./gradlew assembleJavadocs
- name: Build with Gradle
run: ./gradlew jpackage -P git-commit=true -P package=installer mergedJavadoc createChecksums -P toolchain=21
- name: Make Linux tar.xz
if: matrix.name == 'Linux'
shell: bash
run: |
tar -c -C build/dist/ QuPath | xz > build/dist/QuPath-v${{ env.QUPATH_VERSION }}-${{ matrix.name }}.tar.xz
rm -r build/dist/QuPath/
- name: Clean windows artifact
if: matrix.name == 'Windows'
shell: bash
run: |
rm -r build/dist/QuPath-${{ env.QUPATH_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: QuPath-v${{ env.QUPATH_VERSION }}-${{ matrix.name }}
path: build/dist/QuPath*
retention-days: 1
- uses: actions/upload-artifact@v4
if: matrix.name == 'Mac-arm64'
with:
name: javadoc-QuPath-v${{ env.QUPATH_VERSION }}
path: build/docs-merged/javadoc
retention-days: 7