From 95b96126c3e8d54db5c566d43511d438a389d5dc Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 22 Dec 2020 18:33:14 +0100 Subject: [PATCH] Use Github workflows for CI (#10879) Motivation: We should just use GitHub Actions for the CI Modifications: - Adjust docker / docker compose files - Add different workflows and jobs to deploy and build the project Result: Don't depend on external CI services --- .github/workflows/ci-build.yml | 180 ++++++++++++++++++ .github/workflows/ci-deploy.yml | 48 +++++ .../{Dockerfile.centos => Dockerfile.centos6} | 8 +- docker/README.md | 4 +- docker/docker-compose.centos-6.110.yaml | 1 - docker/docker-compose.centos-6.111.yaml | 7 +- docker/docker-compose.centos-6.112.yaml | 22 --- docker/docker-compose.centos-6.113.yaml | 22 --- docker/docker-compose.centos-6.114.yaml | 22 --- docker/docker-compose.centos-6.115.yaml | 7 +- docker/docker-compose.centos-6.18.yaml | 7 +- docker/docker-compose.centos-6.19.yaml | 22 --- .../docker-compose.centos-6.graalvm111.yaml | 1 - docker/docker-compose.centos-6.graalvm18.yaml | 1 - docker/docker-compose.centos-6.openj9111.yaml | 1 - docker/docker-compose.centos-7.110.yaml | 22 --- docker/docker-compose.centos-7.111.yaml | 22 --- docker/docker-compose.centos-7.112.yaml | 22 --- docker/docker-compose.centos-7.113.yaml | 22 --- docker/docker-compose.centos-7.114.yaml | 22 --- docker/docker-compose.centos-7.115.yaml | 22 --- docker/docker-compose.centos-7.18.yaml | 22 --- docker/docker-compose.centos-7.19.yaml | 22 --- docker/docker-compose.yaml | 44 +---- 24 files changed, 261 insertions(+), 312 deletions(-) create mode 100644 .github/workflows/ci-build.yml create mode 100644 .github/workflows/ci-deploy.yml rename docker/{Dockerfile.centos => Dockerfile.centos6} (72%) delete mode 100644 docker/docker-compose.centos-6.112.yaml delete mode 100644 docker/docker-compose.centos-6.113.yaml delete mode 100644 docker/docker-compose.centos-6.114.yaml delete mode 100644 docker/docker-compose.centos-6.19.yaml delete mode 100644 docker/docker-compose.centos-7.110.yaml delete mode 100644 docker/docker-compose.centos-7.111.yaml delete mode 100644 docker/docker-compose.centos-7.112.yaml delete mode 100644 docker/docker-compose.centos-7.113.yaml delete mode 100644 docker/docker-compose.centos-7.114.yaml delete mode 100644 docker/docker-compose.centos-7.115.yaml delete mode 100644 docker/docker-compose.centos-7.18.yaml delete mode 100644 docker/docker-compose.centos-7.19.yaml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000000..5ccc1c76d2 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,180 @@ +name: Build project + +on: + push: + branches: [ "4.1", master ] + pull_request: + branches: [ "4.1", master ] + + schedule: + - cron: '30 1 * * 1' # At 01:30 on Monday, every Monday. + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + verify: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + # Cache .m2/repository + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: verify-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + verify-${{ runner.os }}-maven- + + - name: Verify with Maven + run: mvn verify -B --file pom.xml -DskipTests=true + + build-linux-x86_64-java8: + runs-on: ubuntu-latest + needs: verify + steps: + - uses: actions/checkout@v2 + + # Cache .m2/repository + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: build-linux-x86_64-java8-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + build-linux-x86_64-java8-${{ runner.os }}-maven- + + # Enable caching of Docker layers + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + with: + key: build-linux-x86_64-java8-docker-cache-{hash} + restore-keys: | + build-linux-x86_64-java8-docker-cache- + + - name: Build docker image + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml build + + - name: Build project without leak detection + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run build + + - name: Build project with leak detection + if: ${{ github.event_name == 'pull_request' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run build-leak | tee build-leak.output + + - name: Checking for detected leak + if: ${{ github.event_name == 'pull_request' }} + run: | + if grep -q 'LEAK:' build-leak.output ; then + echo "Leak detected, please inspect build log" + exit 1 + else + echo "No Leak detected" + fi + + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: target + path: "**/target/" + + build-linux-x86_64-java11: + runs-on: ubuntu-latest + needs: verify + steps: + - uses: actions/checkout@v2 + + # Cache .m2/repository + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: build-linux-x86_64-java11-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + build-linux-x86_64-java11-${{ runner.os }}-maven- + + # Enable caching of Docker layers + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + with: + key: build-linux-x86_64-java11-docker-cache-{hash} + restore-keys: | + build-linux-x86_64-java11-docker-cache- + + - name: Build docker image + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build + + - name: Build project without leak detection + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build + + - name: Build project with leak detection + if: ${{ github.event_name == 'pull_request' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build-leak | tee build-leak.output + + - name: Checking for detected leak + if: ${{ github.event_name == 'pull_request' }} + run: | + if grep -q 'LEAK:' build-leak.output ; then + echo "Leak detected, please inspect build log" + exit 1 + else + echo "No Leak detected" + fi + + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: target + path: "**/target/" + + build-linux-x86_64-java15: + runs-on: ubuntu-latest + needs: verify + steps: + - uses: actions/checkout@v2 + + # Cache .m2/repository + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: build-linux-x86_64-java15-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + build-linux-x86_64-java15-${{ runner.os }}-maven- + + # Enable caching of Docker layers + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + with: + key: build-linux-x86_64-java15-docker-cache-{hash} + restore-keys: | + build-linux-x86_64-java15-docker-cache- + + - name: Build docker image + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.115.yaml build + + - name: Build project without leak detection + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.115.yaml run build + + - name: Build project with leak detection + if: ${{ github.event_name == 'pull_request' }} + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.115.yaml run build-leak | tee build-leak.output + + - name: Checking for detected leak + if: ${{ github.event_name == 'pull_request' }} + run: | + if grep -q 'LEAK:' build-leak.output ; then + echo "Leak detected, please inspect build log" + exit 1 + else + echo "No Leak detected" + fi + + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: target + path: "**/target/" diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml new file mode 100644 index 0000000000..cdaab60e6e --- /dev/null +++ b/.github/workflows/ci-deploy.yml @@ -0,0 +1,48 @@ +name: Deploy project + +on: + push: + branches: [ "4.1", master ] + + schedule: + - cron: '30 1 * * 1' # At 01:30 on Monday, every Monday. + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + deploy-linux-x86_64: + runs-on: ubuntu-latest + steps: + - uses: s4u/maven-settings-action@v2.2.0 + 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-x86_64-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + deploy-linux-x86_64-${{ runner.os }}-maven- + + # Enable caching of Docker layers + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + with: + key: deploy-linux-x86_64-docker-cache-{hash} + restore-keys: | + deploy-linux-x86_64-docker-cache- + + - name: Build docker image + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml build + + - name: Deploy snapshots + run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run deploy diff --git a/docker/Dockerfile.centos b/docker/Dockerfile.centos6 similarity index 72% rename from docker/Dockerfile.centos rename to docker/Dockerfile.centos6 index e6df940e0c..becd8f109d 100644 --- a/docker/Dockerfile.centos +++ b/docker/Dockerfile.centos6 @@ -1,7 +1,7 @@ -ARG centos_version=6 -FROM centos:$centos_version -# needed to do again after FROM due to docker limitation -ARG centos_version +FROM centos:6.10 + +# Update as we need to use the vault now. +RUN sed -i -e 's/^mirrorlist/#mirrorlist/g' -e 's/^#baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\//baseurl=http:\/\/vault.centos.org\/6.10\//g' /etc/yum.repos.d/CentOS-Base.repo # install dependencies RUN yum install -y \ diff --git a/docker/README.md b/docker/README.md index e66c984e2e..14b17f7195 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,10 +10,10 @@ cd /path/to/netty/ docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run test ``` -## centos 7 with java 11 +## centos 6 with java 11 ``` -docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-7.111.yaml run test +docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run test ``` ## aarch64 cross compile for transport-native-epoll on X86_64 diff --git a/docker/docker-compose.centos-6.110.yaml b/docker/docker-compose.centos-6.110.yaml index 7a60f46e32..c55fb0bd31 100644 --- a/docker/docker-compose.centos-6.110.yaml +++ b/docker/docker-compose.centos-6.110.yaml @@ -6,7 +6,6 @@ services: image: netty:centos-6-1.10 build: args: - centos_version : "6" java_version : "zulu@1.10.0-2" test: diff --git a/docker/docker-compose.centos-6.111.yaml b/docker/docker-compose.centos-6.111.yaml index 17b260872f..142f4ea046 100644 --- a/docker/docker-compose.centos-6.111.yaml +++ b/docker/docker-compose.centos-6.111.yaml @@ -6,9 +6,14 @@ services: image: netty:centos-6-1.11 build: args: - centos_version : "6" java_version : "adopt@1.11.0-9" + build: + image: netty:centos-6-1.11 + + build-leak: + image: netty:centos-6-1.11 + test: image: netty:centos-6-1.11 diff --git a/docker/docker-compose.centos-6.112.yaml b/docker/docker-compose.centos-6.112.yaml deleted file mode 100644 index aee3e1fe2c..0000000000 --- a/docker/docker-compose.centos-6.112.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-6-1.12 - build: - args: - centos_version : "6" - java_version : "adopt@1.12.0-2" - - test: - image: netty:centos-6-1.12 - - test-leak: - image: netty:centos-6-1.12 - - test-boringssl-static: - image: netty:centos-6-1.12 - - shell: - image: netty:centos-6-1.12 diff --git a/docker/docker-compose.centos-6.113.yaml b/docker/docker-compose.centos-6.113.yaml deleted file mode 100644 index 00fb881449..0000000000 --- a/docker/docker-compose.centos-6.113.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-6-1.13 - build: - args: - centos_version : "6" - java_version : "adopt@1.13.0-2" - - test: - image: netty:centos-6-1.13 - - test-leak: - image: netty:centos-6-1.13 - - test-boringssl-static: - image: netty:centos-6-1.13 - - shell: - image: netty:centos-6-1.13 diff --git a/docker/docker-compose.centos-6.114.yaml b/docker/docker-compose.centos-6.114.yaml deleted file mode 100644 index 74a84f153a..0000000000 --- a/docker/docker-compose.centos-6.114.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-6-1.14 - build: - args: - centos_version : "6" - java_version : "adopt@1.14.0-2" - - test: - image: netty:centos-6-1.14 - - test-leak: - image: netty:centos-6-1.14 - - test-boringssl-static: - image: netty:centos-6-1.14 - - shell: - image: netty:centos-6-1.14 diff --git a/docker/docker-compose.centos-6.115.yaml b/docker/docker-compose.centos-6.115.yaml index abefc313d2..ce334122d0 100644 --- a/docker/docker-compose.centos-6.115.yaml +++ b/docker/docker-compose.centos-6.115.yaml @@ -6,11 +6,16 @@ services: image: netty:centos-6-1.15 build: args: - centos_version : "6" # use zulu and not adoptjdk for now as adoptjdk15 does not support centos6 # https://github.com/AdoptOpenJDK/openjdk-build/issues/2097 java_version : "zulu@1.15.0-1" + build: + image: netty:centos-6-1.15 + + build-leak: + image: netty:centos-6-1.15 + test: image: netty:centos-6-1.15 diff --git a/docker/docker-compose.centos-6.18.yaml b/docker/docker-compose.centos-6.18.yaml index 3be9a4994f..518fc6593d 100644 --- a/docker/docker-compose.centos-6.18.yaml +++ b/docker/docker-compose.centos-6.18.yaml @@ -6,9 +6,14 @@ services: image: netty:centos-6-1.8 build: args: - centos_version : "6" java_version : "adopt@1.8.0-272" + build: + image: netty:centos-6-1.8 + + build-leak: + image: netty:centos-6-1.8 + test: image: netty:centos-6-1.8 diff --git a/docker/docker-compose.centos-6.19.yaml b/docker/docker-compose.centos-6.19.yaml deleted file mode 100644 index ee34c53ae2..0000000000 --- a/docker/docker-compose.centos-6.19.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-6-1.9 - build: - args: - centos_version : "6" - java_version : "zulu@1.9.0-7" - - test: - image: netty:centos-6-1.9 - - test-leak: - image: netty:centos-6-1.9 - - test-boringssl-static: - image: netty:centos-6-1.9 - - shell: - image: netty:centos-6-1.9 diff --git a/docker/docker-compose.centos-6.graalvm111.yaml b/docker/docker-compose.centos-6.graalvm111.yaml index cca36fe75b..8d960fe8dd 100644 --- a/docker/docker-compose.centos-6.graalvm111.yaml +++ b/docker/docker-compose.centos-6.graalvm111.yaml @@ -6,7 +6,6 @@ services: image: netty:centos-6-1.11 build: args: - centos_version : "6" java_version : "graalvm-ce-java11@20.1.0" test: diff --git a/docker/docker-compose.centos-6.graalvm18.yaml b/docker/docker-compose.centos-6.graalvm18.yaml index fb39d7c7de..e314693863 100644 --- a/docker/docker-compose.centos-6.graalvm18.yaml +++ b/docker/docker-compose.centos-6.graalvm18.yaml @@ -6,7 +6,6 @@ services: image: netty:centos-6-1.8 build: args: - centos_version : "6" java_version : "graalvm-ce-java8@20.1.0" test: diff --git a/docker/docker-compose.centos-6.openj9111.yaml b/docker/docker-compose.centos-6.openj9111.yaml index 3c81ab694e..d9680d69d0 100644 --- a/docker/docker-compose.centos-6.openj9111.yaml +++ b/docker/docker-compose.centos-6.openj9111.yaml @@ -6,7 +6,6 @@ services: image: netty:centos-6-openj9-1.11 build: args: - centos_version : "6" java_version : "adopt-openj9@1.11.0-9" test: diff --git a/docker/docker-compose.centos-7.110.yaml b/docker/docker-compose.centos-7.110.yaml deleted file mode 100644 index 280ed73b96..0000000000 --- a/docker/docker-compose.centos-7.110.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.10 - build: - args: - centos_version : "7" - java_version : "zulu@1.10.0-2" - - test: - image: netty:centos-7-1.10 - - test-leak: - image: netty:centos-7-1.10 - - test-boringssl-static: - image: netty:centos-7-1.10 - - shell: - image: netty:centos-7-1.10 diff --git a/docker/docker-compose.centos-7.111.yaml b/docker/docker-compose.centos-7.111.yaml deleted file mode 100644 index 7845de7782..0000000000 --- a/docker/docker-compose.centos-7.111.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.11 - build: - args: - centos_version : "7" - java_version : "adopt@1.11.0-9" - - test: - image: netty:centos-7-1.11 - - test-leak: - image: netty:centos-7-1.11 - - test-boringssl-static: - image: netty:centos-7-1.11 - - shell: - image: netty:centos-7-1.11 diff --git a/docker/docker-compose.centos-7.112.yaml b/docker/docker-compose.centos-7.112.yaml deleted file mode 100644 index d628188bba..0000000000 --- a/docker/docker-compose.centos-7.112.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.12 - build: - args: - centos_version : "7" - java_version : "adopt@1.12.0-2" - - test: - image: netty:centos-7-1.12 - - test-leak: - image: netty:centos-7-1.12 - - test-boringssl-static: - image: netty:centos-7-1.12 - - shell: - image: netty:centos-7-1.12 diff --git a/docker/docker-compose.centos-7.113.yaml b/docker/docker-compose.centos-7.113.yaml deleted file mode 100644 index 24386ddedf..0000000000 --- a/docker/docker-compose.centos-7.113.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.13 - build: - args: - centos_version : "7" - java_version : "adopt@1.13.0-2" - - test: - image: netty:centos-7-1.13 - - test-leak: - image: netty:centos-7-1.13 - - test-boringssl-static: - image: netty:centos-7-1.13 - - shell: - image: netty:centos-7-1.13 diff --git a/docker/docker-compose.centos-7.114.yaml b/docker/docker-compose.centos-7.114.yaml deleted file mode 100644 index 133943d17a..0000000000 --- a/docker/docker-compose.centos-7.114.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.14 - build: - args: - centos_version : "7" - java_version : "adopt@1.14.0-2" - - test: - image: netty:centos-7-1.14 - - test-leak: - image: netty:centos-7-1.14 - - test-boringssl-static: - image: netty:centos-7-1.14 - - shell: - image: netty:centos-7-1.14 diff --git a/docker/docker-compose.centos-7.115.yaml b/docker/docker-compose.centos-7.115.yaml deleted file mode 100644 index d2f1a966a4..0000000000 --- a/docker/docker-compose.centos-7.115.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.15 - build: - args: - centos_version : "7" - java_version : "adopt@1.15.0-1" - - test: - image: netty:centos-7-1.15 - - test-leak: - image: netty:centos-7-1.15 - - test-boringssl-static: - image: netty:centos-7-1.15 - - shell: - image: netty:centos-7-1.15 diff --git a/docker/docker-compose.centos-7.18.yaml b/docker/docker-compose.centos-7.18.yaml deleted file mode 100644 index f6815e8e56..0000000000 --- a/docker/docker-compose.centos-7.18.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.8 - build: - args: - centos_version : "7" - java_version : "adopt@1.8.0-272" - - test: - image: netty:centos-7-1.8 - - test-leak: - image: netty:centos-7-1.8 - - test-boringssl-static: - image: netty:centos-7-1.8 - - shell: - image: netty:centos-7-1.8 diff --git a/docker/docker-compose.centos-7.19.yaml b/docker/docker-compose.centos-7.19.yaml deleted file mode 100644 index d1b6acf634..0000000000 --- a/docker/docker-compose.centos-7.19.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty:centos-7-1.9 - build: - args: - centos_version : "7" - java_version : "zulu@1.9.0-7" - - test: - image: netty:centos-7-1.9 - - test-leak: - image: netty:centos-7-1.9 - - test-boringssl-static: - image: netty:centos-7-1.9 - - shell: - image: netty:centos-7-1.9 diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index a1fb55b972..0ac9004366 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -6,7 +6,7 @@ services: image: netty:default build: context: . - dockerfile: Dockerfile.centos + dockerfile: Dockerfile.centos6 common: &common image: netty:default @@ -17,6 +17,14 @@ services: - ..:/code:delegated working_dir: /code + build-leak: + <<: *common + command: /bin/bash -cl "./mvnw -Pleak clean install -Dio.netty.testsuite.badHost=netty.io" + + build: + <<: *common + command: /bin/bash -cl "./mvnw clean install -Dio.netty.testsuite.badHost=netty.io" + test-leak: <<: *common command: /bin/bash -cl "./mvnw -Pleak clean install -Dio.netty.testsuite.badHost=netty.io -Dmaven.wagon.http.pool=false" @@ -31,43 +39,9 @@ services: shell: <<: *common - environment: - - SANOTYPE_USER - - SANOTYPE_PASSWORD volumes: - ~/.ssh:/root/.ssh:delegated - ~/.gnupg:/root/.gnupg:delegated - ..:/code:delegated - ~/.m2:/root/.m2:delegated entrypoint: /bin/bash - - cross-compile-aarch64-runtime-setup: - image: netty:cross_compile_aarch64 - build: - context: . - dockerfile: Dockerfile.cross_compile_aarch64 - args: - gcc_version : "4.9-2016.02" - - cross-compile-aarch64-shell: - image: netty:cross_compile_aarch64 - depends_on: [cross-compile-aarch64-runtime-setup] - volumes: - - ~/.ssh:/root/.ssh:delegated - - ~/.gnupg:/root/.gnupg:delegated - - ..:/code:delegated - - ~/.m2:/root/.m2:delegated - entrypoint: /bin/bash - working_dir: /code - - cross-compile-aarch64-build: - image: netty:cross_compile_aarch64 - depends_on: [cross-compile-aarch64-runtime-setup] - volumes: - - ~/.ssh:/root/.ssh:delegated - - ~/.gnupg:/root/.gnupg:delegated - - ..:/code:delegated - - ~/.m2:/root/.m2:delegated - # Since we are cross compiling netty-transport-native-epoll as aarch64 which cannot be loaded on x86_64, we add `skipTests` here to skip the test. - command: /bin/bash -cl "pushd ./transport-native-unix-common && ../mvnw clean install -Plinux-aarch64 && popd && pushd ./transport-native-epoll && ../mvnw clean install -Plinux-aarch64 -DskipTests && popd" - working_dir: /code