Skip to content

Commit 3099480

Browse files
committed
add PR GitHub workflow
1 parent e20f514 commit 3099480

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/pr.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Pull Requests
2+
on: pull_request_target
3+
4+
env:
5+
graalvm_version: '22.1.0'
6+
java_version: '11'
7+
8+
jobs:
9+
# Build native executable per runner
10+
build:
11+
name: 'Build with Graal on ${{ matrix.os }}'
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ ubuntu-latest, macOS-latest, windows-latest ]
16+
runs-on: ${{ matrix.os }}
17+
timeout-minutes: 90
18+
19+
steps:
20+
- name: 'Check out repository'
21+
uses: actions/checkout@v2
22+
23+
- name: Install upx in Linux
24+
run: sudo apt-get install upx
25+
if: ${{ runner.os == 'Linux' }}
26+
27+
- name: Install upx in macOS
28+
run: brew install upx
29+
if: ${{ runner.os == 'macOS' }}
30+
31+
- name: Install upx in Windows
32+
run: choco install upx
33+
if: ${{ runner.os == 'Windows' }}
34+
35+
- name: Set up GraalVM (Java ${{ env.java_version }})
36+
uses: graalvm/setup-graalvm@v1
37+
with:
38+
version: '${{ env.graalvm_version }}'
39+
java-version: '${{ env.java_version }}'
40+
components: 'native-image'
41+
42+
- name: echo graalvm info
43+
run: |
44+
echo "GRAALVM_HOME: $GRAALVM_HOME"
45+
echo "JAVA_HOME: $JAVA_HOME"
46+
java --version
47+
48+
- name: 'Cache Maven packages'
49+
uses: actions/cache@v2.1.7
50+
with:
51+
path: ~/.m2
52+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
53+
restore-keys: ${{ runner.os }}-m2
54+
55+
- name: 'Create distribution'
56+
run: mvn -B --file pom.xml -Pnative -DskipTests -pl iot.technology:toolkit-app package -am
57+
- uses: kentaro-m/auto-assign-action@v1.1.2
58+
with:
59+
configuration-path: ".github/auto_assign.yml"
60+

0 commit comments

Comments
 (0)