IMPORTANT: Only use SDKman provided Java - System JDK no longer installed!
This commit is contained in:
parent
415b3eb5c5
commit
c232346e87
34
.github/workflows/maven.yml
vendored
34
.github/workflows/maven.yml
vendored
@ -17,6 +17,8 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Enable manual re-run
|
||||||
|
workflow_dispatch: { }
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -32,11 +34,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
|
|
||||||
- name: 'Set up Java'
|
- name: Cache SDKMan
|
||||||
uses: actions/setup-java@v2
|
id: cache-sdkman
|
||||||
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
path: ~/.sdkman
|
||||||
distribution: 'temurin'
|
key: ${{ runner.os }}-sdkman
|
||||||
|
|
||||||
- name: 'Cache Maven packages'
|
- name: 'Cache Maven packages'
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -45,21 +48,20 @@ jobs:
|
|||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: ${{ runner.os }}-m2
|
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'
|
- name: 'Setup SDKMAN'
|
||||||
uses: sdkman/sdkman-action@b1f9b696c79148b66d3d3a06f7ea801820318d0f
|
uses: sdkman/sdkman-action@b1f9b696c79148b66d3d3a06f7ea801820318d0f
|
||||||
id: sdkman
|
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'
|
- 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'
|
if: github.event_name == 'pull_request'
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user