From 00003a449e6a81ab32f3483de8c922e315925c5f Mon Sep 17 00:00:00 2001 From: Maryan Hratson Date: Sun, 1 Sep 2024 22:57:28 -0400 Subject: [PATCH] parallel test and integrationTest --- .github/workflows/ci.yaml | 108 ++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1bcc9f7b8..416a6c66c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,51 +11,67 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - build: - name: test with JDK=${{matrix.java-dist}}-${{ matrix.java-ver }} OS=${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - java-ver: [ 11 ] - java-dist: [ 'temurin'] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # so gradle doesn't fail traversing the history - - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.java-ver }} - distribution: ${{ matrix.java-dist }} - # see: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - - uses: gradle/actions/setup-gradle@v4 # v4.0.0 - - name: gradle build - run: ./gradlew --no-daemon -PmaxParallelForks=1 build - - name: gradle integration test - run: ./gradlew --no-daemon -PmaxParallelForks=1 clean integrationTest + setup: + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # so gradle doesn't fail traversing the history + - uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-ver }} + distribution: ${{ matrix.java-dist }} + # see: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - uses: gradle/actions/setup-gradle@v4 # v4.0.0 + + test: + name: "test with JDK=${{matrix.java-dist}}:${{matrix.java-ver}}" + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java-ver: [ 11 ] + java-dist: ['microsoft', 'temurin'] + steps: + - name: gradle build + run: ./gradlew --no-daemon -PmaxParallelForks=1 build + + integration-test: + name: "integration test with JDK=${{matrix.java-dist}}:${{matrix.java-ver}}" + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + java-ver: [ 11 ] + java-dist: ['microsoft', 'temurin'] + steps: + - name: gradle build + run: ./gradlew --no-daemon -PmaxParallelForks=1 build + + - name: gradle integration test + run: ./gradlew --no-daemon -PmaxParallelForks=1 clean integrationTest build-platform: - name: test with JDK=${{matrix.java-dist}}-${{ matrix.java-ver }} OS=${{ matrix.os }} on ${{ matrix.hw_platform }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - java-ver: [ 11 ] - java-dist: [ 'temurin'] - hw_platform: [ 's390x' ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # so gradle doesn't fail traversing the history - - run: | - # install required qemu libraries - docker run --rm --privileged tonistiigi/binfmt:latest --install all - # run docker container with qemu emulation - docker run --rm \ - --platform ${{ matrix.hw_platform }} \ - --name qemu-cross-${{ matrix.hw_platform }} \ - --mount type=bind,source=${PWD},target=/workspace \ - --workdir /workspace \ - ${{matrix.hw_platform}}/eclipse-temurin:11-jdk-focal uname -a; ./gradlew --no-daemon -PmaxParallelForks=1 build + needs: setup + name: test with JDK=${{matrix.java-dist}}-${{matrix.java-ver}} on ${{matrix.hw_platform}} + strategy: + fail-fast: false + matrix: + java-ver: [ 11 ] + java-dist: [ 'temurin'] + hw_platform: [ 's390x' ] + runs-on: ubuntu-latest + steps: + - run: | + # install required qemu libraries + docker run --rm --privileged tonistiigi/binfmt:latest --install all + # run docker container with qemu emulation + docker run --rm \ + --platform ${{ matrix.hw_platform }} \ + --name qemu-cross-${{ matrix.hw_platform }} \ + --mount type=bind,source=${PWD},target=/workspace \ + --workdir /workspace \ + ${{matrix.hw_platform}}/eclipse-temurin:11-jdk-focal uname -a; ./gradlew --no-daemon -PmaxParallelForks=1 build