-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (61 loc) · 1.87 KB
/
build_fj-doc-native-quarkus_test.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
# CI native modules build and test
#
# v1.0.0
#
# This workflow will use the qurkus project :
# fj-doc-native-quarkus
#
# to test native enabled modules of https://github.com/fugerit-org/fj-doc :
# fj-doc-base
# fj-doc-freemarker
#
# see https://venusdocs.fugerit.org/guide/#doc-handler-module-handlers
name: CI native modules build and test
on:
push:
branches:
- develop
- assessment/native_image
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
distribution: [ 'graalvm' ]
java: [ '21', '23' ]
os: [ 'ubuntu-latest' ]
name: Build native image ${{ matrix.os }} ${{ matrix.java }} (${{ matrix.distribution }})
steps:
# checkout
- uses: actions/checkout@main
with:
fetch-depth: 0
# setup latest GraalVM LTS
- uses: actions/setup-java@main
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@main
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
# build all projects modules
- name: Build project
run: mvn clean install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# build and test native module (quarkus project, see https://quarkus.io/guides/building-native-image)
- name: Native build and test
run: |
cd fj-doc-native-quarkus
echo "*** 1. build native executable ***"
mvn verify package -Dnative -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true -P test
echo "*** 2. test native executable ***"
mvn verify test-compile failsafe:integration-test -Dnative