[runtimes] Run backdeployment CI on Github hosted runners (#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.
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
# Testing configuration for back-deployment against older Apple system libunwind.
|
||||
#
|
||||
# Under this configuration, we compile and link all the test suite against the latest libunwind,
|
||||
# however we run against the libunwind on a different platform. This emulates the workflow of
|
||||
# a developer building their application using recent tools but with the goal of deploying
|
||||
# on existing devices running an older OS (and hence an older dylib).
|
||||
|
||||
import os, site
|
||||
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
|
||||
import libcxx.test.params, libcxx.test.config, libcxx.test.dsl
|
||||
|
||||
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
|
||||
|
||||
BACKDEPLOYMENT_PARAMETERS = [
|
||||
libcxx.test.dsl.Parameter(name='cxx_runtime_root', type=str,
|
||||
actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{cxx-runtime-root}', root)],
|
||||
help="""
|
||||
The simulated root of the system (for libc++) when running tests.
|
||||
|
||||
This should be a directory hierarchy under which the libc++ dylib can be found.
|
||||
The dylib in that hierarchy is the one that will be used at runtime when running
|
||||
the tests.
|
||||
"""),
|
||||
libcxx.test.dsl.Parameter(name='abi_runtime_root', type=str,
|
||||
actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{abi-runtime-root}', root)],
|
||||
help="""
|
||||
The simulated root of the system (for libc++abi) when running tests.
|
||||
|
||||
This should be a directory hierarchy under which the libc++abi dylib can be found.
|
||||
The dylib in that hierarchy is the one that will be used at runtime when running
|
||||
the tests.
|
||||
"""),
|
||||
libcxx.test.dsl.Parameter(name='unwind_runtime_root', type=str,
|
||||
actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{unwind-runtime-root}', root)],
|
||||
help="""
|
||||
The simulated root of the system (for libunwind) when running tests.
|
||||
|
||||
This should be a directory hierarchy under which the libunwind dylib can be found.
|
||||
The dylib in that hierarchy is the one that will be used at runtime when running
|
||||
the tests.
|
||||
"""),
|
||||
]
|
||||
|
||||
config.substitutions.append(('%{flags}',
|
||||
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
|
||||
))
|
||||
config.substitutions.append(('%{compile_flags}',
|
||||
'-nostdinc++ -I %{include}'
|
||||
))
|
||||
config.substitutions.append(('%{link_flags}',
|
||||
'-nostdlib++ -L %{lib} -lc++ -lc++abi -lunwind'
|
||||
))
|
||||
config.substitutions.append(('%{exec}',
|
||||
'%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- '
|
||||
))
|
||||
|
||||
config.stdlib = 'apple-libc++'
|
||||
config.using_system_stdlib = True
|
||||
|
||||
import os, site
|
||||
import libcxx.test.params, libcxx.test.config
|
||||
libcxx.test.config.configure(
|
||||
libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,
|
||||
libcxx.test.features.DEFAULT_FEATURES,
|
||||
config,
|
||||
lit_config
|
||||
)
|
||||
41
libunwind/test/configs/apple-libunwind-system.cfg.in
Normal file
41
libunwind/test/configs/apple-libunwind-system.cfg.in
Normal file
@@ -0,0 +1,41 @@
|
||||
# Testing configuration for back-deployment against the system-provided libunwind.
|
||||
#
|
||||
# Under this configuration, we compile and link all the test suite against the just-built
|
||||
# libunwind, but we run against the system libunwind.
|
||||
|
||||
import os, site
|
||||
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', '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}'
|
||||
))
|
||||
config.substitutions.append(('%{link_flags}',
|
||||
'-nostdlib++ -L %{lib} -lc++ -lunwind'
|
||||
))
|
||||
config.substitutions.append(('%{exec}',
|
||||
'%{executor} --execdir %T -- '
|
||||
))
|
||||
|
||||
config.stdlib = 'apple-libc++'
|
||||
config.using_system_stdlib = True
|
||||
|
||||
# TODO: This is a giant hack, but we need to change the install_name of libunwind.dylib because the
|
||||
# upstream configuration can't currently produce a libunwind.dylib that is compatible with the
|
||||
# Apple system one.
|
||||
import subprocess
|
||||
subprocess.check_call(['install_name_tool', '-id', '/usr/lib/system/libunwind.dylib', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/lib/libunwind.dylib'])
|
||||
|
||||
import os, site
|
||||
import libcxx.test.params, libcxx.test.config
|
||||
libcxx.test.config.configure(
|
||||
libcxx.test.params.DEFAULT_PARAMETERS,
|
||||
libcxx.test.features.DEFAULT_FEATURES,
|
||||
config,
|
||||
lit_config
|
||||
)
|
||||
Reference in New Issue
Block a user