From bfb9c5e7a2d2e2e1372ec79d5712a4709b07aff7 Mon Sep 17 00:00:00 2001 From: gruve-p Date: Tue, 8 Aug 2023 10:56:23 +0200 Subject: [PATCH] Update github workflow --- .github/workflows/build.yml | 13 +++--- .github/workflows/checkpoints.yml | 74 +++++++++++++++++-------------- .github/workflows/gradle.yml | 13 +++--- 3 files changed, 54 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 001d89881df..cde025f11a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,15 +8,16 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - java: ['8', '11', '17'] + java: ['11', '17', '19'] distribution: ['temurin'] - gradle: ['7.2'] + gradle: ['7.6.2'] fail-fast: false name: JAVA ${{ matrix.distribution }} ${{ matrix.java }} OS ${{ matrix.os }} Gradle ${{ matrix.gradle }} steps: - - uses: actions/checkout@v1 + - name: Git checkout + uses: actions/checkout@v3 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java }} @@ -29,12 +30,12 @@ jobs: cmake --build . cd ../../.. - name: Build with Gradle - uses: gradle/gradle-build-action@v1 + uses: gradle/gradle-build-action@v2 with: gradle-version: ${{ matrix.gradle }} arguments: assemble --stacktrace - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: groestlcoinj-core-${{ matrix.java }}-${{ matrix.os }} diff --git a/.github/workflows/checkpoints.yml b/.github/workflows/checkpoints.yml index 9f2b6451407..55212f81584 100644 --- a/.github/workflows/checkpoints.yml +++ b/.github/workflows/checkpoints.yml @@ -4,38 +4,44 @@ on: [push, pull_request] jobs: build: - - runs-on: ubuntu-latest - + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + java: ['11', '17', '19'] + distribution: ['temurin'] + gradle: ['7.6.2'] + fail-fast: false + name: JAVA ${{ matrix.distribution }} ${{ matrix.java }} OS ${{ matrix.os }} Gradle ${{ matrix.gradle }} steps: - - uses: actions/checkout@v3 - - name: set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: gradle - - - name: set NOW env - run: echo "NOW=$(date +'%d.%m.%Y')" >> $GITHUB_ENV - - - name: Build mainnet checkpoints - run: ./tools/build-checkpoints --net=PROD - - - name: Build testnet checkpoints - run: ./tools/build-checkpoints --net=TEST - - - name: Upload artifacts - uses: actions/upload-artifact@v2 - with: - name: checkpoints-${{ env.NOW }} - path: | - tools/checkpoints.txt - tools/checkpoints-testnet.txt - if-no-files-found: error - retention-days: 7 - - - name: Download artifacts - uses: actions/download-artifact@v2 - with: - name: checkpoints-${{ env.NOW }} + - name: Git checkout + uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + - name: set NOW env + run: echo "NOW=$(date +'%d.%m.%Y')" >> $GITHUB_ENV + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + gradle-version: ${{ matrix.gradle }} + - name: Build mainnet checkpoints + run: ./tools/build-checkpoints --net=PROD + - name: Build testnet checkpoints + run: ./tools/build-checkpoints --net=TEST + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: checkpoints-${{ env.NOW }} + path: | + tools/checkpoints.txt + tools/checkpoints-testnet.txt + if-no-files-found: error + retention-days: 7 + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: checkpoints-${{ env.NOW }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c10b4493684..9406523b100 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -8,9 +8,9 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - java: ['8', '11', '17'] + java: ['11', '17', '19'] distribution: ['temurin'] - gradle: ['7.2'] + gradle: ['7.6.2'] include: # Special case to test something close to Debian config with the oldest supported (standard) Gradle on Ubuntu - os: ubuntu-latest @@ -20,9 +20,10 @@ jobs: fail-fast: false name: JAVA ${{ matrix.distribution }} ${{ matrix.java }} OS ${{ matrix.os }} Gradle ${{ matrix.gradle }} steps: - - uses: actions/checkout@v1 + - name: Git checkout + uses: actions/checkout@v3 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java }} @@ -35,12 +36,12 @@ jobs: cmake --build . cd ../../.. - name: Build with Gradle - uses: gradle/gradle-build-action@v1 + uses: gradle/gradle-build-action@v2 with: gradle-version: ${{ matrix.gradle }} arguments: build --stacktrace - name: Upload Test Results and Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: groestlcoinj-core-test-results-jdk${{ matrix.java }}-${{ matrix.os }}