Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: Merge LLVM tests together into a single job #78877

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

tstellar
Copy link
Collaborator

This is possible now that the free GitHub runners for Windows and Linux have more disk space:
https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11 runners only have 3.

This is possible now that the free GitHub runners for Windows and Linux
have more disk space:
https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out.  macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 21, 2024

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

This is possible now that the free GitHub runners for Windows and Linux have more disk space:
https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11 runners only have 3.


Full diff: https://github.com/llvm/llvm-project/pull/78877.diff

2 Files Affected:

  • (modified) .github/workflows/llvm-project-tests.yml (+2-4)
  • (modified) .github/workflows/llvm-tests.yml (+3-21)
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index a1404e1f1efa95..481d518fd4b8b7 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -14,7 +14,7 @@ on:
         required: false
       os_list:
         required: false
-        default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
+        default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
       python_version:
         required: false
         type: string
@@ -38,9 +38,7 @@ on:
         type: string
         # Use windows-2019 due to:
         # https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
-        # We're using a specific version of macOS due to:
-        # https://github.com/actions/virtual-environments/issues/5900
-        default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
+        default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
 
       python_version:
         required: false
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index cc9855ce182b2b..63f0f3abfd70a5 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -27,31 +27,13 @@ concurrency:
   cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
 
 jobs:
-  check_all:
+  check-all:
     if: github.repository_owner == 'llvm'
-    name: Test llvm,clang,libclc
+    name: Build and Test
     uses: ./.github/workflows/llvm-project-tests.yml
     with:
       build_target: check-all
-      projects: clang;libclc
-
-  # These need to be separate from the check_all job, becuase there is not enough disk
-  # space to build all these projects on Windows.
-  build_lldb:
-    if: github.repository_owner == 'llvm'
-    name: Build lldb
-    uses: ./.github/workflows/llvm-project-tests.yml
-    with:
-      build_target: ''
-      projects: clang;lldb
-
-  check_lld:
-    if: github.repository_owner == 'llvm'
-    name: Test lld
-    uses: ./.github/workflows/llvm-project-tests.yml
-    with:
-      build_target: check-lld
-      projects: lld
+      projects: clang;lld;libclc;lldb
 
   abi-dump-setup:
     if: github.repository_owner == 'llvm'

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This is a nice simplification. I'm assuming since this goes to MacOS13, we don't end up hitting #77270?

@tstellar
Copy link
Collaborator Author

tstellar commented Jan 22, 2024

@linux4life798 fyi we need to upgrade to macOS-13 to avoid timeouts.

@tstellar
Copy link
Collaborator Author

LGTM.

This is a nice simplification. I'm assuming since this goes to MacOS13, we don't end up hitting #77270?

No, we do hit this same bug, unfortunately.

@linux4life798
Copy link
Contributor

linux4life798 commented Jan 23, 2024

No, we do hit this same bug, unfortunately.

Hmm. There are a few aspect to #77270. Are you seeing this cache corruption / cache failure on macOS-13, also? Or, do you mean the sccache install time is still more than a minute or 2?

Checklist to ensure we aren't seeing hendrikmuhs/ccache-action#174:

  • Have you seen that the next run of this action completes much faster due to cache hits?
  • Does the next run of this action successfully print cache stats (with majority hits) and successfully save/upload its cache?

For what it is worth, my own testing seems to show that this macOS sccache issue occurs when more LLVM_PROJECTS are included in the build. So, it could be something that one of LLVM projects/builds/tests are doing to sccache OR just a plain old bug with sccache / GitHub action. See hendrikmuhs/ccache-action#174

@tstellar
Copy link
Collaborator Author

@linux4life798 I was able to get it to work by increasing the cache size to 4GB: https://github.com/tstellar/llvm-project/actions/runs/7618766244/job/20750565953

I'm going to try to see how low I can make it while it still works.

@tstellar
Copy link
Collaborator Author

Switching from sccache to ccache fixes the issue too. Maybe this is the best solution?

@tstellar
Copy link
Collaborator Author

I bumped the maximum cache size up to 2GB, in order to workaround the issue with macOS-13.

@tstellar
Copy link
Collaborator Author

The macOS-11 builds have started to timeout now, because of how long it takes to install sccache, so I need to merge this in order to fix the workflows. We can discuss optimal cache size or whether to switch to ccache in a follow up discussion.

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. We can always iterate in tree and getting a fix in for that issue is pretty important right now.

@tstellar tstellar merged commit 53fea6f into llvm:main Jan 27, 2024
5 of 6 checks passed
tstellar added a commit to tstellar/llvm-project that referenced this pull request Jan 27, 2024
This is possible now that the free GitHub runners for Windows and Linux
have more disk space:

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
@linux4life798
Copy link
Contributor

linux4life798 commented Jan 27, 2024

Also in terms of caching options, it looks like sccache has builtin support for Github action cache.
See https://github.com/mozilla/sccache/blob/main/docs/GHA.md.

It then uses the GitHub cache mechanism as the flat DB, as seen in https://github.com/mozilla/sccache/actions/caches?page=169:

image

This seems like it would more gracefully handle the constant race condition experienced by simultaneous CI builds that are currently checking out a large cache DB and another saving a large cache DB.

They test this GitHub cache mechanism in in their integration-tests workflow. An example run is https://github.com/mozilla/sccache/actions/runs/7673802847/job/20917263538.


Here is a test run using this new sccache backing mechanism with LLVM.

https://github.com/linux4life798/llvm-project-ci-test/actions/runs/7681954774

tstellar added a commit that referenced this pull request Jan 28, 2024
This is possible now that the free GitHub runners for Windows and Linux
have more disk space:


https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
tstellar added a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
…lvm#79710)

This is possible now that the free GitHub runners for Windows and Linux
have more disk space:


https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
tstellar added a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
…lvm#79710)

This is possible now that the free GitHub runners for Windows and Linux
have more disk space:

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
tstellar added a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
…lvm#79710)

This is possible now that the free GitHub runners for Windows and Linux
have more disk space:

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
tstellar added a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
…lvm#79710)

This is possible now that the free GitHub runners for Windows and Linux
have more disk space:

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

I also had to switch from macOS-11 to macOS-13 in order to prevent the
job from timing out. macOS-13 runners have 4 vCPUs and the macOS-11
runners only have 3.
@pointhex pointhex mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants