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

Update CI to add arm64 macos runners #1252

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion .bazelci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ tasks:
- "//..."
test_targets:
- "//..."
macos_arm64:
platform: macos_arm64
build_targets:
- "//..."
test_targets:
- "//..."
windows:
platform: windows
build_targets:
Expand Down Expand Up @@ -97,7 +103,7 @@ tasks:
test_targets: *rbe_targets
macos_examples_standalone:
name: Examples (spawn_strategy=standalone)
platform: macos
platform: macos_arm64
working_directory: examples
macos_targets: &macos_targets_standalone
- "//..."
Expand All @@ -122,6 +128,23 @@ tasks:
- "--noincompatible_enable_cc_toolchain_resolution"
- "--noenable_bzlmod"
- "--enable_workspace"
macos_arm64_examples:
name: Examples (arm64)
platform: macos_arm64
working_directory: examples
macos_targets: &macos_arm64_targets
- "//..."
- "//:third_party_examples_macos_tests"
- "-//cmake_android/..."
# Remove tests that depend on shared libraries, which currently doesn't work on MacOS - https://github.com/bazelbuild/bazel/issues/10254
- "-@rules_foreign_cc_examples_third_party//curl:curl_test"
- "-@rules_foreign_cc_examples_third_party//openssl:openssl_test"
build_targets: *macos_arm64_targets
test_targets: *macos_arm64_targets
build_flags:
- "--enable_workspace"
test_flags:
- "--enable_workspace"
macos_examples:
name: Examples
platform: macos
Expand Down Expand Up @@ -195,6 +218,12 @@ tasks:
working_directory: test/standard_cxx_flags_test
test_targets:
- "//:flags_test"
macos_arm64_flags:
name: Flags (arm64)
platform: macos_arm64
working_directory: test/standard_cxx_flags_test
test_targets:
- "//:flags_test"
windows_flags:
name: Flags
platform: windows
Expand All @@ -213,6 +242,12 @@ tasks:
working_directory: test/detect_root_test
test_targets:
- "//:tests"
macos_oarm64_detect_root:
name: Detect root (arm64)
platform: macos_arm64
working_directory: test/detect_root_test
test_targets:
- "//:tests"
macos_detect_root:
name: Detect root
platform: macos
Expand Down
8 changes: 4 additions & 4 deletions examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_swift", version = "1.6.0", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_apple", version = "3.4.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "apple_support", version = "1.12.0", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_python", version = "0.23.0")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_python", version = "0.35.0")


python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand All @@ -29,9 +29,9 @@ python.toolchain(

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
name = "pip",
hub_name = "pip",
python_version = "3.10",
requirements_lock = "//:requirements_lock.txt",
requirements_windows = "//:requirements_windows.txt",
)
use_repo(pip, "pip")

Expand Down
6 changes: 3 additions & 3 deletions examples/third_party/gperftools/gperftools_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def gperftools_repositories():
http_archive,
name = "gperftools",
build_file = Label("//gperftools:BUILD.gperftools.bazel"),
sha256 = "1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9",
strip_prefix = "gperftools-2.7",
urls = ["https://github.com/gperftools/gperftools/releases/download/gperftools-2.7/gperftools-2.7.tar.gz"],
sha256 = "",
strip_prefix = "gperftools-2.15",
urls = ["https://github.com/gperftools/gperftools/releases/download/gperftools-2.15/gperftools-2.15.tar.gz"],
)
7 changes: 3 additions & 4 deletions examples/third_party/libpng/libpng_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ def libpng_repositories():
http_archive,
name = "libpng",
build_file = Label("//libpng:BUILD.libpng.bazel"),
sha256 = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6",
strip_prefix = "libpng-1.6.34",
sha256 = "",
strip_prefix = "libpng-1.6.43",
urls = [
"https://mirror.bazel.build/ftp-osl.osuosl.org/pub/libpng/src/libpng16/libpng-1.6.34.tar.xz",
"http://ftp-osl.osuosl.org/pub/libpng/src/libpng16/libpng-1.6.34.tar.xz",
"https://downloads.sourceforge.net/project/libpng/libpng16/1.6.43/libpng-1.6.43.tar.xz",
],
)
13 changes: 5 additions & 8 deletions examples/third_party/openssl/openssl_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ def openssl_repositories():
http_archive,
name = "openssl",
build_file = Label("//openssl:BUILD.openssl.bazel"),
sha256 = "9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f",
strip_prefix = "openssl-1.1.1o",
sha256 = "",
strip_prefix = "openssl-1.1.1w",
urls = [
"https://mirror.bazel.build/www.openssl.org/source/openssl-1.1.1o.tar.gz",
"https://www.openssl.org/source/openssl-1.1.1o.tar.gz",
"https://github.com/openssl/openssl/archive/OpenSSL_1_1_1o.tar.gz",
"https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz",
],
)

Expand All @@ -32,9 +30,8 @@ def openssl_repositories():
maybe(
http_archive,
name = "rules_perl",
sha256 = "5cefadbf2a49bf3421ede009f2c5a2c9836abae792620ed2ff99184133755325",
strip_prefix = "rules_perl-0.1.0",
strip_prefix = "rules_perl-0.2.3",
urls = [
"https://github.com/bazelbuild/rules_perl/archive/refs/tags/0.1.0.tar.gz",
"https://github.com/bazelbuild/rules_perl/archive/refs/tags/0.2.3.tar.gz",
],
)