Skip to content

Commit

Permalink
Fix nightly build failure + Address issue with the self-hosted runner (
Browse files Browse the repository at this point in the history
…#19720)

Closes #19712 

This PR introduce a workaround for actions/runner#2033. This workaround
was already introduced in #19703 in some of the jobs.

`actions/checkout` has an issue filled about this too:
actions/checkout#1169
  • Loading branch information
hamzaremmal committed Feb 17, 2024
2 parents 9e3ce5e + 9f7bf72 commit 6a795fd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 15 deletions.
58 changes: 44 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ jobs:
- name: Set JDK 17 as default
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

## Workaround for https://github.com/actions/runner/issues/2033 (See https://github.com/lampepfl/dotty/pull/19720)
- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -120,7 +123,9 @@ jobs:
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -174,7 +179,9 @@ jobs:
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -211,8 +218,10 @@ jobs:

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
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
- name: Git Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -253,8 +262,10 @@ jobs:

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
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
- name: Git Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -294,7 +305,9 @@ jobs:
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -344,7 +357,9 @@ jobs:
- name: Set JDK 8 as default
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -396,7 +411,9 @@ jobs:
- name: Set JDK 8 as default
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -448,7 +465,9 @@ jobs:
- name: Set JDK 8 as default
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -499,7 +518,9 @@ jobs:
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -546,7 +567,9 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH

- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -592,7 +615,9 @@ jobs:
- name: Set JDK 17 as default
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH
- 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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down Expand Up @@ -646,7 +671,9 @@ jobs:

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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand All @@ -662,6 +689,7 @@ jobs:

- name: Generate Website
run: |
git config --global --add safe.directory /__w/dotty/dotty
./project/scripts/genDocs -doc-snapshot
- name: Deploy Website to dotty-website
Expand Down Expand Up @@ -696,7 +724,9 @@ jobs:

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
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
- name: Checkout cleanup script
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:

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
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
- name: Cleanup
run: .github/workflows/cleanup.sh
Expand Down

0 comments on commit 6a795fd

Please sign in to comment.