This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
119 lines (111 loc) · 4.79 KB
/
ci.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI
on: [ push ]
jobs:
build-binaries-unix:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest ]
name: ${{ matrix.os }} build
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build native with gradle
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight ultralight-java-native:build"
shell: bash
- name: Build gpu driver native with gradle
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu ultralight-java-gpu-native:build"
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight
path: native-binaries/ultralight
- name: Upload gpu artifacts
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight-gpu
path: native-binaries/ultralight-gpu
build-binaries-windows:
name: windows-latest build
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build native with gradle (Windows)
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight ultralight-java-native:build"
shell: cmd
- name: Build gpu driver native with gradle (Windows)
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu ultralight-java-gpu-native:build"
shell: cmd
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight
path: native-binaries/ultralight
- name: Upload gpu artifacts
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight-gpu
path: native-binaries/ultralight-gpu
build-jars:
needs: [ build-binaries-unix, build-binaries-windows ]
runs-on: ubuntu-latest # Doesn't matter, but linux tends to be the fastest
name: Build final jars
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Download existing artifacts
uses: actions/download-artifact@v1
with:
name: native-binaries-ultralight
path: native-binaries/ultralight
- name: Download existing gpu artifacts
uses: actions/download-artifact@v1
with:
name: native-binaries-ultralight-gpu
path: native-binaries/ultralight-gpu
- name: Make gradlew executable
run: "chmod +x gradlew"
- name: Build base with gradle
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight ultralight-java-base:build"
- name: Build gpu driver with gradle
run: './gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu ultralight-java-gpu:build'
- name: Build lwjgl3-opengl example with gradle
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu example:lwjgl3-opengl:build"
- name: Check license
run: "./gradlew licenseCheck"
- name: Deploy to OSSHR
if: github.ref == 'refs/heads/master'
run: "./gradlew -PCI=true -PenableSigning -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu publish"
env:
FLINT_DISTRIBUTOR_PUBLISH_TOKEN: ${{ secrets.FLINT_DISTRIBUTOR_PUBLISH_TOKEN }}
FLINT_DISTRIBUTOR_URL: ${{ secrets.FLINT_DISTRIBUTOR_URL }}
SIGNING_KEY: ${{ secrets.signingKey }}
SIGNING_PASSWORD: ${{ secrets.signingPassword }}
OSSHR_USER: ${{ secrets.osshrUser }}
OSSHR_PASSWORD: ${{ secrets.osshrPassword }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Final artifacts
path: ultralight-java-*/build/libs/*.jar