-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (69 loc) · 2.33 KB
/
gradle.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: PaperBin Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: "Nativeloadhook linux"
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --manifest-path nativeloadhook/Cargo.toml --release --target x86_64-unknown-linux-gnu
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-gnu
override: true
- name: "Nativeloadhook Windows"
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --manifest-path nativeloadhook/Cargo.toml --release --target x86_64-pc-windows-gnu
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
override: true
- name: "Nativeloadhook Mac"
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --manifest-path nativeloadhook/Cargo.toml --release --target x86_64-apple-darwin
- name: "Move native libs to build folder"
run: |
"mv nativeloadhook/target/x86_64-unknown-linux-gnu/release/libJvmClassHook.so ./build/libs"
"mv nativeloadhook/target/x86_64-pc-windows-gnu/release/JvmClassHook.dll ./build/libs"
"mv nativeloadhook/target/x86_64-apple-darwin/release/libJvmClassHook.dylib ./build/libs"
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup paper
run: |
chmod +x "${GITHUB_WORKSPACE}/.github/workflows/setup.sh"
"${GITHUB_WORKSPACE}/.github/workflows/setup.sh"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Java
run: ./gradlew build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2.2.2
with:
name: paperbin
path: ./build/libs/*