-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.39 KB
/
build.yaml
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
name: Build
on:
push:
branches:
- main
pull_request:
merge_group:
env:
JAVA_VERSION: '21'
jobs:
build:
name: 'Build convert on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macOS-latest ]
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- name: 'Setup GraalVM ${{ env.GRAAL_VERSION }}'
uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: ${{ env.JAVA_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
native-image-musl: ${{ matrix.os == 'ubuntu-latest' }}
cache: 'gradle'
- name: 'Check'
run: ./gradlew check --no-daemon
- name: 'Native test'
run: ./gradlew nativeTest --no-daemon
- name: 'Native compile'
run: ./gradlew nativeCompile --no-daemon
- name: 'Compress with UPX'
if: ${{ runner.os == 'Linux' }}
uses: crazy-max/ghaction-upx@v3
with:
version: latest
files: |
./build/native/nativeCompile/convert
args: --best
- name: 'Add convert to PATH'
run: echo "${{ github.workspace }}/build/native/nativeCompile" >> $GITHUB_PATH
- name: 'End to end test'
run: ./gradlew e2e --no-daemon