Skip to content

Commit

Permalink
[runtimes] Run backdeployment CI on Github hosted runners
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldionne committed Sep 30, 2024
1 parent 2121b96 commit 8b98482
Show file tree
Hide file tree
Showing 18 changed files with 236 additions and 327 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,24 @@ jobs:
**/crash_diagnostics/*
macos:
runs-on: macos-14
needs: [ stage1 ]
strategy:
fail-fast: true
fail-fast: false
matrix:
config: [
generic-cxx03,
generic-cxx23,
generic-modules,
apple-configuration
]
include:
- config: generic-cxx03
os: macos-latest
- config: generic-cxx23
os: macos-latest
- config: generic-modules
os: macos-latest
- config: apple-configuration
os: macos-latest
- config: apple-system
os: macos-13
- config: apple-system-hardened
os: macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
Expand Down
65 changes: 0 additions & 65 deletions libcxx/test/configs/apple-libc++-backdeployment.cfg.in

This file was deleted.

33 changes: 33 additions & 0 deletions libcxx/test/configs/apple-libc++-system.cfg.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Testing configuration for back-deployment against the system-provided libc++.
#
# Under this configuration, we compile and link all the test suite against the just-built
# libc++, but we run against the system libc++.

import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
import libcxx.test.params, libcxx.test.config, libcxx.test.dsl

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{include-dir} -I %{libcxx-dir}/test/support'
))
config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib-dir} -lc++'
))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '
))

config.stdlib = 'apple-libc++'
config.using_system_stdlib = True

libcxx.test.config.configure(
libcxx.test.params.DEFAULT_PARAMETERS,
libcxx.test.features.DEFAULT_FEATURES,
config,
lit_config
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

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

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

// XFAIL: LIBCXX-AIX-FIXME

#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

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

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

#include <fstream>
#include <cstddef>
#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

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

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

// XFAIL: LIBCXX-AIX-FIXME

#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

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

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

// XFAIL: LIBCXX-AIX-FIXME

#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

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

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

// XFAIL: LIBCXX-AIX-FIXME

#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

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

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

// XFAIL: LIBCXX-AIX-FIXME

#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// UNSUPPORTED: 32-bit-pointer
// REQUIRES: large_tests

// This bug was fixed in the dylib by 53aed4759b33e33614e0f4e321bc1ef764b6d5b6.
// XFAIL: using-built-library-before-llvm-17

// Android devices frequently don't have enough memory to run this test. Rather
// than throw std::bad_alloc, exhausting memory triggers the OOM Killer.
// UNSUPPORTED: LIBCXX-ANDROID-FIXME
Expand Down
42 changes: 0 additions & 42 deletions libcxx/utils/ci/buildkite-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,48 +37,6 @@ definitions:
- "**/crash_diagnostics/*"

steps:
- group: ':mac: Apple'
steps:
- label: Apple back-deployment macosx10.13
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13
agents:
queue: libcxx-builders
os: macos
arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
<<: *common

- label: Apple back-deployment macosx10.15
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15
agents:
queue: libcxx-builders
os: macos
arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
<<: *common

- label: Apple back-deployment with hardening enabled
command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0
agents:
queue: libcxx-builders
os: macos
arch: x86_64 # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
<<: *common

# TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
# - label: "Apple back-deployment macosx11.0 arm64"
# command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
# artifact_paths:
# - "**/test-results.xml"
# - "**/*.abilist"
# agents:
# queue: "libcxx-builders"
# os: "macos"
# arch: "arm64"
# retry:
# automatic:
# - exit_status: -1 # Agent was lost
# limit: 2
# timeout_in_minutes: 120

- group: ARM
steps:
- label: AArch64
Expand Down
Loading

0 comments on commit 8b98482

Please sign in to comment.