Skip to content

Commit 1ca06a4

Browse files
author
gorilskij
committed
Merge remote-tracking branch 'origin/main'
2 parents bc8dc65 + b1f00a7 commit 1ca06a4

File tree

595 files changed

+16551
-4266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+16551
-4266
lines changed

.github/workflows/ci.yaml

Lines changed: 71 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Dotty
22

33
on:
44
push:
5+
branches-ignore:
6+
- 'language-reference-stable'
57
pull_request:
8+
branches-ignore:
9+
- 'language-reference-stable'
610
schedule:
711
- cron: '0 3 * * *' # Every day at 3 AM
812
workflow_dispatch:
@@ -115,10 +119,6 @@ jobs:
115119
./project/scripts/cmdTests
116120
./project/scripts/bootstrappedOnlyCmdTests
117121
118-
- name: MiMa
119-
run: |
120-
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues"
121-
122122
test_windows_fast:
123123
runs-on: [self-hosted, Windows]
124124
if: "(
@@ -189,7 +189,8 @@ jobs:
189189
run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test"
190190
shell: cmd
191191

192-
community_build_a:
192+
mima:
193+
name: MiMa
193194
runs-on: [self-hosted, Linux]
194195
container:
195196
image: lampepfl/dotty:2021-03-22
@@ -203,13 +204,12 @@ jobs:
203204
|| (
204205
github.event_name == 'pull_request'
205206
&& !contains(github.event.pull_request.body, '[skip ci]')
206-
&& !contains(github.event.pull_request.body, '[skip community_build]')
207+
&& !contains(github.event.pull_request.body, '[skip mima]')
207208
)
208209
|| (
209210
github.event_name == 'workflow_dispatch'
210211
&& github.repository == 'lampepfl/dotty'
211212
)"
212-
213213
steps:
214214
- name: Reset existing repo
215215
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
@@ -226,17 +226,11 @@ jobs:
226226
- name: Add SBT proxy repositories
227227
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
228228

229-
- name: Test
229+
- name: MiMa
230230
run: |
231-
git submodule sync
232-
git submodule update --init --recursive --jobs 7
233-
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
234-
235-
- name: Show dependency tracking file
236-
if: ${{ always() }}
237-
run: cat community-build/dotty-community-build-deps || true
231+
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues"
238232
239-
community_build_b:
233+
community_build_a:
240234
runs-on: [self-hosted, Linux]
241235
container:
242236
image: lampepfl/dotty:2021-03-22
@@ -277,16 +271,16 @@ jobs:
277271
run: |
278272
git submodule sync
279273
git submodule update --init --recursive --jobs 7
280-
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
274+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
281275
282276
- name: Show dependency tracking file
283277
if: ${{ always() }}
284278
run: cat community-build/dotty-community-build-deps || true
285279

286-
community_build_c:
280+
community_build_b:
287281
runs-on: [self-hosted, Linux]
288282
container:
289-
image: lampepfl/dotty:2020-11-19
283+
image: lampepfl/dotty:2021-03-22
290284
options: --cpu-shares 4096
291285
volumes:
292286
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
@@ -324,27 +318,27 @@ jobs:
324318
run: |
325319
git submodule sync
326320
git submodule update --init --recursive --jobs 7
327-
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
321+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
328322
329323
- name: Show dependency tracking file
330324
if: ${{ always() }}
331325
run: cat community-build/dotty-community-build-deps || true
332326

333-
community_build_forward_compat:
327+
community_build_c:
334328
runs-on: [self-hosted, Linux]
335329
container:
336-
image: lampepfl/dotty:2021-03-22
330+
image: lampepfl/dotty:2020-11-19
337331
options: --cpu-shares 4096
338332
volumes:
339333
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
340334
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
341335
- ${{ github.workspace }}/../../cache/general:/root/.cache
342336
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
343-
|| (
337+
|| github.event_name == 'push'
338+
|| (
344339
github.event_name == 'pull_request'
345340
&& !contains(github.event.pull_request.body, '[skip ci]')
346341
&& !contains(github.event.pull_request.body, '[skip community_build]')
347-
&& contains(github.event.pull_request.body, '[test_forward_compat]')
348342
)
349343
|| (
350344
github.event_name == 'workflow_dispatch'
@@ -371,7 +365,11 @@ jobs:
371365
run: |
372366
git submodule sync
373367
git submodule update --init --recursive --jobs 7
374-
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat"
368+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
369+
370+
- name: Show dependency tracking file
371+
if: ${{ always() }}
372+
run: cat community-build/dotty-community-build-deps || true
375373

376374
test_sbt:
377375
runs-on: [self-hosted, Linux]
@@ -472,7 +470,7 @@ jobs:
472470
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
473471
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
474472
- ${{ github.workspace }}/../../cache/general:/root/.cache
475-
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8]
473+
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
476474
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
477475
env:
478476
NIGHTLYBUILD: yes
@@ -563,6 +561,44 @@ jobs:
563561
external_repository: lampepfl/dotty-website
564562
publish_branch: gh-pages
565563

564+
nightly_unmanaged_community_build:
565+
# Self-hosted runner is used only for getting current build version
566+
runs-on: [self-hosted, Linux]
567+
container:
568+
image: lampepfl/dotty:2021-03-22
569+
options: --cpu-shares 4096
570+
volumes:
571+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
572+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
573+
- ${{ github.workspace }}/../../cache/general:/root/.cache
574+
needs: [publish_nightly]
575+
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
576+
env:
577+
NIGHTLYBUILD: yes
578+
steps:
579+
- name: Reset existing repo
580+
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
581+
582+
- name: Checkout cleanup script
583+
uses: actions/checkout@v2
584+
585+
- name: Cleanup
586+
run: .github/workflows/cleanup.sh
587+
588+
- name: Git Checkout
589+
uses: actions/checkout@v2
590+
591+
- name: Add SBT proxy repositories
592+
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
593+
594+
- name: Get version string for this build
595+
run: |
596+
ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
597+
echo "This build version: $ver"
598+
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
599+
# Steps above are copy-pasted from publish_nightly, needed only to resolve THISBUILD_VERSION
600+
- name: Trigger unmanaged community build
601+
run: .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"
566602

567603
publish_release:
568604
runs-on: [self-hosted, Linux]
@@ -573,7 +609,7 @@ jobs:
573609
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
574610
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
575611
- ${{ github.workspace }}/../../cache/general:/root/.cache
576-
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
612+
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
577613
if: "github.event_name == 'push'
578614
&& startsWith(github.event.ref, 'refs/tags/')"
579615

@@ -600,11 +636,10 @@ jobs:
600636
- name: Add SBT proxy repositories
601637
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
602638

603-
- name: Publish Release
639+
- name: Prepare Release
604640
run: |
605641
./project/scripts/sbt dist/packArchive
606642
sha256sum dist/target/scala3-* > dist/target/sha256sum.txt
607-
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
608643
echo "RELEASE_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV
609644
610645
- name: Create GitHub Release
@@ -615,9 +650,9 @@ jobs:
615650
with:
616651
tag_name: ${{ github.ref }}
617652
release_name: ${{ github.ref }}
618-
body:
619-
draft: false
620-
prerelease: ${{ contains(env.RELEASE_TAG, 'M') }}
653+
body_path: ./changelogs/${{ env.RELEASE_TAG }}.md
654+
draft: true
655+
prerelease: ${{ contains(env.RELEASE_TAG, '-') }}
621656

622657
- name: Upload zip archive to GitHub Release
623658
uses: actions/upload-release-asset@v1
@@ -649,6 +684,10 @@ jobs:
649684
asset_name: sha256sum.txt
650685
asset_content_type: text/plain
651686

687+
- name: Publish Release
688+
run: ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
689+
690+
652691
open_issue_on_failure:
653692
runs-on: [self-hosted, Linux]
654693
container:

.github/workflows/cla.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: Scala CLA
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- 'language-reference-backport'
37
jobs:
48
check:
59
runs-on: ubuntu-latest
610
steps:
711
- uses: actions/checkout@v2
812
- run: ./project/scripts/check-cla.sh
13+
if: github.event_name == 'pull_request'
914
env:
1015
AUTHOR: ${{ github.event.pull_request.user.login }}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: language-reference-documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- 'language-reference-stable'
7+
pull_request:
8+
branches:
9+
- 'language-reference-stable'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Get current date
17+
id: date
18+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
19+
20+
- name: Git Checkout
21+
uses: actions/checkout@v3
22+
with:
23+
path: 'dotty'
24+
ref: 'language-reference-stable'
25+
fetch-depth: 0
26+
ssh-key: ${{ secrets.DOCS_KEY }}
27+
28+
- name: Cache Coursier
29+
uses: actions/cache@v1
30+
with:
31+
path: ~/.cache/coursier
32+
key: sbt-coursier-cache
33+
34+
- name: Cache SBT
35+
uses: actions/cache@v1
36+
with:
37+
path: ~/.sbt
38+
key: sbt-${{ hashFiles('**/build.sbt') }}
39+
40+
- name: Set up JDK 11
41+
uses: actions/setup-java@v1
42+
with:
43+
java-version: 11
44+
45+
- name: Generate reference documentation and test links
46+
run: |
47+
cd dotty
48+
./project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links
49+
./project/scripts/docsLinksStability ./scaladoc/output/reference ./project/scripts/expected-links/reference-expected-links.txt
50+
cd ..
51+
52+
- name: Push changes to scala3-reference-docs
53+
if: github.event_name == 'push'
54+
uses: actions/checkout@v3
55+
with:
56+
repository: lampepfl/scala3-reference-docs
57+
fetch-depth: 0
58+
submodules: true
59+
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
60+
path: 'scala3-reference-docs'
61+
62+
- if: github.event_name == 'push'
63+
run: |
64+
\cp -a dotty/scaladoc/output/reference/. scala3-reference-docs/
65+
cd scala3-reference-docs
66+
git config user.name gh-actions
67+
git config user.email actions@github.com
68+
git add .
69+
if ! git diff-index --quiet HEAD; then
70+
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
71+
git push
72+
fi
73+
cd ..
74+
75+
- name: Merge changes to main
76+
if: github.event_name == 'push'
77+
run: |
78+
cd dotty
79+
git fetch origin main:main
80+
git checkout main
81+
git config user.name gh-actions
82+
git config user.email actions@github.com
83+
git merge language-reference-stable
84+
cd ..
85+
86+
- name: Create pull request with backport to main
87+
if: github.event_name == 'push'
88+
uses: peter-evans/create-pull-request@v4
89+
with:
90+
path: dotty
91+
branch: language-reference-backport
92+
labels: area:documentation
93+
title: Backport changes from stable documentation branch
94+
body: This pull request is created automatically after push to stable documentation branch and backports the changes
95+
reviewers: pikinier20,julienrf
96+
assignees: pikinier20
97+

.github/workflows/scaladoc.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: scaladoc
22

33
on:
44
push:
5+
branches-ignore:
6+
- 'language-reference-stable'
57
pull_request:
8+
branches-ignore:
9+
- 'language-reference-stable'
610
jobs:
711
build:
812
env:
@@ -53,7 +57,7 @@ jobs:
5357
run: ./project/scripts/sbt scaladoc/generateTestcasesDocumentation
5458

5559
- name: Generate reference documentation
56-
run: ./project/scripts/sbt scaladoc/generateReferenceDocumentation
60+
run: ./project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links
5761

5862
- name: Generate Scala 3 documentation
5963
run: ./project/scripts/sbt scaladoc/generateScalaDocumentation
@@ -74,7 +78,7 @@ jobs:
7478
DOC_DEST=$(echo pr-${PR_NUMBER:-${GITHUB_REF##*/}} | tr -d -c "[-A-Za-z0-9]")
7579
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
7680
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
77-
az storage blob upload-batch -s scaladoc/output -d $DOC_DEST --account-name scala3docstorage
81+
az storage blob upload-batch --overwrite true -s scaladoc/output -d $DOC_DEST --account-name scala3docstorage
7882
7983
stdlib-sourcelinks-test:
8084
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)