Skip to content
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

RBE make #548

Merged
merged 12 commits into from
Mar 28, 2021
10 changes: 2 additions & 8 deletions .bazelci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions examples/make_simple/code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions examples/third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
3 changes: 2 additions & 1 deletion examples/third_party/libpng/BUILD.libpng.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ filegroup(
cmake(
name = "libpng",
cache_entries = {
"ZLIB_ROOT": "$EXT_BUILD_DEPS/libz",
"CMAKE_POLICY_DEFAULT_CMP0074": "NEW",
jsharpe marked this conversation as resolved.
Show resolved Hide resolved
"ZLIB_ROOT": "$EXT_BUILD_DEPS/zlib",
},
lib_source = "//:all_srcs",
out_include_dir = "include/libpng16",
Expand Down
4 changes: 2 additions & 2 deletions foreign_cc/cmake.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down