-
Notifications
You must be signed in to change notification settings - Fork 1
203 lines (163 loc) · 6.64 KB
/
debug-test.yml
File metadata and controls
203 lines (163 loc) · 6.64 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
# This is a basic workflow to help you get started with Actions
name: Debug and Test jme-alloc
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
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" :jme3-alloc:desktop && ./gradlew --console="verbose" :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
test:
# runner images with architectures (variants)
runs-on: ${{ matrix.os }}
needs: assemble-desktop
strategy:
matrix:
os: [ 'ubuntu-latest' ]
name: Testing jme3-alloc on ${{ matrix.os }} for x86-64
# 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 jme3-alloc.jar library
uses: actions/download-artifact@v3
with:
name: jme3-alloc-desktop-release
path: jme3-alloc/build/libs/
- name: Run com.jme3.alloc.examples.TestConcurrentBufferAllocator
run: ./gradlew :jme3-alloc-examples:TestConcurrentBufferAllocator :jme3-alloc-examples:run
- name: API Logs
run: |
#!/bin/bash
cat ./jme3-alloc-examples/jme3-alloc-debug.log
rm -f ./jme3-alloc-examples/jme3-alloc-debug.log
- name: Run com.jme3.alloc.examples.TestDisableAutoLoad
run: ./gradlew :jme3-alloc-examples:TestDisableAutoLoad :jme3-alloc-examples:run
- name: Run com.jme3.alloc.examples.Launcher
run: ./gradlew :jme3-alloc-examples:run
- name: API Logs
run: |
#!/bin/bash
cat ./jme3-alloc-examples/jme3-alloc-debug.log
rm -f ./jme3-alloc-examples/jme3-alloc-debug.log