Skip to content

Commit 0547e57

Browse files
authored
[runtimes] Run backdeployment CI on Github hosted runners (llvm#109984)
This removes the need for macOS nodes in Buildkite. It also moves to the proper way of testing backdeployment, which is to actually run on the target OS itself, instead of using packaged dylibs from previous OS versions and trying to emulate backdeployment with DYLD_LIBRARY_PATH. As a drive-by change, also fix a few back-deployment annotations that were incorrect and add support for minor versions in the Lit feature determining availability from the target triple.
1 parent b8e79b3 commit 0547e57

File tree

18 files changed

+236
-327
lines changed

18 files changed

+236
-327
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,24 @@ jobs:
193193
**/crash_diagnostics/*
194194
195195
macos:
196-
runs-on: macos-14
197196
needs: [ stage1 ]
198197
strategy:
199-
fail-fast: true
198+
fail-fast: false
200199
matrix:
201-
config: [
202-
generic-cxx03,
203-
generic-cxx23,
204-
generic-modules,
205-
apple-configuration
206-
]
200+
include:
201+
- config: generic-cxx03
202+
os: macos-latest
203+
- config: generic-cxx23
204+
os: macos-latest
205+
- config: generic-modules
206+
os: macos-latest
207+
- config: apple-configuration
208+
os: macos-latest
209+
- config: apple-system
210+
os: macos-13
211+
- config: apple-system-hardened
212+
os: macos-13
213+
runs-on: ${{ matrix.os }}
207214
steps:
208215
- uses: actions/checkout@v4
209216
- uses: maxim-lobanov/setup-xcode@v1

libcxx/test/configs/apple-libc++-backdeployment.cfg.in

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Testing configuration for back-deployment against the system-provided libc++.
2+
#
3+
# Under this configuration, we compile and link all the test suite against the just-built
4+
# libc++, but we run against the system libc++.
5+
6+
import os, site
7+
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
8+
import libcxx.test.params, libcxx.test.config, libcxx.test.dsl
9+
10+
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
11+
12+
config.substitutions.append(('%{flags}',
13+
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
14+
))
15+
config.substitutions.append(('%{compile_flags}',
16+
'-nostdinc++ -I %{include-dir} -I %{libcxx-dir}/test/support'
17+
))
18+
config.substitutions.append(('%{link_flags}',
19+
'-nostdlib++ -L %{lib-dir} -lc++'
20+
))
21+
config.substitutions.append(('%{exec}',
22+
'%{executor} --execdir %T -- '
23+
))
24+
25+
config.stdlib = 'apple-libc++'
26+
config.using_system_stdlib = True
27+
28+
libcxx.test.config.configure(
29+
libcxx.test.params.DEFAULT_PARAMETERS,
30+
libcxx.test.features.DEFAULT_FEATURES,
31+
config,
32+
lit_config
33+
)

libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
// basic_filebuf<charT,traits>* open(const char* s, ios_base::openmode mode);
1212

13+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
14+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
15+
1316
// XFAIL: LIBCXX-AIX-FIXME
1417

1518
#include <fstream>

libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
// basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) override;
1212

13+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
14+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
15+
1316
#include <fstream>
1417
#include <cstddef>
1518
#include <cassert>

libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
// explicit basic_fstream(const char* s, ios_base::openmode mode = ios_base::in | ios_base::out);
1515

16+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
17+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
18+
1619
// XFAIL: LIBCXX-AIX-FIXME
1720

1821
#include <fstream>

libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
// void open(const char* s, ios_base::openmode mode = ios_base::in|ios_base::out);
1515

16+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
17+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
18+
1619
// XFAIL: LIBCXX-AIX-FIXME
1720

1821
#include <fstream>

libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
// explicit basic_ofstream(const char* s, ios_base::openmode mode = ios_base::out);
1515

16+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
17+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
18+
1619
// XFAIL: LIBCXX-AIX-FIXME
1720

1821
#include <fstream>

libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
// void open(const char* s, ios_base::openmode mode = ios_base::out);
1515

16+
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
17+
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
18+
1619
// XFAIL: LIBCXX-AIX-FIXME
1720

1821
#include <fstream>

libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/gcount.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// UNSUPPORTED: 32-bit-pointer
1010
// REQUIRES: large_tests
1111

12+
// This bug was fixed in the dylib by 53aed4759b33e33614e0f4e321bc1ef764b6d5b6.
13+
// XFAIL: using-built-library-before-llvm-17
14+
1215
// Android devices frequently don't have enough memory to run this test. Rather
1316
// than throw std::bad_alloc, exhausting memory triggers the OOM Killer.
1417
// UNSUPPORTED: LIBCXX-ANDROID-FIXME

libcxx/utils/ci/buildkite-pipeline.yml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -37,48 +37,6 @@ definitions:
3737
- "**/crash_diagnostics/*"
3838

3939
steps:
40-
- group: ':mac: Apple'
41-
steps:
42-
- label: Apple back-deployment macosx10.13
43-
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13
44-
agents:
45-
queue: libcxx-builders
46-
os: macos
47-
arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
48-
<<: *common
49-
50-
- label: Apple back-deployment macosx10.15
51-
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15
52-
agents:
53-
queue: libcxx-builders
54-
os: macos
55-
arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
56-
<<: *common
57-
58-
- label: Apple back-deployment with hardening enabled
59-
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0
60-
agents:
61-
queue: libcxx-builders
62-
os: macos
63-
arch: x86_64 # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
64-
<<: *common
65-
66-
# TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
67-
# - label: "Apple back-deployment macosx11.0 arm64"
68-
# command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
69-
# artifact_paths:
70-
# - "**/test-results.xml"
71-
# - "**/*.abilist"
72-
# agents:
73-
# queue: "libcxx-builders"
74-
# os: "macos"
75-
# arch: "arm64"
76-
# retry:
77-
# automatic:
78-
# - exit_status: -1 # Agent was lost
79-
# limit: 2
80-
# timeout_in_minutes: 120
81-
8240
- group: ARM
8341
steps:
8442
- label: AArch64

0 commit comments

Comments
 (0)