From be6ec3bbdff8f7c8f625506b77c7586ee2ad5eb5 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 6 Jan 2023 14:28:17 +0100 Subject: ci: Enable Gradle caching on master branch This change updates the build workflow in GitHub Actions to enable caching of the Gradle build when it happens on the master branch. Due to a mistake, this would only happen on a non-existent 'main' branch. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96b86233..78c59a63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,9 +31,9 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: build codeCoverageReport - # Only write to the cache for builds on the 'main' branch. + # Only write to the cache for builds on the 'master' branch. # Builds on other branches will only read existing entries from the cache. - cache-read-only: ${{ github.ref != 'refs/heads/main' }} + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Publish report if: always() uses: mikepenz/action-junit-report@v3 -- cgit v1.2.3 From 0c0a823fec1e67be6f9e72c0c790636f364f8b23 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 6 Jan 2023 14:41:33 +0100 Subject: ci: Pin version of GitHub Actions runner images This change pins the versions of the GitHub Actions runner images used by our workflows to prevent regressions when the latest Ubuntu/Windows image is updated. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78c59a63..4457cdb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest ] + os: [ ubuntu-22.04 ] java: [ 17, 19 ] include: - - os: windows-latest + - os: windows-2022 java: 17 steps: - name: Checkout repository @@ -58,7 +58,7 @@ jobs: files: ./build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml build-docker: name: Build Docker Images - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v3 @@ -80,7 +80,7 @@ jobs: run: working-directory: site name: Build Docs - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 -- cgit v1.2.3 From 8d94287bdc5af03485ed85fee1aab7809dc53566 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 6 Jan 2023 15:12:53 +0100 Subject: ci: Upload distributions after CI build This change uploads the distributions build from the repository after a successful build to allow for testing of the master branch --- .github/workflows/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4457cdb4..255815f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: - arguments: build codeCoverageReport + arguments: build assembleDist codeCoverageReport # Only write to the cache for builds on the 'master' branch. # Builds on other branches will only read existing entries from the cache. cache-read-only: ${{ github.ref != 'refs/heads/master' }} @@ -41,7 +41,7 @@ jobs: check_name: test (Java ${{ matrix.java }}) report_paths: '**/build/test-results/test/TEST-*.xml' github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Upload artifacts + - name: Upload reports if: always() continue-on-error: true # See https://github.com/actions/upload-artifact/issues/270 uses: actions/upload-artifact@v3 @@ -51,6 +51,14 @@ jobs: ./**/build/reports/**/* ./**/build/test-results/**/* retention-days: 5 + - name: Upload build + continue-on-error: true + uses: actions/upload-artifact@v3 + with: + name: build-${{ matrix.os }}-jdk${{ matrix.java }} + path: | + ./**/build/distributions/**/*.zip + retention-days: 5 - name: Upload code coverage uses: codecov/codecov-action@v3 with: -- cgit v1.2.3