Skip to content

Commit 2b23912

Browse files
committed
Add missing GitHub Workflows to ci-pr.yml, ci-deploy.yml and ci-release.yml
1 parent 8d2d39a commit 2b23912

File tree

5 files changed

+234
-3
lines changed

5 files changed

+234
-3
lines changed

.github/workflows/ci-build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ jobs:
151151
- name: Build project
152152
run: ./mvnw.cmd -B -ntp --file pom.xml clean package
153153

154+
- name: Upload Test Results
155+
if: always()
156+
uses: actions/upload-artifact@v2
157+
with:
158+
name: test-results-pr-windows-x86_64
159+
path: '**/target/surefire-reports/TEST-*.xml'
160+
154161
- uses: actions/upload-artifact@v2
155162
if: ${{ failure() }}
156163
with:
@@ -199,6 +206,14 @@ jobs:
199206
- name: Setup environment
200207
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
201208

209+
# Cache .m2/repository
210+
- uses: actions/cache@v2
211+
with:
212+
path: ~/.m2/repository
213+
key: android-maven-cache-${{ hashFiles('**/pom.xml') }}
214+
restore-keys: |
215+
android-maven-cache-
216+
202217
- name: Build project
203218
run: ./mvnw -B -ntp --file pom.xml clean package -Dandroid
204219

.github/workflows/ci-deploy.yml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,77 @@ jobs:
151151
path: local-staging
152152
if-no-files-found: error
153153

154+
stage-snapshot-android:
155+
runs-on: ubuntu-latest
156+
name: android
157+
env:
158+
SDK_VER: "platforms;android-21"
159+
NDK_VER: "ndk;21.4.7075529"
160+
steps:
161+
- uses: actions/checkout@v2
162+
163+
- name: Setup ninja-build
164+
run: sudo apt-get install ninja-build
165+
166+
- name: Setup go
167+
uses: actions/setup-go@v2
168+
169+
- name: Install cargo-ndk
170+
uses: actions-rs/[email protected]
171+
with:
172+
crate: cargo-ndk
173+
174+
- name: Install Rust toolchain for Android architectures
175+
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
176+
177+
- name: Set up JDK 1.8
178+
uses: actions/setup-java@v1
179+
with:
180+
java-version: 1.8
181+
182+
- name: Setup Android SDK
183+
uses: android-actions/setup-android@v2
184+
185+
- name: Install Android SDK platforms
186+
run: sdkmanager "${{ env.SDK_VER }}"
187+
188+
- name: Install Android NDK
189+
run: sdkmanager "${{ env.NDK_VER }}"
190+
191+
- name: Setup environment
192+
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
193+
194+
# Caching of maven dependencies
195+
- uses: actions/cache@v2
196+
with:
197+
path: ~/.m2/repository
198+
key: stage-snapshot-android-maven-cache-${{ hashFiles('**/pom.xml') }}
199+
restore-keys: |
200+
stage-snapshot-android-maven-cache-
201+
202+
- uses: s4u/[email protected]
203+
with:
204+
servers: |
205+
[{
206+
"id": "sonatype-nexus-staging",
207+
"username": "${{ secrets.SONATYPE_USERNAME }}",
208+
"password": "${{ secrets.SONATYPE_PASSWORD }}"
209+
}]
210+
211+
- name: Stage snapshots to local staging directory
212+
run: ./mvnw -B -ntp --file pom.xml clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -Dandroid -DaltStagingDirectory=local-staging -DskipRemoteStaging=true -DskipTests=true
213+
214+
- name: Upload local staging directory
215+
uses: actions/upload-artifact@v2
216+
with:
217+
name: android-local-staging
218+
path: local-staging
219+
if-no-files-found: error
220+
154221
deploy-staged-snapshots:
155222
runs-on: ubuntu-18.04
156223
# Wait until we have staged everything
157-
needs: [stage-snapshot-linux, stage-snapshot-windows-x86_64]
224+
needs: [stage-snapshot-linux, stage-snapshot-windows-x86_64, stage-snapshot-android]
158225
steps:
159226
- uses: actions/checkout@v2
160227

.github/workflows/ci-pr.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,63 @@ jobs:
173173
path: |
174174
**/target/surefire-reports/
175175
**/hs_err*.log
176+
177+
build-pr-android:
178+
runs-on: ubuntu-latest
179+
name: android
180+
env:
181+
SDK_VER: "platforms;android-21"
182+
NDK_VER: "ndk;21.4.7075529"
183+
steps:
184+
- uses: actions/checkout@v2
185+
186+
- name: Setup ninja-build
187+
run: sudo apt-get install ninja-build
188+
189+
- name: Setup go
190+
uses: actions/setup-go@v2
191+
192+
- name: Install cargo-ndk
193+
uses: actions-rs/[email protected]
194+
with:
195+
crate: cargo-ndk
196+
197+
- name: Install Rust toolchain for Android architectures
198+
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
199+
200+
- name: Set up JDK 1.8
201+
uses: actions/setup-java@v1
202+
with:
203+
java-version: 1.8
204+
205+
- name: Setup Android SDK
206+
uses: android-actions/setup-android@v2
207+
208+
- name: Install Android SDK platforms
209+
run: sdkmanager "${{ env.SDK_VER }}"
210+
211+
- name: Install Android NDK
212+
run: sdkmanager "${{ env.NDK_VER }}"
213+
214+
- name: Setup environment
215+
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
216+
217+
# Cache .m2/repository
218+
# Caching of maven dependencies
219+
- uses: actions/cache@v2
220+
with:
221+
path: ~/.m2/repository
222+
key: pr-android-maven-cache-${{ hashFiles('**/pom.xml') }}
223+
restore-keys: |
224+
pr-android-maven-cache-
225+
226+
- name: Build project
227+
run: ./mvnw -B -ntp --file pom.xml clean package -Dandroid
228+
229+
- uses: actions/upload-artifact@v2
230+
if: ${{ failure() }}
231+
with:
232+
name: target
233+
path: |
234+
**/target/surefire-reports/
235+
**/hs_err*.log

.github/workflows/ci-release.yml

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,85 @@ jobs:
257257
# Rollback the release in case of an failure
258258
run: ./.github/scripts/release_rollback.ps1 release.properties netty/netty-incubator-codec-quic main
259259

260+
261+
stage-release-android:
262+
runs-on: ubuntu-latest
263+
name: android
264+
env:
265+
SDK_VER: "platforms;android-21"
266+
NDK_VER: "ndk;21.4.7075529"
267+
steps:
268+
- uses: actions/checkout@v2
269+
270+
- name: Setup ninja-build
271+
run: sudo apt-get install ninja-build
272+
273+
- name: Setup go
274+
uses: actions/setup-go@v2
275+
276+
- name: Install cargo-ndk
277+
uses: actions-rs/[email protected]
278+
with:
279+
crate: cargo-ndk
280+
281+
- name: Install Rust toolchain for Android architectures
282+
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
283+
284+
- name: Set up JDK 1.8
285+
uses: actions/setup-java@v1
286+
with:
287+
java-version: 1.8
288+
289+
- name: Setup Android SDK
290+
uses: android-actions/setup-android@v2
291+
292+
- name: Install Android SDK platforms
293+
run: sdkmanager "${{ env.SDK_VER }}"
294+
295+
- name: Install Android NDK
296+
run: sdkmanager "${{ env.NDK_VER }}"
297+
298+
- name: Setup environment
299+
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
300+
301+
# Caching of maven dependencies
302+
- uses: actions/cache@v2
303+
with:
304+
path: ~/.m2/repository
305+
key: stage-snapshot-android-maven-cache-${{ hashFiles('**/pom.xml') }}
306+
restore-keys: |
307+
stage-snapshot-android-maven-cache-
308+
309+
- uses: s4u/[email protected]
310+
with:
311+
servers: |
312+
[{
313+
"id": "sonatype-nexus-staging",
314+
"username": "${{ secrets.SONATYPE_USERNAME }}",
315+
"password": "${{ secrets.SONATYPE_PASSWORD }}"
316+
}]
317+
318+
- name: Stage release to local staging directory
319+
working-directory: prepare-release-workspace
320+
run: ./mvnw -B -ntp --file pom.xml clean javadoc:jar package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -Dandroid -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DaltStagingDirectory=local-staging -DskipRemoteStaging=true -DskipTests=true -D'checkstyle.skip=true'
321+
322+
- name: Upload local staging directory
323+
uses: actions/upload-artifact@v2
324+
with:
325+
name: android-local-staging
326+
path: prepare-release-workspace/local-staging
327+
if-no-files-found: error
328+
329+
- name: Rollback release on failure
330+
working-directory: prepare-release-workspace
331+
if: ${{ failure() }}
332+
# Rollback the release in case of an failure
333+
run: ./.github/scripts/release_rollback.ps1 release.properties netty/netty-incubator-codec-quic main
334+
260335
deploy-staged-release:
261336
runs-on: ubuntu-18.04
262337
# Wait until we have staged everything
263-
needs: [stage-release-linux, stage-release-windows-x86_64]
338+
needs: [stage-release-linux, stage-release-windows-x86_64, stage-release-android]
264339
steps:
265340
- name: Download release-workspace
266341
uses: actions/download-artifact@v2

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a new experimental QUIC codec for netty which makes use of [quiche](http
77
## How to include the dependency
88

99
To include the dependency you need to ensure you also specify the right classifier. At the moment we only support Linux
10-
x86_64, macOS / OSX x86_64 and Windows x86_64 but this may change.
10+
x86_64 and aarch64, macOS / OSX x86_64, Windows x86_64 and Android but this may change.
1111

1212
As an example this is how you would include the dependency in maven:
1313
For Linux x86_64:
@@ -42,6 +42,20 @@ For Windows:
4242
</dependency>
4343
```
4444

45+
For Android:
46+
47+
It's a single dependency that contains the following [ABI](https://developer.android.com/ndk/guides/abis): `armeabi-v7a`, `arm64-v8a`, `x86`, `x86-64`.
48+
If you don't need all ABI in your application, check out [abiFilters](https://developer.android.com/ndk/guides/abis#gc).
49+
50+
```
51+
<dependency>
52+
<groupId>io.netty.incubator</groupId>
53+
<artifactId>netty-incubator-codec-quic</artifactId>
54+
<version>0.0.16.Final</version>
55+
<classifier>android</classifier>
56+
</dependency>
57+
```
58+
4559
## How to use this codec ?
4660

4761
For some examples please check our

0 commit comments

Comments
 (0)