Skip to content

[libc++] Bump OS version for macOS backdeployment CI jobs #131883

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

Merged
merged 6 commits into from
Apr 5, 2025

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Mar 18, 2025

In 0547e57, I introduced backdeployment testing on macOS using Github-provided builders. This was done by basically building libc++ on a slightly older macOS (like macOS 13) and then running against the system library on that machine. However, that created a dependency that libc++ must keep working on macOS 13, which doesn't support the latest-released Xcode.

This patch solves that problem by moving the deployment testing to a newer version of macOS which supports the latest-released version of Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're not actually testing on older OSes, but is necessary to satisfy the documented libc++ support policy. In the future, we could improve the situation by providing a Lit configuration that allows compiling (but not running) all the tests, building the tests on a supported macOS, and then shipping those tests on an older backdeployment target in order to run them against the system library. Since that requires significant engineering, this isn't done at this time.

@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. github:workflow labels Mar 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-github-workflow

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

In 0547e57, I introduced backdeployment testing on macOS using Github-provided builders. This was done by basically building libc++ on a slightly older macOS (like macOS 13) and then running against the system library on that machine. However, that created a dependency that libc++ must keep working on macOS 13, which doesn't support the latest-released Xcode.

This patch solves that problem by moving the deployment testing to a newer version of macOS which supports the latest-released version of Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're not actually testing on older OSes, but is necessary to satisfy the documented libc++ support policy. In the future, we could improve the situation by providing a Lit configuration that allows compiling (but not running) all the tests, building the tests on a supported macOS, and then shipping those tests on an older backdeployment target in order to run them against the system library. Since that requires significant engineering, this isn't done at this time.


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

1 Files Affected:

  • (modified) .github/workflows/libcxx-build-and-test.yaml (+12-2)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 8c011425abfcf..8031bf41922b7 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -201,10 +201,20 @@ jobs:
           os: macos-15
         - config: apple-configuration
           os: macos-15
+        # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an
+        #       older system-provided libc++.dylib). Doing this properly would require building the test suite on a
+        #       recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an
+        #       older mac. We could do that by e.g. sharing artifacts between the two jobs.
+        #
+        #       However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only
+        #       alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work
+        #       since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent
+        #       macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional
+        #       coverage.
         - config: apple-system
-          os: macos-13
+          os: macos-15
         - config: apple-system-hardened
-          os: macos-13
+          os: macos-15
     runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Removing old apple-clang versions will help to unblock some cleanup patches.

I think we need one more change.

ldionne added 5 commits April 1, 2025 13:28
In 0547e57, I introduced backdeployment testing on macOS using
Github-provided builders. This was done by basically building libc++
on a slightly older macOS (like macOS 13) and then running against
the system library on that machine. However, that created a dependency
that libc++ must keep working on macOS 13, which doesn't support the
latest-released Xcode.

This patch solves that problem by moving the deployment testing to a
newer version of macOS which supports the latest-released version of
Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're
not actually testing on older OSes, but is necessary to satisfy the
documented libc++ support policy. In the future, we could improve the
situation by providing a Lit configuration that allows compiling
(but not running) all the tests, building the tests on a supported macOS,
and then shipping those tests on an older backdeployment target in order
to run them against the system library. Since that requires significant
engineering, this isn't done at this time.
@ldionne ldionne force-pushed the review/drop-backdeployment-jobs branch from 64623bc to 0f54f56 Compare April 1, 2025 18:15
@ldionne ldionne requested a review from a team as a code owner April 1, 2025 18:15
@mordante mordante merged commit b4f7a2a into llvm:main Apr 5, 2025
84 checks passed
@ldionne ldionne deleted the review/drop-backdeployment-jobs branch April 8, 2025 22:01
mstorsjo pushed a commit to mstorsjo/llvm-project that referenced this pull request May 11, 2025
In 0547e57, I introduced backdeployment testing on macOS using
Github-provided builders. This was done by basically building libc++ on
a slightly older macOS (like macOS 13) and then running against the
system library on that machine. However, that created a dependency that
libc++ must keep working on macOS 13, which doesn't support the
latest-released Xcode.

This patch solves that problem by moving the deployment testing to a
newer version of macOS which supports the latest-released version of
Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're
not actually testing on older OSes, but is necessary to satisfy the
documented libc++ support policy. In the future, we could improve the
situation by providing a Lit configuration that allows compiling (but
not running) all the tests, building the tests on a supported macOS, and
then shipping those tests on an older backdeployment target in order to
run them against the system library. Since that requires significant
engineering, this isn't done at this time.

(cherry picked from commit b4f7a2a)
mstorsjo pushed a commit to mstorsjo/llvm-project that referenced this pull request May 11, 2025
In 0547e57, I introduced backdeployment testing on macOS using
Github-provided builders. This was done by basically building libc++ on
a slightly older macOS (like macOS 13) and then running against the
system library on that machine. However, that created a dependency that
libc++ must keep working on macOS 13, which doesn't support the
latest-released Xcode.

This patch solves that problem by moving the deployment testing to a
newer version of macOS which supports the latest-released version of
Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're
not actually testing on older OSes, but is necessary to satisfy the
documented libc++ support policy. In the future, we could improve the
situation by providing a Lit configuration that allows compiling (but
not running) all the tests, building the tests on a supported macOS, and
then shipping those tests on an older backdeployment target in order to
run them against the system library. Since that requires significant
engineering, this isn't done at this time.

(cherry picked from commit b4f7a2a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github:workflow libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants