Skip to content

Commit

Permalink
Merge branch 'main' into type-lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishiking committed Apr 14, 2023
2 parents 399f229 + d577300 commit 9fe0047
Show file tree
Hide file tree
Showing 2,314 changed files with 228,275 additions and 15,373 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/fix-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ assignees: ''

---

<!--
TODO first sign the CLA
<!--
TODO first sign the CLA
https://www.lightbend.com/contribute/cla/scala
-->

## Fix #XYZ

<!-- TODO description of the change -->
<!-- TODO description of the change -->


<!-- Ideally should have a called "Fix #XYZ: A SHORT FIX DESCRIPTION" -->
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/other-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ assignees: ''

---

<!--
TODO first sign the CLA
<!--
TODO first sign the CLA
https://www.lightbend.com/contribute/cla/scala
-->

## Description

<!-- TODO description of the change -->
<!-- TODO description of the change -->


<!-- Ideally should have a single commit -->
69 changes: 25 additions & 44 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@ name: Dotty

on:
push:
branches-ignore:
- 'language-reference-stable'
## Be careful if you add or remove something here! Quoting from
## <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore>:
##
## > If you define only tags/tags-ignore or only branches/branches-ignore, the
## > workflow won't run for events affecting the undefined Git ref. If you
## > define neither tags/tags-ignore or branches/branches-ignore, the workflow
## > will run for events affecting either branches or tags.
##
## We want the CI to run on both branches and tags, so we should either have:
## - both (tags or tags-ignore) and (branches or branches-ignore),
## - or neither of them.
## But it's important to not have only one or the other.
tags:
- '**'
pull_request:
- '*'
branches-ignore:
- 'language-reference-stable'
- 'gh-readonly-queue/**'
pull_request:
merge_group:
schedule:
- cron: '0 3 * * *' # Every day at 3 AM
workflow_dispatch:
Expand Down Expand Up @@ -91,6 +102,7 @@ jobs:
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
Expand Down Expand Up @@ -136,6 +148,7 @@ jobs:
github.event_name == 'push'
&& github.ref != 'refs/heads/main'
)
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
Expand Down Expand Up @@ -212,6 +225,7 @@ jobs:
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
Expand Down Expand Up @@ -252,10 +266,12 @@ jobs:
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
&& !contains(github.event.pull_request.body, '[skip community_build]')
&& !contains(github.event.pull_request.body, '[skip community_build_a]')
)
|| (
github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -299,10 +315,12 @@ jobs:
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
&& !contains(github.event.pull_request.body, '[skip community_build]')
&& !contains(github.event.pull_request.body, '[skip community_build_b]')
)
|| (
github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -346,10 +364,12 @@ jobs:
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
&& !contains(github.event.pull_request.body, '[skip community_build]')
&& !contains(github.event.pull_request.body, '[skip community_build_c]')
)
|| (
github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -576,45 +596,6 @@ jobs:
external_repository: lampepfl/dotty-website
publish_branch: gh-pages

nightly_unmanaged_community_build:
# Self-hosted runner is used only for getting current build version
runs-on: [self-hosted, Linux]
container:
image: lampepfl/dotty:2021-03-22
options: --cpu-shares 4096
volumes:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
needs: [publish_nightly]
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
env:
NIGHTLYBUILD: yes
steps:
- name: Reset existing repo
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true

- name: Checkout cleanup script
uses: actions/checkout@v3

- name: Cleanup
run: .github/workflows/cleanup.sh

- name: Git Checkout
uses: actions/checkout@v3

- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Get version string for this build
run: |
ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
echo "This build version: $ver"
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
# Steps above are copy-pasted from publish_nightly, needed only to resolve THISBUILD_VERSION
- name: Trigger unmanaged community build
run: .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"

publish_release:
permissions:
contents: write # for actions/create-release to create a release
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Scala CLA
on:
pull_request:
branches-ignore:
- 'language-reference-stable'
push:
branches:
- 'language-reference-backport'
- 'language-reference-stable'
merge_group:
permissions:
contents: write
pull-requests: write
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/language-reference.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: language-reference-documentation
name: Language reference documentation

on:
push:
Expand All @@ -14,14 +14,14 @@ permissions:

jobs:
build-and-push:
name: Build reference documentation and push it
permissions:
contents: write # for Git to git push
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Git Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -67,26 +67,22 @@ jobs:
fi
cd ..
- name: Merge changes to main
if: github.event_name == 'push'
run: |
cd dotty
git fetch origin main:main
git checkout main
git config user.name gh-actions
git config user.email [email protected]
git merge language-reference-stable
cd ..
- name: Create pull request with backport to main
if: github.event_name == 'push'
uses: peter-evans/create-pull-request@v4
backport-to-main:
name: Create pull request with backport to main
permissions:
pull-requests: write # for repo-sync/pull-request to create a PR
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3
- uses: repo-sync/pull-request@v2
with:
path: dotty
branch: language-reference-backport
labels: area:documentation
title: Backport changes from stable documentation branch
body: This pull request is created automatically after push to stable documentation branch and backports the changes
reviewers: pikinier20,julienrf
assignees: pikinier20
destination_branch: main
pr_label: area:documentation
pr_title: Sync with the stable documentation branch
pr_body: |
This pull request is syncing the main with changes from language-reference-stable.
It was created automatically after ${{ github.event.head_commit.id }} by @${{ github.event.head_commit.author.username }}
pr_assignee: ${{ github.event.head_commit.author.username }}

4 changes: 2 additions & 2 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
options: --cpu-shares 4096

env:
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }}

steps:
- name: Reset existing repo
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/publish-sdkman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

set -u

# latest stable dotty version
# latest stable dotty version
DOTTY_VERSION=$(curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
DOTTY_URL="https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION/scala3-$DOTTY_VERSION.zip"

# checking if dotty version is available
# checking if dotty version is available
if ! curl --output /dev/null --silent --head --fail "$DOTTY_URL"; then
echo "URL doesn't exist: $DOTTY_URL"
exit 1
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ metals.sbt
.idea_modules
/.worksheet/

# scala-cli
.scala-build

# Partest
dotty.jar
dotty-lib.jar
Expand Down Expand Up @@ -90,3 +93,5 @@ compiler/test-coursier/run/*.jar
# docs related
contributors.js
content-contributors.css
docs/_spec/_site/
docs/_spec/.jekyll-metadata
Loading

0 comments on commit 9fe0047

Please sign in to comment.