This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push: new bd224ab3 Move cross-build into separate action bd224ab3 is described below commit bd224ab3885c154c790558fc0df590a2c097ff6b Author: Sebb <s...@apache.org> AuthorDate: Sat Nov 4 11:42:13 2023 +0000 Move cross-build into separate action It currently takes a long time, and it is not needed for many changes --- .github/workflows/maven.yml | 25 ++-------------- .github/workflows/maven_crossbuild.yml | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1c1ad662..951ea169 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,6 +15,8 @@ name: Java CI +# cross-build tests are done in a separate action as they currrently take a long time + on: # allow direct trigger workflow_dispatch: @@ -22,6 +24,7 @@ on: paths-ignore: - '**/workflows/*.yml' - '!**/workflows/maven.yml' + - '!**/workflows/maven_crossbuild.yml' pull_request: paths-ignore: - '**/workflows/*.yml' @@ -122,25 +125,3 @@ jobs: OPENSSL_HOME: "C:\\Miniconda\\Library" run: | mvn -V -B -ntp clean test-compile -Pbenchmark - - build-cross: - strategy: - matrix: - include: - - platform: aarch64 - - platform: riscv64 - jna_override: "-Djna.version=5.12.0" # See https://github.com/java-native-access/jna/issues/1557 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - persist-credentials: false - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 - with: - platforms: ${{ matrix.platform }} - - run: | - # Build package - docker compose -f src/docker/docker-compose.yaml run crypto src/docker/build.sh - # Run on platform - docker compose -f src/docker/docker-compose.yaml run crypto-${{ matrix.platform }} \ - mvn -V -B -ntp surefire:test ${{ matrix.jna_override }} diff --git a/.github/workflows/maven_crossbuild.yml b/.github/workflows/maven_crossbuild.yml new file mode 100644 index 00000000..9c8b5c62 --- /dev/null +++ b/.github/workflows/maven_crossbuild.yml @@ -0,0 +1,53 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Java Cross Build + +# This is done as a separate action for now, as it takes a long time + +on: + # allow direct trigger + workflow_dispatch: + push: + include: + - '**/jna/**' + - '**/native/**' + - '**/maven_crossbuild.yml' + +permissions: + contents: read + +jobs: + build-cross: + strategy: + matrix: + include: + - platform: aarch64 + - platform: riscv64 + jna_override: "-Djna.version=5.12.0" # See https://github.com/java-native-access/jna/issues/1557 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + persist-credentials: false + - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 + with: + platforms: ${{ matrix.platform }} + - run: | + # Build package + docker compose -f src/docker/docker-compose.yaml run crypto src/docker/build.sh + # Run on platform + docker compose -f src/docker/docker-compose.yaml run crypto-${{ matrix.platform }} \ + mvn -V -B -ntp surefire:test ${{ matrix.jna_override }}