-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (88 loc) · 2.62 KB
/
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: MigTool continuous build
# read more here
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#on
on:
push:
branches:
- '*'
- '!refs/tags/.*'
tags-ignore:
- '*'
jobs:
build:
name: Migtool build
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
steps:
- name: Environment
run: env | sort
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Graalvm
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.8'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install native-image component
run: gu install native-image
- name: Tests
run: ./gradlew check
- name: Tests reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: linux-test-reports
path: build/reports/tests/test/
overwrite: true
- name: Build Native Image
run: ./gradlew nativeCompile
- name: Upload linux native image artifact
uses: actions/upload-artifact@v4
with:
name: migtool_linux
path: build/native/nativeCompile/migtool
overwrite: true
- name: Tests native
run: ./gradlew cleanTest check
env:
NATIVE_BINARY_PATH: build/native/nativeCompile/migtool
- name: TestsNative reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: linux-testsNative-reports
path: build/reports/tests/nativeCliTest/
overwrite: true
release:
name: Release
if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@v2
- name: Setup Java for JReleaser
uses: actions/setup-java@v1
with:
java-version: 17
- name: Version
id: version
run: |
VERSION=$(cat ./VERSION)
echo "VERSION = $VERSION"
echo "::set-output name=VERSION::$VERSION"
- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}