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 9f8f150 commit a086db7
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 62 deletions.
105 changes: 54 additions & 51 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@v4
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@v4
Expand Down Expand Up @@ -164,14 +164,14 @@ 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 == 'pull_request'
&& contains(github.event.pull_request.body, '[test_scala2_library_tasty]')
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
Expand All @@ -180,8 +180,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@v4
Expand Down Expand Up @@ -220,8 +220,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@v4
Expand Down Expand Up @@ -252,7 +252,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 @@ -264,8 +264,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@v4
Expand All @@ -288,7 +288,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 @@ -298,13 +298,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@v4
Expand Down Expand Up @@ -336,7 +336,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 @@ -347,14 +347,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@v4
Expand All @@ -370,6 +370,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 @@ -387,7 +388,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 @@ -398,14 +399,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@v4
Expand All @@ -421,6 +422,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 @@ -438,7 +440,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 @@ -449,14 +451,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@v4
Expand All @@ -472,6 +474,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 @@ -489,7 +492,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 @@ -498,14 +501,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@v4
Expand All @@ -532,7 +535,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 @@ -544,7 +547,7 @@ jobs:
)
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
&& github.repository == 'scala/scala3'
)"

steps:
Expand All @@ -553,8 +556,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@v4
Expand Down Expand Up @@ -588,7 +591,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 @@ -599,8 +602,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@v4
Expand Down Expand Up @@ -641,7 +644,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 @@ -655,8 +658,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@v4
Expand All @@ -672,7 +675,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 @@ -708,8 +711,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@v4
Expand Down
Loading

0 comments on commit a086db7

Please sign in to comment.