|
| 1 | +# This file was automatically generated by sbt-github-actions using the |
| 2 | +# githubWorkflowGenerate task. You should add and commit this file to |
| 3 | +# your git repository. It goes without saying that you shouldn't edit |
| 4 | +# this file by hand! Instead, if you wish to make changes, you should |
| 5 | +# change your sbt build configuration to revise the workflow description |
| 6 | +# to meet your needs, then regenerate this file. |
| 7 | + |
| 8 | +name: Continuous Integration |
| 9 | + |
| 10 | +on: |
| 11 | + pull_request: |
| 12 | + branches: ['master'] |
| 13 | + push: |
| 14 | + branches: ['master'] |
| 15 | + |
| 16 | +env: |
| 17 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + name: Build and Test |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + os: [ubuntu-latest] |
| 25 | + scala: [2.11.12, 2.12.20, 2.13.15, 3.3.4] |
| 26 | + java: [zulu@17, zulu@21] |
| 27 | + runs-on: ${{ matrix.os }} |
| 28 | + steps: |
| 29 | + - name: Checkout current branch (full) |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + |
| 34 | + - name: Setup Java (zulu@17) |
| 35 | + if: matrix.java == 'zulu@17' |
| 36 | + uses: actions/setup-java@v4 |
| 37 | + with: |
| 38 | + distribution: zulu |
| 39 | + java-version: 17 |
| 40 | + cache: sbt |
| 41 | + |
| 42 | + - name: Setup Java (zulu@21) |
| 43 | + if: matrix.java == 'zulu@21' |
| 44 | + uses: actions/setup-java@v4 |
| 45 | + with: |
| 46 | + distribution: zulu |
| 47 | + java-version: 21 |
| 48 | + cache: sbt |
| 49 | + |
| 50 | + - run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test mimaReportBinaryIssues |
| 51 | + |
| 52 | + - name: Compress target directories |
| 53 | + run: tar cf targets.tar target project/target |
| 54 | + |
| 55 | + - name: Upload target directories |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} |
| 59 | + path: targets.tar |
| 60 | + |
| 61 | + publish: |
| 62 | + name: Publish Artifacts |
| 63 | + needs: [build] |
| 64 | + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' |
| 65 | + strategy: |
| 66 | + matrix: |
| 67 | + os: [ubuntu-latest] |
| 68 | + scala: [2.13.15] |
| 69 | + runs-on: ${{ matrix.os }} |
| 70 | + steps: |
| 71 | + - name: Checkout current branch (full) |
| 72 | + uses: actions/checkout@v4 |
| 73 | + with: |
| 74 | + fetch-depth: 0 |
| 75 | + |
| 76 | + - name: Setup Java (zulu@17) |
| 77 | + uses: actions/setup-java@v4 |
| 78 | + with: |
| 79 | + distribution: zulu |
| 80 | + java-version: 17 |
| 81 | + cache: sbt |
| 82 | + |
| 83 | + - name: Download target directories (2.11.12) |
| 84 | + uses: actions/download-artifact@v4 |
| 85 | + with: |
| 86 | + name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }} |
| 87 | + |
| 88 | + - name: Inflate target directories (2.11.12) |
| 89 | + run: | |
| 90 | + tar xf targets.tar |
| 91 | + rm targets.tar |
| 92 | +
|
| 93 | + - name: Download target directories (2.12.20) |
| 94 | + uses: actions/download-artifact@v4 |
| 95 | + with: |
| 96 | + name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }} |
| 97 | + |
| 98 | + - name: Inflate target directories (2.12.20) |
| 99 | + run: | |
| 100 | + tar xf targets.tar |
| 101 | + rm targets.tar |
| 102 | +
|
| 103 | + - name: Download target directories (2.13.15) |
| 104 | + uses: actions/download-artifact@v4 |
| 105 | + with: |
| 106 | + name: target-${{ matrix.os }}-2.13.15-${{ matrix.java }} |
| 107 | + |
| 108 | + - name: Inflate target directories (2.13.15) |
| 109 | + run: | |
| 110 | + tar xf targets.tar |
| 111 | + rm targets.tar |
| 112 | +
|
| 113 | + - name: Download target directories (3.3.4) |
| 114 | + uses: actions/download-artifact@v4 |
| 115 | + with: |
| 116 | + name: target-${{ matrix.os }}-3.3.4-${{ matrix.java }} |
| 117 | + |
| 118 | + - name: Inflate target directories (3.3.4) |
| 119 | + run: | |
| 120 | + tar xf targets.tar |
| 121 | + rm targets.tar |
| 122 | +
|
| 123 | + - env: |
| 124 | + CI_SNAPSHOT_RELEASE: +publishSigned |
| 125 | + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} |
| 126 | + SONATYPE_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD3 }} |
| 127 | + SONATYPE_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME3 }} |
| 128 | + PGP_SECRET: ${{ secrets.PGP_SECRET }} |
| 129 | + run: sbt -J-Xmx2G ci-release |
0 commit comments