-
Notifications
You must be signed in to change notification settings - Fork 50
153 lines (125 loc) · 4.16 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
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
name: Java CI with Gradle
on:
pull_request:
branches: [ master ]
jobs:
natives-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install additional build dependencies
run: brew install nasm
- name: Build with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegMacosAll :gdx-video-desktop:jnigenBuildMacosAll
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs/**/*.dylib
if-no-files-found: error
natives-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes gcc g++
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt install -y --force-yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
- name: Build natives with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegLinuxAll :gdx-video-desktop:jnigenBuildLinuxAll
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs/**/*.so
if-no-files-found: error
natives-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Build natives with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegWindowsAll :gdx-video-desktop:jnigenBuildWindowsAll
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs/**/*.dll
if-no-files-found: error
gradle-build:
needs:
- natives-macos
- natives-linux
- natives-windows
runs-on: ubuntu-20.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Download desktop-natives artifact
uses: actions/download-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs
- name: Create JAR with natives for desktop
run: ./gradlew jnigenJarNativesDesktop --info
- name: Creat android directory
run: mkdir -p $HOME/.android
- name: Create debug keystore for android
run: keytool -genkey -v -keystore $HOME/.android/debug.keystore -storetype PKCS12 -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -noprompt -dname "CN=GdxVideo, OU=libGDX, O=libGDX, L=Unknown, ST=Unknown, C=US"
- name: Build library and test programs with gradle
run: ./gradlew build
- name: Upload all output libs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: output-libs
path: '**/build/libs/'