Built Make toolchains can now be used in RBE (#548)

* Enable more tests for RBE

* Turn off gn build for RBE

* Fix to make_simple example

* Turn off configure_with_bazel_transitive due to an issue with toolchain configuration

* Add CMAKE_MAKE_PROGRAM to generate_args

* Set CMP0074 policy for cmake to use the ZLIB_ROOT entry

* Disable libpng build on rbe

* Disable bison build on RBE

* Disable cmake_android example on RBE

* Fix typo in ZLIB_ROOT

* Reenable libpng build

* Address review comments
This commit is contained in:
James Sharpe 2021-03-28 22:01:15 +01:00 committed by GitHub
parent 46047ae15c
commit 0379c97cb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 11 deletions

View File

@ -42,16 +42,10 @@ tasks:
working_directory: examples
rbe_targets: &rbe_targets
- "//..."
# TODO: fix these targets on RBE
- "-//:third_party_examples_linux_tests"
- "//:third_party_examples_linux_rbe_tests"
# Gives error: zipalign: error while loading shared libraries: /usr/local/lib/libc++.so: file too short
- "-//cmake_android/..."
- "-//cmake_defines/..."
- "-//cmake_hello_world_lib/..."
- "-//cmake_with_data/..."
- "-//cmake_with_target/..."
- "-//cmake_working_dir/..."
- "-//configure_with_bazel_transitive/..."
- "-//make_simple/..."
build_targets: *rbe_targets
test_targets: *rbe_targets
macos_examples:

View File

@ -22,6 +22,12 @@ test_suite(
tests = ["@rules_foreign_cc_examples_third_party//:linux_tests"],
)
test_suite(
name = "third_party_examples_linux_rbe_tests",
tags = ["manual"],
tests = ["@rules_foreign_cc_examples_third_party//:linux_rbe_tests"],
)
test_suite(
name = "third_party_examples_macos_tests",
tags = ["manual"],

View File

@ -6,5 +6,6 @@ default all $(BUILD_DIR)/lib/liba.a: liba.cpp liba.h
ar rcs $(BUILD_DIR)/lib/liba.a $(BUILD_DIR)/lib/liba.o
install: $(BUILD_DIR)/lib/liba.a
mkdir -p $(PREFIX)/lib $(PREFIX)/include
cp -rv $(BUILD_DIR)/lib $(PREFIX)
cp liba.h $(PREFIX)/include

View File

@ -16,6 +16,25 @@ test_suite(
],
)
test_suite(
name = "linux_rbe_tests",
tags = ["manual"],
tests = [
# Missing a new enough m4 to build
#"//bison:bison_build_test",
"//cares:test_c_ares",
"//curl:curl_build_test",
# Attempts to access git sha during configure of build so fails
#"//gn:gn_launch_test",
"//libgit2:libgit2_build_test",
"//libpng:test_libpng",
"//libssh2:libssh2_build_test",
"//openssl:openssl_build_test",
"//pcre:pcre_build_test",
],
)
test_suite(
name = "macos_tests",
tags = ["manual"],

View File

@ -10,7 +10,8 @@ filegroup(
cmake(
name = "libpng",
cache_entries = {
"ZLIB_ROOT": "$EXT_BUILD_DEPS/libz",
"CMAKE_POLICY_DEFAULT_CMP0074": "NEW",
"ZLIB_ROOT": "$EXT_BUILD_DEPS/zlib",
},
lib_source = "//:all_srcs",
out_include_dir = "include/libpng16",

View File

@ -37,11 +37,11 @@ def _cmake_impl(ctx):
if "Unix Makefiles" == generator:
make_data = get_make_data(ctx)
tools_deps.extend(make_data.deps)
env.update({"CMAKE_MAKE_PROGRAM": make_data.path})
generate_args.append("-DCMAKE_MAKE_PROGRAM={}".format(make_data.path))
elif "Ninja" in generator:
ninja_data = get_ninja_data(ctx)
tools_deps.extend(ninja_data.deps)
env.update({"CMAKE_MAKE_PROGRAM": ninja_data.path})
generate_args.append("-DCMAKE_MAKE_PROGRAM={}".format(ninja_data.path))
attrs = create_attrs(
ctx.attr,