Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ jobs:
- name: Build project
run: ./mvnw.cmd -B -ntp --file pom.xml clean package

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results-pr-windows-x86_64
path: '**/target/surefire-reports/TEST-*.xml'

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
Expand Down Expand Up @@ -199,6 +206,14 @@ jobs:
- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}

# Cache .m2/repository
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: android-maven-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
android-maven-cache-

- name: Build project
run: ./mvnw -B -ntp --file pom.xml clean package -Dandroid

Expand Down
69 changes: 68 additions & 1 deletion .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,77 @@ jobs:
path: local-staging
if-no-files-found: error

stage-snapshot-android:
runs-on: ubuntu-latest
name: android
env:
SDK_VER: "platforms;android-21"
NDK_VER: "ndk;21.4.7075529"
steps:
- uses: actions/checkout@v2

- name: Setup ninja-build
run: sudo apt-get install ninja-build

- name: Setup go
uses: actions/setup-go@v2

- name: Install cargo-ndk
uses: actions-rs/[email protected]
with:
crate: cargo-ndk

- name: Install Rust toolchain for Android architectures
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Install Android SDK platforms
run: sdkmanager "${{ env.SDK_VER }}"

- name: Install Android NDK
run: sdkmanager "${{ env.NDK_VER }}"

- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}

# Caching of maven dependencies
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: stage-snapshot-android-maven-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
stage-snapshot-android-maven-cache-

- uses: s4u/[email protected]
with:
servers: |
[{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.SONATYPE_USERNAME }}",
"password": "${{ secrets.SONATYPE_PASSWORD }}"
}]

- name: Stage snapshots to local staging directory
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

- name: Upload local staging directory
uses: actions/upload-artifact@v2
with:
name: android-local-staging
path: local-staging
if-no-files-found: error

deploy-staged-snapshots:
runs-on: ubuntu-18.04
# Wait until we have staged everything
needs: [stage-snapshot-linux, stage-snapshot-windows-x86_64]
needs: [stage-snapshot-linux, stage-snapshot-windows-x86_64, stage-snapshot-android]
steps:
- uses: actions/checkout@v2

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ jobs:
- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}

# Cache .m2/repository
# Caching of maven dependencies
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: pr-android-maven-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
pr-android-maven-cache-

- name: Build project
run: ./mvnw -B -ntp --file pom.xml clean package -Dandroid

Expand Down
77 changes: 76 additions & 1 deletion .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,85 @@ jobs:
# Rollback the release in case of an failure
run: ./.github/scripts/release_rollback.ps1 release.properties netty/netty-incubator-codec-quic main


stage-release-android:
runs-on: ubuntu-latest
name: android
env:
SDK_VER: "platforms;android-21"
NDK_VER: "ndk;21.4.7075529"
steps:
- uses: actions/checkout@v2

- name: Setup ninja-build
run: sudo apt-get install ninja-build

- name: Setup go
uses: actions/setup-go@v2

- name: Install cargo-ndk
uses: actions-rs/[email protected]
with:
crate: cargo-ndk

- name: Install Rust toolchain for Android architectures
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Install Android SDK platforms
run: sdkmanager "${{ env.SDK_VER }}"

- name: Install Android NDK
run: sdkmanager "${{ env.NDK_VER }}"

- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}

# Caching of maven dependencies
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: stage-snapshot-android-maven-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
stage-snapshot-android-maven-cache-

- uses: s4u/[email protected]
with:
servers: |
[{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.SONATYPE_USERNAME }}",
"password": "${{ secrets.SONATYPE_PASSWORD }}"
}]

- name: Stage release to local staging directory
working-directory: prepare-release-workspace
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'

- name: Upload local staging directory
uses: actions/upload-artifact@v2
with:
name: android-local-staging
path: prepare-release-workspace/local-staging
if-no-files-found: error

- name: Rollback release on failure
working-directory: prepare-release-workspace
if: ${{ failure() }}
# Rollback the release in case of an failure
run: ./.github/scripts/release_rollback.ps1 release.properties netty/netty-incubator-codec-quic main

deploy-staged-release:
runs-on: ubuntu-18.04
# Wait until we have staged everything
needs: [stage-release-linux, stage-release-windows-x86_64]
needs: [stage-release-linux, stage-release-windows-x86_64, stage-release-android]
steps:
- name: Download release-workspace
uses: actions/download-artifact@v2
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a new experimental QUIC codec for netty which makes use of [quiche](http
## How to include the dependency

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

As an example this is how you would include the dependency in maven:
For Linux x86_64:
Expand Down Expand Up @@ -42,6 +42,20 @@ For Windows:
</dependency>
```

For Android:

It's a single dependency that contains the following [ABI](https://developer.android.com/ndk/guides/abis): `armeabi-v7a`, `arm64-v8a`, `x86`, `x86-64`.
If you don't need all ABI in your application, check out [abiFilters](https://developer.android.com/ndk/guides/abis#gc).

```
<dependency>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-codec-quic</artifactId>
<version>0.0.16.Final</version>
<classifier>android</classifier>
</dependency>
```

## How to use this codec ?

For some examples please check our
Expand Down