-
Notifications
You must be signed in to change notification settings - Fork 7.5k
108 lines (99 loc) · 2.93 KB
/
build-vmtool.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
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
105
106
107
108
name: build vmtool
on:
workflow_dispatch:
jobs:
build-linux-x64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: ./mvnw package
- uses: actions/upload-artifact@v3
with:
name: lib
path: arthas-vmtool/target/libArthasJniLibrary-x64.so
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: ./mvnw package
- uses: actions/upload-artifact@v3
with:
name: lib
path: arthas-vmtool/target/libArthas*
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: ./mvnw package
- uses: actions/upload-artifact@v3
with:
name: lib
path: arthas-vmtool/target/*.dll
build-linux-aarch64:
# The host should always be Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu20.04
# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}
run: |
apt update && apt install openjdk-8-jdk g++ -y
./mvnw package -pl common,arthas-vmtool
cp arthas-vmtool/target/libArthas* lib/
- uses: actions/upload-artifact@v3
with:
name: lib
path: arthas-vmtool/target/libArthas*
commit_vmtool_files:
runs-on: ubuntu-20.04
needs: [build-linux-x64, build-linux-aarch64, build-mac, build-windows]
steps:
- name: Checkout Upstream Repo
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: lib
path: tmplib
- name: Display structure of downloaded files
run: ls -R
working-directory: tmplib
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
mv tmplib/* lib/
git add lib/
git commit -m "update arthas vmtool lib"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}