-
Notifications
You must be signed in to change notification settings - Fork 23
90 lines (86 loc) · 2.95 KB
/
nightly-build.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
84
85
86
87
88
89
90
name: Nightly Build
on:
workflow_dispatch
jobs:
# Builds documentation pdf file in cli/target/package and uploads artifact to docs
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Make documentation available
run: |
cd documentation
mvn -B -ntp -Dstyle.color=always -DskipTests=true package
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: documentation/target/generated-docs/*.pdf
# Downloads documentation docs artifact, builds all native images, archives native image for each os with documentation pdf file and uploads artifacts to f.e. natives-windows-latest
build-natives:
name: Build native images
needs: build-documentation
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21.0.2'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Download documentation
uses: actions/download-artifact@v4
with:
name: docs
path: ./cli/target/package
- name: Build native image
shell: bash
run: |
cd cli
mvn -B -ntp -Dideasy.assembly.id=${{ matrix.os }} -Pnative -DskipTests=true package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
name: natives-${{ matrix.os }}
path: cli/target/*.tar.gz
# Downloads all native image artifacts to cli/target and builds the project for deployment to OSSRH Nexus
deploy:
name: Build Project and Deploy
needs: [ build-documentation, build-natives ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Download natives and build project
uses: actions/download-artifact@v4
with:
pattern: natives-*
path: ./cli/target/
merge-multiple: true
- run: |
mvn -B -ntp -Dstyle.color=always install
- name: Deploy to OSSRH nexus
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Pdeploy deploy