|
| 1 | +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven |
| 3 | + |
| 4 | +name: Java CI with Maven |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "master" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "master" ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + # Long term supported versions |
| 18 | + java-version: [11, 17, 21] |
| 19 | + |
| 20 | + # TODO Add support for 8, but it fails with |
| 21 | + # java.lang.UnsupportedClassVersionError: com/spotify/fmt/FMT has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 |
| 22 | + |
| 23 | + # TODO Should we test locales? The old travis setup did, see: |
| 24 | + # https://github.com/bramp/ffmpeg-cli-wrapper/pull/55 |
| 25 | + |
| 26 | + name: JDK ${{ matrix.java-version }} |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v3 |
| 30 | + |
| 31 | + - name: Set up FFmpeg |
| 32 | + uses: FedericoCarboni/setup-ffmpeg@v3 |
| 33 | + id: setup-ffmpeg |
| 34 | + with: |
| 35 | + ffmpeg-version: release |
| 36 | + |
| 37 | + - name: Set up JDK ${{ matrix.java-version }} |
| 38 | + uses: actions/setup-java@v3 |
| 39 | + with: |
| 40 | + java-version: ${{ matrix.java-version }} |
| 41 | + distribution: 'temurin' |
| 42 | + cache: maven |
| 43 | + |
| 44 | + - name: Compile with Maven |
| 45 | + run: mvn --batch-mode --update-snapshots compile |
| 46 | + |
| 47 | + - name: Test with Maven, Package and Verify with Maven |
| 48 | + run: mvn --batch-mode --update-snapshots verify -Dgpg.skip |
| 49 | + |
| 50 | + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive |
| 51 | + - name: Update dependency graph |
| 52 | + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |
0 commit comments