-
Notifications
You must be signed in to change notification settings - Fork 1
316 lines (256 loc) · 11.2 KB
/
debug-deploy.yml
File metadata and controls
316 lines (256 loc) · 11.2 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# This workflow builds the API and releases a debug version to Maven-Sonatype-Central repository
name: Deploy jme-alloc debug
# Runs this workflow [on-release] only
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
compile-java:
# runner images with architectures (variants)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Compile java
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Oracle-JDK-19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Compiling java
run: ./gradlew --console="verbose" :jme3-alloc:compileJava
- name: Archive byte code
uses: actions/upload-artifact@v3
with:
name: byte-code
path: jme3-alloc/build/classes/java/main/
- name: Archive jni headers
uses: actions/upload-artifact@v3
with:
name: jni-headers
path: jme3-alloc-native/src/include/
compile-natives:
# runner images with architectures (variants)
runs-on: ${{ matrix.os }}
needs: compile-java
strategy:
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
name: Compile natives on ${{ matrix.os }} for x86-64 and x86
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Oracle-JDK-19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Download jni headers
uses: actions/download-artifact@v3
with:
name: jni-headers
path: jme3-alloc-native/src/include/
- name: Prepare build directory
run: ./gradlew --console="verbose" :jme3-alloc-native:prepareDesktopOutputDirectory
- name: Compiling x86-64 on ${{ matrix.os }}
run: ./gradlew --console="verbose" :jme3-alloc-native:compileX86_64_debug
- name: Install gcc-multilib
run: bash ./helper-scripts/abstract/install-gcc-multilib.sh
- name: Compiling x86 on ${{ matrix.os }}
run: ./gradlew --console="verbose" :jme3-alloc-native:compileX86_debug
- name: Archive libjmealloc.so
uses: actions/upload-artifact@v3
with:
name: libjmealloc-${{ matrix.os }}
path: jme3-alloc-native/build/
assemble-desktop:
# runner images with architectures (variants)
runs-on: ${{ matrix.os }}
needs: compile-natives
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Assemble jme3-alloc-desktop
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Oracle-JDK-19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Downloading libjmealloc-ubuntu-latest
uses: actions/download-artifact@v3
with:
name: libjmealloc-ubuntu-latest
path: jme3-alloc-native/build/
- name: Downloading libjmealloc-macos-latest
uses: actions/download-artifact@v3
with:
name: libjmealloc-macos-latest
path: jme3-alloc-native/build/
- name: Downloading libjmealloc-windows-latest
uses: actions/download-artifact@v3
with:
name: libjmealloc-windows-latest
path: jme3-alloc-native/build/
- name: Downloading byte code
uses: actions/download-artifact@v3
with:
name: byte-code
path: jme3-alloc/build/classes/java/main/
- name: Copying natives
run: ./gradlew --console="verbose" :jme3-alloc-native:copyNatives
- name: List build
run: tree jme3-alloc/build/classes/java/main/
- name: Assemble
run: ./gradlew --console="verbose" -Pversion=${GITHUB_REF_NAME} :jme3-alloc:desktop && ./gradlew --console="verbose" -Pversion=${GITHUB_REF_NAME} :jme3-alloc:assemble
- name: Log jar
run: tree jme3-alloc/build/libs/
- name: Archive release
uses: actions/upload-artifact@v3
with:
name: jme3-alloc-desktop-release
path: jme3-alloc/build/libs/*.jar
compile-android-natives:
# a linux runner image with the ndk installed and llvm ready to compile android native binaries
runs-on: ${{ matrix.os }}
needs: compile-java
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Compiling android native binaries
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Oracle-JDK-19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Download jni headers
uses: actions/download-artifact@v3
with:
name: jni-headers
path: jme3-alloc-native/src/include/
- name: Prepare build directory
run: ./gradlew --console="verbose" :jme3-alloc-native:prepareAndroidOutputDirectory
- name: Compiling android native binaries
run: ./gradlew --console="verbose" :jme3-alloc-native:compileAndroidDebug
- name: Archive libjmealloc.so
uses: actions/upload-artifact@v3
with:
name: libjmealloc-android
path: jme3-alloc-native/build/
assemble-android:
# runner images with architectures (variants)
runs-on: ${{ matrix.os }}
needs: compile-android-natives
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Assembling jme3-alloc-android native binaries
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Oracle-JDK-19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Downloading libjmealloc-android
uses: actions/download-artifact@v3
with:
name: libjmealloc-android
path: jme3-alloc-native/build/
- name: Downloading byte code
uses: actions/download-artifact@v3
with:
name: byte-code
path: jme3-alloc/build/classes/java/main/
- name: Copying natives
run: ./gradlew --console="verbose" :jme3-alloc-native:copyNatives
- name: List build
run: tree jme3-alloc/build/classes/java/main/
- name: Assemble
run: ./gradlew --console="verbose" -Pversion=${GITHUB_REF_NAME} :jme3-alloc:android && ./gradlew --console="verbose" -Pversion=${GITHUB_REF_NAME} :jme3-alloc:assemble
- name: Log jar
run: tree jme3-alloc/build/libs/
- name: Archive release
uses: actions/upload-artifact@v3
with:
name: jme3-alloc-android-release
path: jme3-alloc/build/libs/*.jar
deploy:
environment:
name: maven-central
url: https://repo.maven.apache.org/maven2/io/github/software-hardware-codesign/
runs-on: ${{ matrix.os }}
needs: [assemble-desktop, assemble-android]
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Deploying to Maven-Central repository
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Job
uses: actions/checkout@v3
- name: Setup Temurin-OpenJDK-17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup maven-3.9
run: |
# remove shipped maven-3.8 that causes the plexus plugin incompatibility behavior
sudo apt remove maven
# installs maven-3.9 with the fixed plugins patch
chmod +rwx ./helper-scripts/project-impl/publishing/install-maven-latest.sh
./helper-scripts/project-impl/publishing/install-maven-latest.sh
- name: Use Predefined PGP Keybox
run: gpg --import ./helper-scripts/project-impl/publishing/public-key.pub
- name: Import secret-key
run: gpg --allow-secret-key-import --import --batch --yes --passphrase="jme-alloc" ./helper-scripts/project-impl/publishing/secret-key
- name: Import owner-trust
run: gpg --import-ownertrust ./helper-scripts/project-impl/publishing/owner-trust.txt
- name: Send public key 'jme-alloc'
# sends the public key to a maven compatible host
run: gpg --keyserver keyserver.ubuntu.com --send-keys 8DB84BBFCFCCCA00EF7A53A8022AE2B9E8991B20
- name: Generate sources jar
run: ./gradlew -Pversion=$GITHUB_REF_NAME :jme3-alloc:generateSourcesJar
- name: Generate javadoc jar
run: ./gradlew -Pversion=$GITHUB_REF_NAME :jme3-alloc:generateJavadocJar
- name: Download desktop jar
uses: actions/download-artifact@v3
with:
name: jme3-alloc-desktop-release
path: jme3-alloc/build/libs/
- name: Download android jar
uses: actions/download-artifact@v3
with:
name: jme3-alloc-android-release
path: jme3-alloc/build/libs/
- name: Deploying jme3-alloc binaries
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
run: |
chmod +rwx ./helper-scripts/project-impl/publishing/sonatype-publish-debug-artifacts.sh
# publish artifacts using the tag version
./helper-scripts/project-impl/publishing/sonatype-publish-debug-artifacts.sh $GITHUB_REF_NAME