build.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Java CI with Maven
  2. on:
  3. push:
  4. branches: [ main, 2.3.x, 2.4.x, 3.0.x ]
  5. pull_request:
  6. branches: [ main, 2.3.x, 2.4.x, 3.0.x ]
  7. jobs:
  8. build:
  9. name: "Test with ${{ matrix.version }}"
  10. strategy:
  11. matrix:
  12. version: [ 8.0.312-tem, 11.0.13-tem ]
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Cache local Maven repository
  17. uses: actions/cache@v2
  18. with:
  19. path: ~/.m2/repository
  20. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  21. restore-keys: ${{ runner.os }}-maven-
  22. - name: Download ${{ matrix.version }}
  23. uses: sdkman/sdkman-action@master
  24. id: sdkman
  25. with:
  26. candidate: java
  27. version: ${{ matrix.version }}
  28. - name: Set up ${{ matrix.version }}
  29. uses: actions/setup-java@v1
  30. with:
  31. java-version: 8
  32. jdkFile: ${{ steps.sdkman.outputs.file }}
  33. - name: Build with Maven
  34. run: ./mvnw -V -B verify
  35. build-java-17:
  36. name: "Test with ${{ matrix.version }}"
  37. strategy:
  38. matrix:
  39. version: [ 17.0.1-tem ]
  40. runs-on: ubuntu-latest
  41. steps:
  42. - uses: actions/checkout@v2
  43. - name: Cache local Maven repository
  44. uses: actions/cache@v2
  45. with:
  46. path: ~/.m2/repository
  47. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  48. restore-keys: ${{ runner.os }}-maven-
  49. - name: Download ${{ matrix.version }}
  50. uses: sdkman/sdkman-action@master
  51. id: sdkman
  52. with:
  53. candidate: java
  54. version: ${{ matrix.version }}
  55. - name: Set up ${{ matrix.version }}
  56. uses: actions/setup-java@v1
  57. with:
  58. java-version: 8
  59. jdkFile: ${{ steps.sdkman.outputs.file }}
  60. - name: Build with Maven
  61. run: ./mvnw -V -B verify -Dspotless.check.skip=true -Dspotless.apply.skip=true