[llvm] [GitHub] Fix slow sccache install on macOS by upgrading macOS version (PR #77165)

Craig Hesling via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 20:37:16 PST 2024


https://github.com/linux4life798 updated https://github.com/llvm/llvm-project/pull/77165

>From ef5945fa9e849c64b6b7b71f5b32c24b896cf9f7 Mon Sep 17 00:00:00 2001
From: Craig Hesling <craig at hesling.com>
Date: Fri, 5 Jan 2024 20:05:27 -0500
Subject: [PATCH 1/2] [GitHub] Fix slow sccache install on macOS by upgrading
 macOS version

The "Setup ccache" step on macOS-11 builds takes between 15 to 20 mins,
whereas this step takes a less than 10 seconds on other runners.
The bulk of this time is spent at the "Install sccache" step, where brew
emits warnings like "Warning: You are using macOS 11." and
"We (and Apple) do not provide support for this old version...".

Bumping the version of macOS greatly decreases this cache setup time to
about 20 seconds. Furthermore, it seems like it is speeding up general
build times, too.

It appears that https://github.com/actions/virtual-environments/issues/5900
has been resolved, so I do not believe we need to lock macOS to 11 anymore.
---
 .github/workflows/llvm-project-tests.yml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 02b1ab75e960ec..4cda535bf0e3f2 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-12"]'
   workflow_call:
     inputs:
       build_target:
@@ -34,9 +34,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-12"]'
 
 concurrency:
   # Skip intermediate builds: always.

>From a00da51e8da32f2482ddd84fc227f3f99c6eb9fc Mon Sep 17 00:00:00 2001
From: Craig Hesling <craig at hesling.com>
Date: Fri, 5 Jan 2024 20:44:35 -0500
Subject: [PATCH 2/2] [GitHub] Remove pkg-config workaround for macOS-10.5

Remove the workaround for
https://github.com/actions/runner-images/issues/5900, which seems to
be resolved.
---
 .github/workflows/llvm-project-tests.yml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 4cda535bf0e3f2..3345e734e1eb38 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -89,10 +89,6 @@ jobs:
           variant: sccache
       - name: Build and Test
         uses: llvm/actions/build-test-llvm-project at main
-        env:
-          # Workaround for https://github.com/actions/virtual-environments/issues/5900.
-          # This should be a no-op for non-mac OSes
-          PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
         with:
           cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ inputs.extra_cmake_args }}'
           build_target: '${{ inputs.build_target }}'



More information about the llvm-commits mailing list