|
8 | 8 | build: |
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | | - java: |
12 | | - - version: 8 |
13 | | - javaInstall: | |
14 | | - 8 |
15 | | - 17 |
16 | | - buildProfile: 8 |
17 | | - testProfile: 8 |
18 | | - - version: 11 |
19 | | - javaInstall: | |
20 | | - 11 |
21 | | - 17 |
22 | | - buildProfile: 11 |
| 11 | + buildProfile: [ 8, 11 ] |
| 12 | + testProfile: [ 8, 11, 17 ] |
| 13 | + firebird: [ '5.0.4' ] |
| 14 | + canFail: [ false ] |
| 15 | + include: |
| 16 | + - buildProfile: 11 |
| 17 | + testProfile: 11 |
| 18 | + firebird: '6-snapshot' |
| 19 | + canFail: true |
| 20 | + exclude: |
| 21 | + - buildProfile: 8 |
23 | 22 | testProfile: 11 |
24 | | - - version: 11-test-17 |
25 | | - javaInstall: | |
26 | | - 11 |
27 | | - 17 |
28 | | - buildProfile: 11 |
| 23 | + - buildProfile: 8 |
29 | 24 | testProfile: 17 |
| 25 | + - buildProfile: 11 |
| 26 | + testProfile: 8 |
30 | 27 | runs-on: ubuntu-latest |
| 28 | + continue-on-error: ${{ matrix.canFail }} |
31 | 29 | steps: |
32 | 30 | - name: Login to Docker Hub |
| 31 | + # PRs from forks don't have access to the secrets, skip Docker login and hope we don't hit the rate limit |
| 32 | + if: ${{ !github.event.pull_request.head.repo.fork }} |
33 | 33 | uses: docker/login-action@v4 |
34 | 34 | with: |
35 | 35 | username: ${{ secrets.DOCKERHUB_USERNAME }} |
36 | 36 | password: ${{ secrets.DOCKERHUB_TOKEN }} |
37 | | - - uses: juarezr/firebirdsql-github-action@v2.3.0 |
| 37 | + - name: Setup Firebird ${{ matrix.firebird }} |
| 38 | + uses: juarezr/firebirdsql-github-action@v2.3.0 |
38 | 39 | with: |
39 | | - version: '5.0.4' |
| 40 | + version: ${{ matrix.firebird }} |
40 | 41 | firebird_root_password: 'masterkey' |
41 | 42 | firebird_conf: 'WireCrypt=Enabled,AuthServer=Srp256;Srp;Legacy_Auth;Srp224;Srp384;Srp512,UserManager=Srp;Legacy_UserManager' |
42 | 43 | - uses: actions/checkout@v6 |
43 | | - - name: Set up Java ${{ matrix.java.version }} |
| 44 | + - name: Set up Java ${{ matrix.buildProfile }} (build) and ${{ matrix.testProfile }} (test) |
44 | 45 | uses: actions/setup-java@v5 |
45 | 46 | with: |
46 | | - java-version: ${{ matrix.java.javaInstall }} |
| 47 | + # NOTE: The last version (17) is the default; it's used to run Gradle |
| 48 | + java-version: | |
| 49 | + ${{ matrix.buildProfile }} |
| 50 | + ${{ matrix.testProfile }} |
| 51 | + 17 |
47 | 52 | distribution: 'temurin' |
48 | 53 | - name: Setup Gradle |
49 | 54 | uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e |
50 | 55 | with: |
51 | 56 | cache-read-only: ${{ github.ref != 'refs/heads/Branch_5_0' }} |
52 | 57 | - name: Build with Gradle |
53 | | - run: ./gradlew test -PbuildProfile=${{ matrix.java.buildProfile }} -PtestProfile=${{ matrix.java.testProfile }} -Ptest.dbondocker=true -Ptest.db.dir=/var/lib/firebird/data |
| 58 | + run: ./gradlew test -PbuildProfile=${{ matrix.buildProfile }} -PtestProfile=${{ matrix.testProfile }} -Ptest.dbondocker=true -Ptest.db.dir=/var/lib/firebird/data |
54 | 59 | - name: Store Report Artifact |
55 | 60 | uses: actions/upload-artifact@v7 |
56 | 61 | if: always() |
57 | 62 | with: |
58 | | - name: report-artifacts-${{ matrix.java.version }} |
| 63 | + name: report-artifacts-${{ matrix.buildProfile }}-${{ matrix.testProfile }}-${{ matrix.firebird }} |
59 | 64 | path: build/reports |
60 | 65 | compression-level: 9 |
61 | 66 | retention-days: 7 |
0 commit comments