diff options
| author | Gerd Aschemann <github@aschemann.net> | 2024-01-23 19:13:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-23 19:13:13 +0100 |
| commit | c232346e876120b78790cbe73f0ffa891ef6f941 (patch) | |
| tree | 6f1b283ac76ec1a8c04842227dfc16a67051bce6 /.github | |
| parent | 415b3eb5c5dbaf6f7228898e1f6b84fa366b373e (diff) | |
#540 Cache SDKman (#554)
IMPORTANT: Only use SDKman provided Java - System JDK no longer installed!
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/maven.yml | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9c0bc3b..2014739 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,6 +17,8 @@ name: Build on: + # Enable manual re-run + workflow_dispatch: { } push: branches: [ main ] pull_request: @@ -32,11 +34,12 @@ jobs: with: submodules: 'true' - - name: 'Set up Java' - uses: actions/setup-java@v2 + - name: Cache SDKMan + id: cache-sdkman + uses: actions/cache@v4 with: - java-version: 21 - distribution: 'temurin' + path: ~/.sdkman + key: ${{ runner.os }}-sdkman - name: 'Cache Maven packages' uses: actions/cache@v3 @@ -45,21 +48,20 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - #- name: Cache SDKMan - # id: cache-sdkman - # uses: actions/cache@v4 - # with: - # path: ~/.sdkman - # key: ${{ runner.os }}-sdkman - - - name: 'Build project' - run: mvn -B clean verify -Pci - - name: 'Setup SDKMAN' uses: sdkman/sdkman-action@b1f9b696c79148b66d3d3a06f7ea801820318d0f id: sdkman - if: github.event_name == 'pull_request' + + - name: 'Build project' + run: | + source "$HOME/.sdkman/bin/sdkman-init.sh" + ./mvnw --version + ./mvnw -B clean verify -Pci - name: 'Test submission' - run: ./test_ci.sh ${{ github.event.pull_request.user.login }} + shell: bash + run: | + ./test_ci.sh ${{ github.event.pull_request.user.login }} if: github.event_name == 'pull_request' + + |
