-
Notifications
You must be signed in to change notification settings - Fork 10
83 lines (80 loc) · 3.47 KB
/
build-jlink.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
78
79
80
81
82
83
name: Build-jlink
on:
push:
branches: '*'
tags: 'v*'
pull_request:
branches: '*'
jobs:
# builds the jlink versions of the teamscale-upload tool and stores them in a temporary gradle-workflow storage
build-jlink:
name: JLink build (all target platforms)
# Build on a fixed version, for stability of the release artifacts.
# In the graalvm build, this also ensures a fixed version of Glibc, but I think that is not required in the jlink
# build (because we distribute a JVM, not build an executable).
runs-on: ubuntu-20.04
steps:
- name: 'Checkout project sources'
uses: actions/checkout@v4
- name: 'Setup Gradle'
uses: gradle/actions/setup-gradle@v3
- name: 'Clean'
run: ./gradlew clean
- name: 'Build Linux'
run: ./gradlew customRuntimeZip-linux-x86_64
- name: 'Test Dist on Linux'
env:
TEAMSCALE_ACCESS_KEY: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
run: ./gradlew test
- name: 'Build Windows'
run: ./gradlew customRuntimeZip-windows-x86_64
- name: 'Build MacOS Intel'
run: ./gradlew customRuntimeZip-macos-x86_64
- name: 'Build MacOS ARM'
run: ./gradlew customRuntimeZip-macos-aarch64
- name: 'Upload Distributions to temporary Workflow Artifacts Storage'
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: target-jlink
# Path to generated jlink distributions on the current machine.
#
# We prefer to list the paths explicitly (rather than copy the entire folder) to document
# which paths can be expected in the upload folder.
#
# We can download the artifacts (for debugging) as documented here: https://docs.github.com/en/actions/managing-workflow-runs/downloading-workflow-artifacts
path: |
./build/distributions/teamscale-upload-linux-x86_64.zip
./build/distributions/teamscale-upload-windows-x86_64.zip
./build/distributions/teamscale-upload-macos-x86_64.zip
./build/distributions/teamscale-upload-macos-aarch64.zip
retention-days: 5
# fail if the zip files are not found
if-no-files-found: error
# uploads the jlink distributions built by the build-jlink job to a public storage (public release job)
release-jlink:
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build-jlink
name: Create Release (jlink)
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: List downloaded distributions
run: ls -1 target-jlink
- name: Rename Distributions
run: |
(mv ./target-jlink/teamscale-upload-linux-x86_64.zip ./target-jlink/teamscale-upload-jlink-linux-x86_64.zip)
(mv ./target-jlink/teamscale-upload-windows-x86_64.zip ./target-jlink/teamscale-upload-jlink-windows-x86_64.zip)
(mv ./target-jlink/teamscale-upload-macos-x86_64.zip ./target-jlink/teamscale-upload-jlink-macos-x86_64.zip)
(mv ./target-jlink/teamscale-upload-macos-aarch64.zip ./target-jlink/teamscale-upload-jlink-macos-aarch64.zip)
(ls -1 target-jlink)
- name: Upload Release Assets
id: create_release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: target-jlink/teamscale-upload-jlink-*.zip
file_glob: true
overwrite: true