Merge pull request #2537 from karatelabs/dependabot/github_actions/do… #1662
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
name: maven-build | |
on: | |
push: | |
branches: [ master, develop, java11 ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
build: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: set up jdk 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 11 | |
- name: cache maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: build with maven | |
run: mvn -B clean install -P pre-release -Djavacpp.platform=linux-x86_64 | |
- name: build and test with docker | |
run: ./build-docker.sh | |
- name: upload workspace if build fails | |
# if: ${{ failure() }} | |
if: ${{ false }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-results | |
path: . | |
retention-days: 5 |