From deed773021f9604b46e40e807adbf08559e4d84f Mon Sep 17 00:00:00 2001 From: micronaut-build Date: Tue, 28 Mar 2023 05:36:43 +0000 Subject: [PATCH] Update common files --- .github/workflows/graalvm.yml | 76 +++++++++++++++++++++++++++++++++++ .github/workflows/gradle.yml | 2 +- MAINTAINING.md | 4 +- 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/graalvm.yml diff --git a/.github/workflows/graalvm.yml b/.github/workflows/graalvm.yml new file mode 100644 index 0000000..25f4ec7 --- /dev/null +++ b/.github/workflows/graalvm.yml @@ -0,0 +1,76 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: GraalVM Dev CI +on: + schedule: + - cron: "0 1 * * 1-5" # Mon-Fri at 1am UTC + workflow_dispatch: +jobs: + build: + if: github.repository != 'micronaut-projects/micronaut-project-template' + runs-on: ubuntu-latest + strategy: + matrix: + graalvm: [ 'dev'] + java: ['17'] + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} + GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }} + GH_USERNAME: ${{ secrets.GH_USERNAME }} + TESTCONTAINERS_RYUK_DISABLED: true + PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + # https://github.com/actions/virtual-environments/issues/709 + - name: "🗑 Free disk space" + run: | + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo apt-get clean + df -h + + - name: "📥 Checkout repository" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: "🔧 Setup GraalVM CE" + uses: graalvm/setup-graalvm@v1 + with: + version: ${{ matrix.graalvm }} + java-version: ${{ matrix.java }} + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: "🔧 Setup Gradle" + uses: gradle/gradle-build-action@v2 + + - name: "❓ Optional setup step" + run: | + [ -f ./setup.sh ] && ./setup.sh || [ ! -f ./setup.sh ] + + - name: "🛠 Build with Gradle" + id: gradle + run: | + ./gradlew check --no-daemon --continue + + - name: "📊 Publish Test Report" + if: always() + uses: mikepenz/action-junit-report@v3 + with: + check_name: Java CI / Test Report (${{ matrix.java }}) + report_paths: '**/build/test-results/test/TEST-*.xml' + check_retries: 'true' + + - name: "📜 Upload binary compatibility check results" + if: always() + uses: actions/upload-artifact@v3 + with: + name: binary-compatibility-reports + path: "**/build/reports/binary-compatibility-*.html" + diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1397b67..d0c741c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -63,7 +63,7 @@ jobs: - name: "🛠 Build with Gradle" id: gradle run: | - ./gradlew check --no-daemon --parallel --continue + ./gradlew check --no-daemon --continue - name: "🔎 Run static analysis" if: env.SONAR_TOKEN != '' diff --git a/MAINTAINING.md b/MAINTAINING.md index b4d94bd..90e3dff 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -115,7 +115,7 @@ Renovate and our workflow will keep sending PRs. You should also create an issue #### Files sync -We have a [template repo](https://github.com/micronaut-projects/micronaut-logging) that we use as the single +We have a [template repo](https://github.com/micronaut-projects/micronaut-project-template) that we use as the single source of truth for certain files. It is used as a template to create new repos, and changes to certain files in the template repo will get propagated automatically. The files propagated are: @@ -169,7 +169,7 @@ If you are publishing a milestone or release candidate, check the pre-release ch Note that the release tags must be preceded with `v`, e.g.: `v1.2.3`. Once you publish the GitHub release, the -[Release GitHub Action workflow](https://github.com/micronaut-projects/micronaut-logging/blob/master/.github/workflows/release.yml) +[Release GitHub Action workflow](https://github.com/micronaut-projects/micronaut-project-template/blob/master/.github/workflows/release.yml) will kick off, performing the following steps: * Pre-release: sets the `projectVersion` property in `gradle.properties` to the release version, and commit and pushes