|
1 | 1 | name: Dotty CI
|
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + schedule: |
| 7 | + - cron: '0 3 * * *' # Every day at 3 AM |
4 | 8 |
|
5 | 9 | env:
|
6 | 10 | DOTTY_CI_RUN: true
|
@@ -112,8 +116,11 @@ jobs:
|
112 | 116 | test_sbt:
|
113 | 117 | runs-on: self-hosted
|
114 | 118 | container: akmetiuk/dotty:2020-02-12
|
115 |
| - if: github.event_name == 'push' && |
116 |
| - startsWith(github.event.ref, 'refs/tags/') |
| 119 | + if: ( |
| 120 | + github.event_name == 'push' && |
| 121 | + startsWith(github.event.ref, 'refs/tags/') |
| 122 | + ) || |
| 123 | + github.event_name == 'schedule' |
117 | 124 |
|
118 | 125 | steps:
|
119 | 126 | - name: Git Checkout
|
@@ -146,8 +153,11 @@ jobs:
|
146 | 153 | test_java11:
|
147 | 154 | runs-on: self-hosted
|
148 | 155 | container: akmetiuk/dotty:2020-02-12
|
149 |
| - if: github.event_name == 'push' && |
150 |
| - startsWith(github.event.ref, 'refs/tags/') |
| 156 | + if: ( |
| 157 | + github.event_name == 'push' && |
| 158 | + startsWith(github.event.ref, 'refs/tags/') |
| 159 | + ) || |
| 160 | + github.event_name == 'schedule' |
151 | 161 |
|
152 | 162 | steps:
|
153 | 163 | - name: Git Checkout
|
@@ -178,3 +188,84 @@ jobs:
|
178 | 188 | run: |
|
179 | 189 | export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
|
180 | 190 | ./project/scripts/sbt ";compile ;test"
|
| 191 | +
|
| 192 | + publish_nightly: |
| 193 | + runs-on: self-hosted |
| 194 | + container: akmetiuk/dotty:2020-02-12 |
| 195 | + needs: [test, test_bootstrapped, community_build, test_sbt, test_java11] |
| 196 | + if: github.event_name == 'schedule' |
| 197 | + env: |
| 198 | + NIGHTLYBUILD: yes |
| 199 | + PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase |
| 200 | + PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string |
| 201 | + SONATYPE_PW: ${{ secrets.SONATYPE_PW }} |
| 202 | + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} |
| 203 | + |
| 204 | + steps: |
| 205 | + - name: Git Checkout |
| 206 | + uses: actions/checkout@v2 |
| 207 | + |
| 208 | + - name: Cache Ivy |
| 209 | + |
| 210 | + with: |
| 211 | + path: /root/.ivy2/cache |
| 212 | + key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }} |
| 213 | + restore-keys: ${{ runner.os }}-ivy- |
| 214 | + |
| 215 | + - name: Cache SBT |
| 216 | + |
| 217 | + with: |
| 218 | + path: /root/.sbt |
| 219 | + key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }} |
| 220 | + restore-keys: ${{ runner.os }}-sbt- |
| 221 | + |
| 222 | + - name: Cache Coursier and Mill |
| 223 | + |
| 224 | + with: |
| 225 | + path: /root/.cache |
| 226 | + key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }} |
| 227 | + restore-keys: ${{ runner.os }}-general- |
| 228 | + |
| 229 | + - name: Publish Nightly |
| 230 | + run: | |
| 231 | + ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease" |
| 232 | +
|
| 233 | + nightly_documentation: |
| 234 | + runs-on: self-hosted |
| 235 | + container: akmetiuk/dotty:2020-02-12 |
| 236 | + needs: [publish_nightly] |
| 237 | + if: github.event_name == 'schedule' |
| 238 | + env: |
| 239 | + NIGHTLYBUILD: yes |
| 240 | + BOT_TOKEN: ${{ secrets.BOT_TOKEN }} # If you need to change this: |
| 241 | + # Generate one at https://github.com/settings/tokens |
| 242 | + # Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website |
| 243 | + |
| 244 | + steps: |
| 245 | + - name: Git Checkout |
| 246 | + uses: actions/checkout@v2 |
| 247 | + |
| 248 | + - name: Cache Ivy |
| 249 | + |
| 250 | + with: |
| 251 | + path: /root/.ivy2/cache |
| 252 | + key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }} |
| 253 | + restore-keys: ${{ runner.os }}-ivy- |
| 254 | + |
| 255 | + - name: Cache SBT |
| 256 | + |
| 257 | + with: |
| 258 | + path: /root/.sbt |
| 259 | + key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }} |
| 260 | + restore-keys: ${{ runner.os }}-sbt- |
| 261 | + |
| 262 | + - name: Cache Coursier and Mill |
| 263 | + |
| 264 | + with: |
| 265 | + path: /root/.cache |
| 266 | + key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }} |
| 267 | + restore-keys: ${{ runner.os }}-general- |
| 268 | + |
| 269 | + - name: Nightly Documentation |
| 270 | + run: | |
| 271 | + ./project/scripts/genDocs -doc-snapshot |
0 commit comments