Fix CRaC JDK download in docker container #1997
Workflow file for this run
This file contains 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: Java CI | |
on: | |
push: | |
branches: | |
- master | |
- '[1-9]+.[0-9]+.x' | |
pull_request: | |
branches: | |
- master | |
- '[1-9]+.[0-9]+.x' | |
jobs: | |
build: | |
if: github.repository != 'micronaut-projects/micronaut-project-template' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: ['8', '11', '17'] | |
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 | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java }} | |
- name: Optional setup step | |
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 }} | |
run: | | |
[ -f ./setup.sh ] && ./setup.sh || true | |
- name: Build with Gradle | |
run: | | |
# Awful hack for kapt and JDK 16. See https://youtrack.jetbrains.com/issue/KT-45545 | |
if [ ${{ matrix.java }} == 16 ]; then export GRADLE_OPTS="-Dorg.gradle.jvmargs=--illegal-access=permit"; fi | |
./gradlew dependencyUpdates check --no-daemon --parallel --continue | |
env: | |
TESTCONTAINERS_RYUK_DISABLED: true | |
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 }} | |
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}" | |
- name: Publish Test Report | |
if: always() | |
uses: mikepenz/[email protected] | |
with: | |
check_name: Java CI / Test Report (${{ matrix.java }}) | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
check_retries: 'true' | |
- name: Publish to Sonatype Snapshots | |
if: success() && github.event_name == 'push' && matrix.java == '8' | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
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 }} | |
run: ./gradlew publishToSonatype docs --no-daemon | |
- name: Determine docs target repository | |
uses: haya14busa/action-cond@v1 | |
id: docs_target | |
with: | |
cond: ${{ github.repository == 'micronaut-projects/micronaut-core' }} | |
if_true: "micronaut-projects/micronaut-docs" | |
if_false: ${{ github.repository }} | |
- name: Publish to Github Pages | |
if: success() && github.event_name == 'push' && matrix.java == '8' | |
uses: micronaut-projects/github-pages-deploy-action@master | |
env: | |
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: build/docs |