GraalVM Dev CI #868
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 * * 6" # Saturdays at 1am Europe/Madrid; the gate below runs every other Saturday | |
| timezone: "Europe/Madrid" | |
| jobs: | |
| should_run: | |
| if: github.repository != 'micronaut-projects/micronaut-project-template' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_run: ${{ steps.biweekly.outputs.should_run }} | |
| steps: | |
| - name: Check biweekly schedule | |
| id: biweekly | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| current_date="$(TZ=Europe/Madrid date +%F)" | |
| current_day="$(date -u -d "${current_date}" +%s)" | |
| anchor_day="$(date -u -d "2026-09-12" +%s)" | |
| days_since_anchor=$(( (current_day - anchor_day) / 86400 )) | |
| should_run=false | |
| if (( days_since_anchor >= 0 && days_since_anchor % 14 == 0 )); then | |
| should_run=true | |
| fi | |
| echo "Current date: ${current_date}" | |
| echo "Days since anchor: ${days_since_anchor}" | |
| echo "Run build: ${should_run}" | |
| echo "should_run=${should_run}" >> "${GITHUB_OUTPUT}" | |
| build_matrix: | |
| needs: should_run | |
| if: github.repository != 'micronaut-projects/micronaut-project-template' && needs.should_run.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
| DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
| DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
| outputs: | |
| matrix: ${{ steps.build-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Build Matrix | |
| uses: micronaut-projects/github-actions/graalvm/build-matrix@5f587657fc12601ab92d64d077f99a54c3cbdf78 # master | |
| id: build-matrix | |
| with: | |
| java-version: '25' | |
| build: | |
| needs: build_matrix | |
| if: github.repository != 'micronaut-projects/micronaut-project-template' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 6 | |
| matrix: | |
| java: ['dev', 'latest-ea'] | |
| distribution: ['graalvm-community', 'graalvm'] | |
| native_test_task: ${{ fromJson(needs.build_matrix.outputs.matrix).native_test_task }} | |
| exclude: | |
| - java: 'dev' | |
| distribution: 'graalvm' | |
| - java: 'latest-ea' | |
| distribution: 'graalvm-community' | |
| env: | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
| DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
| DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
| steps: | |
| - name: Remove system JDKs | |
| run: | | |
| sudo rm -rf /usr/lib/jvm/* | |
| unset JAVA_HOME | |
| export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:) | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Pre-Build Steps | |
| uses: micronaut-projects/github-actions/graalvm/pre-build@5f587657fc12601ab92d64d077f99a54c3cbdf78 # master | |
| id: pre-build | |
| with: | |
| java: ${{ matrix.java }} | |
| distribution: ${{ matrix.distribution }} | |
| nativeTestTask: ${{ matrix.native_test_task }} | |
| gradle-java: '25' | |
| - name: Build Steps | |
| uses: micronaut-projects/github-actions/graalvm/build@5f587657fc12601ab92d64d077f99a54c3cbdf78 # master | |
| id: build | |
| env: | |
| GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }} | |
| GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
| GRAALVM_QUICK_BUILD: true | |
| NATIVE_IMAGE_OPTIONS: "-H:+ReportExceptionStackTraces" | |
| with: | |
| nativeTestTask: ${{ matrix.native_test_task }} | |
| - name: Post-Build Steps | |
| uses: micronaut-projects/github-actions/graalvm/post-build@5f587657fc12601ab92d64d077f99a54c3cbdf78 # master | |
| id: post-build | |
| with: | |
| java: ${{ matrix.java }} |