From f501725d0a3ef5c97c65f9de336a0a32c5a69839 Mon Sep 17 00:00:00 2001 From: Prudhvi Godithi Date: Thu, 7 Nov 2024 11:27:32 -0800 Subject: [PATCH] Move upload-artifact outside of the container Signed-off-by: Prudhvi Godithi --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80ecbdaa..4bba1c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,18 +47,37 @@ jobs: chown -R 1000:1000 `pwd` su `id -un 1000` -c "./gradlew build && ./gradlew publishToMavenLocal" + - name: Save Reports + id: linux-save-reports + uses: actions/cache/save@v3 + with: + path: ${{ github.workspace }}/build/reports/ + key: ${{ github.sha }}-linux-reports-${{ matrix.java }} + + upload-linux-artifacts: + needs: build-job-scheduler-linux + runs-on: ubuntu-latest + strategy: + matrix: + java: [21, 23] + if: always() + steps: + - uses: actions/cache/restore@v4 + id: linux-restore-reports + with: + path: ${{ github.workspace }}/build/reports/ + key: ${{ github.sha }}-linux-reports-${{ matrix.java }} + - name: Upload Coverage Report uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: linux-JDK${{ matrix.java }}-reports - path: | - ./build/reports/ - + path: ${{ github.workspace }}/build/reports/ build-job-scheduler-MacOS: strategy: @@ -127,14 +146,34 @@ jobs: run: | ./gradlew.bat publishToMavenLocal + - name: Save Reports + id: windows-save-reports + uses: actions/cache/save@v3 + with: + path: ${{ github.workspace }}/build/reports/ + key: ${{ github.sha }}-windows-reports-${{ matrix.java }} + + upload-windows-artifacts: + needs: build-job-scheduler-Windows + runs-on: windows-latest + strategy: + matrix: + java: [21, 23] + if: always() + steps: + - uses: actions/cache/restore@v4 + id: windows-restore-reports + with: + path: ${{ github.workspace }}/build/reports/ + key: ${{ github.sha }}-windows-reports-${{ matrix.java }} + - name: Upload Coverage Report uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: windows-JDK${{ matrix.java }}-reports - path: | - ./build/reports/ + path: ${{ github.workspace }}/build/reports/