@@ -2,13 +2,24 @@ name: Dotty
2
2
3
3
on :
4
4
push :
5
- branches-ignore :
6
- - ' language-reference-stable'
5
+ # # Be careful if you add or remove something here! Quoting from
6
+ # # <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore>:
7
+ # #
8
+ # # > If you define only tags/tags-ignore or only branches/branches-ignore, the
9
+ # # > workflow won't run for events affecting the undefined Git ref. If you
10
+ # # > define neither tags/tags-ignore or branches/branches-ignore, the workflow
11
+ # # > will run for events affecting either branches or tags.
12
+ # #
13
+ # # We want the CI to run on both branches and tags, so we should either have:
14
+ # # - both (tags or tags-ignore) and (branches or branches-ignore),
15
+ # # - or neither of them.
16
+ # # But it's important to not have only one or the other.
7
17
tags :
8
- - ' **'
9
- pull_request :
18
+ - ' *'
10
19
branches-ignore :
11
- - ' language-reference-stable'
20
+ - ' gh-readonly-queue/**'
21
+ pull_request :
22
+ merge_group :
12
23
schedule :
13
24
- cron : ' 0 3 * * *' # Every day at 3 AM
14
25
workflow_dispatch :
91
102
- ${{ github.workspace }}/../../cache/general:/root/.cache
92
103
if : " github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
93
104
|| github.event_name == 'push'
105
+ || github.event_name == 'merge_group'
94
106
|| (
95
107
github.event_name == 'pull_request'
96
108
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -136,6 +148,7 @@ jobs:
136
148
github.event_name == 'push'
137
149
&& github.ref != 'refs/heads/main'
138
150
)
151
+ || github.event_name == 'merge_group'
139
152
|| (
140
153
github.event_name == 'pull_request'
141
154
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -212,6 +225,7 @@ jobs:
212
225
- ${{ github.workspace }}/../../cache/general:/root/.cache
213
226
if : " github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
214
227
|| github.event_name == 'push'
228
+ || github.event_name == 'merge_group'
215
229
|| (
216
230
github.event_name == 'pull_request'
217
231
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -252,10 +266,12 @@ jobs:
252
266
- ${{ github.workspace }}/../../cache/general:/root/.cache
253
267
if : " github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
254
268
|| github.event_name == 'push'
269
+ || github.event_name == 'merge_group'
255
270
|| (
256
271
github.event_name == 'pull_request'
257
272
&& !contains(github.event.pull_request.body, '[skip ci]')
258
273
&& !contains(github.event.pull_request.body, '[skip community_build]')
274
+ && !contains(github.event.pull_request.body, '[skip community_build_a]')
259
275
)
260
276
|| (
261
277
github.event_name == 'workflow_dispatch'
@@ -299,10 +315,12 @@ jobs:
299
315
- ${{ github.workspace }}/../../cache/general:/root/.cache
300
316
if : " github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
301
317
|| github.event_name == 'push'
318
+ || github.event_name == 'merge_group'
302
319
|| (
303
320
github.event_name == 'pull_request'
304
321
&& !contains(github.event.pull_request.body, '[skip ci]')
305
322
&& !contains(github.event.pull_request.body, '[skip community_build]')
323
+ && !contains(github.event.pull_request.body, '[skip community_build_b]')
306
324
)
307
325
|| (
308
326
github.event_name == 'workflow_dispatch'
@@ -346,10 +364,12 @@ jobs:
346
364
- ${{ github.workspace }}/../../cache/general:/root/.cache
347
365
if : " github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
348
366
|| github.event_name == 'push'
367
+ || github.event_name == 'merge_group'
349
368
|| (
350
369
github.event_name == 'pull_request'
351
370
&& !contains(github.event.pull_request.body, '[skip ci]')
352
371
&& !contains(github.event.pull_request.body, '[skip community_build]')
372
+ && !contains(github.event.pull_request.body, '[skip community_build_c]')
353
373
)
354
374
|| (
355
375
github.event_name == 'workflow_dispatch'
@@ -576,45 +596,6 @@ jobs:
576
596
external_repository : lampepfl/dotty-website
577
597
publish_branch : gh-pages
578
598
579
- nightly_unmanaged_community_build :
580
- # Self-hosted runner is used only for getting current build version
581
- runs-on : [self-hosted, Linux]
582
- container :
583
- image : lampepfl/dotty:2021-03-22
584
- options : --cpu-shares 4096
585
- volumes :
586
- - ${{ github.workspace }}/../../cache/sbt:/root/.sbt
587
- - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
588
- - ${{ github.workspace }}/../../cache/general:/root/.cache
589
- needs : [publish_nightly]
590
- if : " (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
591
- env :
592
- NIGHTLYBUILD : yes
593
- steps :
594
- - name : Reset existing repo
595
- run : git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
596
-
597
- - name : Checkout cleanup script
598
- uses : actions/checkout@v3
599
-
600
- - name : Cleanup
601
- run : .github/workflows/cleanup.sh
602
-
603
- - name : Git Checkout
604
- uses : actions/checkout@v3
605
-
606
- - name : Add SBT proxy repositories
607
- run : cp -vf .github/workflows/repositories /root/.sbt/ ; true
608
-
609
- - name : Get version string for this build
610
- run : |
611
- ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
612
- echo "This build version: $ver"
613
- echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
614
- # Steps above are copy-pasted from publish_nightly, needed only to resolve THISBUILD_VERSION
615
- - name : Trigger unmanaged community build
616
- run : .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"
617
-
618
599
publish_release :
619
600
permissions :
620
601
contents : write # for actions/create-release to create a release
0 commit comments