forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deploy job for cross compiled aarch64 (netty#10883)
Motivation: We should also deploy snapshots for our cross compiled native jars. Modifications: - Add job and docker files for deploying cross compiled native jars - Ensure we map the maven cache into our docker containers Result: Deploy aarch64 jars and re-use cache
- Loading branch information
1 parent
11d2ce7
commit 0af6031
Showing
3 changed files
with
77 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,41 @@ jobs: | |
|
||
- name: Deploy snapshots | ||
run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run deploy | ||
|
||
deploy-linux-aarch64: | ||
runs-on: ubuntu-latest | ||
# We depend on the deploy of linux-x86_64 so we can download the dependencies | ||
needs: deploy-linux-x86_64 | ||
steps: | ||
- uses: s4u/[email protected] | ||
with: | ||
servers: | | ||
[{ | ||
"id": "sonatype-nexus-snapshots", | ||
"username": "${{ secrets.SONATYPE_USERNAME }}", | ||
"password": "${{ secrets.SONATYPE_PASSWORD }}" | ||
}] | ||
- uses: actions/checkout@v2 | ||
|
||
# Cache .m2/repository | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: deploy-linux-aarch64-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
deploy-linux-aarch64-${{ runner.os }}-maven- | ||
# Enable caching of Docker layers | ||
- uses: satackey/[email protected] | ||
continue-on-error: true | ||
with: | ||
key: deploy-linux-aarch64-docker-cache-{hash} | ||
restore-keys: | | ||
deploy-linux-aarch64-docker-cache- | ||
- name: Build docker image | ||
run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-7.yaml build | ||
|
||
- name: Deploy snapshots | ||
run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-7.yaml run deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
|
||
cross-compile-aarch64-runtime-setup: | ||
image: netty:cross_compile_aarch64 | ||
build: | ||
context: ../ | ||
dockerfile: docker/Dockerfile.cross_compile_aarch64 | ||
args: | ||
gcc_version: "4.9-2016.02" | ||
java_version: "[email protected]" | ||
|
||
cross-compile-aarch64-common: &cross-compile-aarch64-common | ||
depends_on: [ cross-compile-aarch64-runtime-setup ] | ||
image: netty:cross_compile_aarch64 | ||
volumes: | ||
- ~/.ssh:/root/.ssh | ||
- ~/.gnupg:/root/.gnupg | ||
- ~/.m2:/root/.m2 | ||
- ..:/code | ||
working_dir: /code | ||
|
||
cross-compile-aarch64-deploy: | ||
<<: *cross-compile-aarch64-common | ||
command: /bin/bash -cl "./mvnw -pl transport-native-unix-common,transport-native-epoll clean deploy -Plinux-aarch64 -DskipTests=true" | ||
|
||
cross-compile-aarch64-shell: | ||
<<: *cross-compile-aarch64-common | ||
entrypoint: /bin/bash | ||
|
||
cross-compile-aarch64-build: | ||
<<: *cross-compile-aarch64-common | ||
command: /bin/bash -cl "./mvnw -pl transport-native-unix-common,transport-native-epoll clean package -Plinux-aarch64 -DskipTests=true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters