|
| 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: ['**'] |
| 13 | + push: |
| 14 | + branches: ['**'] |
| 15 | + tags: [v*] |
| 16 | + |
| 17 | +env: |
| 18 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + name: Build and Test |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + os: [ubuntu-latest] |
| 26 | + scala: [2.11.12, 2.12.20, 2.13.15, 3.3.4] |
| 27 | + java: [zulu@8, zulu@11, zulu@17, zulu@21] |
| 28 | + runs-on: ${{ matrix.os }} |
| 29 | + steps: |
| 30 | + - name: Checkout current branch (full) |
| 31 | + uses: actions/checkout@v4 |
| 32 | + with: |
| 33 | + fetch-depth: 0 |
| 34 | + |
| 35 | + - name: Setup Java (zulu@8) |
| 36 | + if: matrix.java == 'zulu@8' |
| 37 | + uses: actions/setup-java@v4 |
| 38 | + with: |
| 39 | + distribution: zulu |
| 40 | + java-version: 8 |
| 41 | + cache: sbt |
| 42 | + |
| 43 | + - name: Setup Java (zulu@11) |
| 44 | + if: matrix.java == 'zulu@11' |
| 45 | + uses: actions/setup-java@v4 |
| 46 | + with: |
| 47 | + distribution: zulu |
| 48 | + java-version: 11 |
| 49 | + cache: sbt |
| 50 | + |
| 51 | + - name: Setup Java (zulu@17) |
| 52 | + if: matrix.java == 'zulu@17' |
| 53 | + uses: actions/setup-java@v4 |
| 54 | + with: |
| 55 | + distribution: zulu |
| 56 | + java-version: 17 |
| 57 | + cache: sbt |
| 58 | + |
| 59 | + - name: Setup Java (zulu@21) |
| 60 | + if: matrix.java == 'zulu@21' |
| 61 | + uses: actions/setup-java@v4 |
| 62 | + with: |
| 63 | + distribution: zulu |
| 64 | + java-version: 21 |
| 65 | + cache: sbt |
| 66 | + |
| 67 | + - name: Check that workflows are up to date |
| 68 | + run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' githubWorkflowCheck |
| 69 | + |
| 70 | + - name: Build project |
| 71 | + run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test |
| 72 | + |
| 73 | + - name: Compress target directories |
| 74 | + run: tar cf targets.tar target project/target |
| 75 | + |
| 76 | + - name: Upload target directories |
| 77 | + uses: actions/upload-artifact@v4 |
| 78 | + with: |
| 79 | + name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} |
| 80 | + path: targets.tar |
| 81 | + |
| 82 | + publish: |
| 83 | + name: Publish Artifacts |
| 84 | + needs: [build] |
| 85 | + if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v')) |
| 86 | + strategy: |
| 87 | + matrix: |
| 88 | + os: [ubuntu-latest] |
| 89 | + scala: [2.13.15] |
| 90 | + java: [zulu@8] |
| 91 | + runs-on: ${{ matrix.os }} |
| 92 | + steps: |
| 93 | + - name: Checkout current branch (full) |
| 94 | + uses: actions/checkout@v4 |
| 95 | + with: |
| 96 | + fetch-depth: 0 |
| 97 | + |
| 98 | + - name: Setup Java (zulu@8) |
| 99 | + if: matrix.java == 'zulu@8' |
| 100 | + uses: actions/setup-java@v4 |
| 101 | + with: |
| 102 | + distribution: zulu |
| 103 | + java-version: 8 |
| 104 | + cache: sbt |
| 105 | + |
| 106 | + - name: Setup Java (zulu@11) |
| 107 | + if: matrix.java == 'zulu@11' |
| 108 | + uses: actions/setup-java@v4 |
| 109 | + with: |
| 110 | + distribution: zulu |
| 111 | + java-version: 11 |
| 112 | + cache: sbt |
| 113 | + |
| 114 | + - name: Setup Java (zulu@17) |
| 115 | + if: matrix.java == 'zulu@17' |
| 116 | + uses: actions/setup-java@v4 |
| 117 | + with: |
| 118 | + distribution: zulu |
| 119 | + java-version: 17 |
| 120 | + cache: sbt |
| 121 | + |
| 122 | + - name: Setup Java (zulu@21) |
| 123 | + if: matrix.java == 'zulu@21' |
| 124 | + uses: actions/setup-java@v4 |
| 125 | + with: |
| 126 | + distribution: zulu |
| 127 | + java-version: 21 |
| 128 | + cache: sbt |
| 129 | + |
| 130 | + - name: Download target directories (2.11.12) |
| 131 | + uses: actions/download-artifact@v4 |
| 132 | + with: |
| 133 | + name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }} |
| 134 | + |
| 135 | + - name: Inflate target directories (2.11.12) |
| 136 | + run: | |
| 137 | + tar xf targets.tar |
| 138 | + rm targets.tar |
| 139 | +
|
| 140 | + - name: Download target directories (2.12.20) |
| 141 | + uses: actions/download-artifact@v4 |
| 142 | + with: |
| 143 | + name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }} |
| 144 | + |
| 145 | + - name: Inflate target directories (2.12.20) |
| 146 | + run: | |
| 147 | + tar xf targets.tar |
| 148 | + rm targets.tar |
| 149 | +
|
| 150 | + - name: Download target directories (2.13.15) |
| 151 | + uses: actions/download-artifact@v4 |
| 152 | + with: |
| 153 | + name: target-${{ matrix.os }}-2.13.15-${{ matrix.java }} |
| 154 | + |
| 155 | + - name: Inflate target directories (2.13.15) |
| 156 | + run: | |
| 157 | + tar xf targets.tar |
| 158 | + rm targets.tar |
| 159 | +
|
| 160 | + - name: Download target directories (3.3.4) |
| 161 | + uses: actions/download-artifact@v4 |
| 162 | + with: |
| 163 | + name: target-${{ matrix.os }}-3.3.4-${{ matrix.java }} |
| 164 | + |
| 165 | + - name: Inflate target directories (3.3.4) |
| 166 | + run: | |
| 167 | + tar xf targets.tar |
| 168 | + rm targets.tar |
| 169 | +
|
| 170 | + - env: |
| 171 | + CI_SNAPSHOT_RELEASE: +publishSigned |
| 172 | + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} |
| 173 | + SONATYPE_PASSWORD: ${{ secrets.CI_S01_DEPLOY_PASSWORD }} |
| 174 | + SONATYPE_USERNAME: ${{ secrets.CI_S01_DEPLOY_USERNAME }} |
| 175 | + PGP_SECRET: ${{ secrets.PGP_SECRET }} |
| 176 | + run: sbt -J-Xmx2G ci-release |
0 commit comments