Skip to content

Commit

Permalink
Adapt for scala/scala3
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal authored and Kordyjan committed Mar 6, 2024
1 parent 3fbac6a commit 3d12aaa
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 58 deletions.
97 changes: 50 additions & 47 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| (
github.event_name == 'pull_request'
Expand All @@ -62,17 +62,17 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"
steps:
- name: Set JDK 16 as default
run: echo "/usr/lib/jvm/java-16-openjdk-amd64/bin" >> $GITHUB_PATH

## Workaround for https://github.com/actions/runner/issues/2033 (See https://github.com/lampepfl/dotty/pull/19720)
## Workaround for https://github.com/actions/runner/issues/2033 (See https://github.com/scala/scala3/pull/19720)
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
Expand All @@ -115,7 +115,7 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
Expand All @@ -124,8 +124,8 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand Down Expand Up @@ -167,8 +167,8 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Git Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:

test_windows_full:
runs-on: [self-hosted, Windows]
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| (
github.event_name == 'pull_request'
Expand All @@ -211,8 +211,8 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Git Checkout
uses: actions/checkout@v3
Expand All @@ -235,7 +235,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
Expand All @@ -245,13 +245,13 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -278,7 +278,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
Expand All @@ -289,14 +289,14 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -312,6 +312,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
Expand All @@ -329,7 +330,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
Expand All @@ -340,14 +341,14 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -363,6 +364,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
Expand All @@ -380,7 +382,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| github.event_name == 'merge_group'
|| (
Expand All @@ -391,14 +393,14 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -414,6 +416,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
Expand All @@ -431,7 +434,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| github.event_name == 'push'
|| (
github.event_name == 'pull_request'
Expand All @@ -440,14 +443,14 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -474,7 +477,7 @@ jobs:
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache

if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
|| (
github.event_name == 'push'
&& startsWith(github.event.ref, 'refs/tags/')
Expand All @@ -486,7 +489,7 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
Expand All @@ -495,8 +498,8 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand Down Expand Up @@ -530,7 +533,7 @@ jobs:
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'scala/scala3'"
env:
NIGHTLYBUILD: yes
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
Expand All @@ -541,8 +544,8 @@ jobs:
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand Down Expand Up @@ -583,7 +586,7 @@ jobs:
- ${{ 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'"
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'scala/scala3'"
env:
NIGHTLYBUILD: yes
DOTTY_WEBSITE_BOT_TOKEN: ${{ secrets.BOT_TOKEN }} # If you need to change this:
Expand All @@ -597,8 +600,8 @@ jobs:
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand All @@ -614,7 +617,7 @@ jobs:

- name: Generate Website
run: |
git config --global --add safe.directory /__w/dotty/dotty
git config --global --add safe.directory /__w/scala3/scala3
./project/scripts/genDocs -doc-snapshot
- name: Deploy Website to dotty-website
Expand Down Expand Up @@ -650,8 +653,8 @@ jobs:
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
git config --global --add safe.directory /__w/scala3/scala3
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
uses: actions/checkout@v3
Expand Down
Loading

0 comments on commit 3d12aaa

Please sign in to comment.