From e008462003b34fcf0fdba9bb104f651912c5f045 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 12 Dec 2022 06:09:04 -0800 Subject: [PATCH] Bazel CI: Enable post-submit for new macos_arm64 platform. PiperOrigin-RevId: 494707501 Change-Id: I3a69ec98e0819fe47e57dbfdd70657b39217f253 --- .bazelci/postsubmit.yml | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/.bazelci/postsubmit.yml b/.bazelci/postsubmit.yml index 55040622f07cb4..40f59d52b3c7bb 100644 --- a/.bazelci/postsubmit.yml +++ b/.bazelci/postsubmit.yml @@ -202,6 +202,67 @@ tasks: include_json_profile: - build - test + macos_arm64: + xcode_version: "13.0" + shell_commands: + - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# + android_ndk_repository/android_ndk_repository/' WORKSPACE + - rm -f WORKSPACE.bak + - rm -rf $HOME/bazeltest + - mkdir $HOME/bazeltest + - ln -sf $OUTPUT_BASE/external $HOME/bazeltest/external + build_flags: + - "--test_env=TEST_INSTALL_BASE=$HOME/bazeltest/install_base" + - "--test_env=TEST_REPOSITORY_HOME=$OUTPUT_BASE/external" + - "--test_env=TEST_REPOSITORY_HOME=$HOME/bazeltest/external" + - "--test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80" + - "--noremote_accept_cached" + build_targets: + - "//src:bazel" + - "//src:bazel_jdk_minimal" + - "//src:test_repos" + - "//src/main/java/..." + test_flags: + - "--sandbox_default_allow_network=false" + - "--sandbox_writable_path=$HOME/bazeltest" + - "--test_env=TEST_INSTALL_BASE=$HOME/bazeltest/install_base" + - "--test_env=TEST_REPOSITORY_HOME=$HOME/bazeltest/external" + # Configure and enable tests that require access to the network. + - "--test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80" + test_targets: + - "//scripts/..." + - "//src/test/..." + - "//src/tools/execlog/..." + - "//src/tools/singlejar/..." + - "//src/tools/workspacelog/..." + - "//third_party/ijar/..." + - "//tools/android/..." + - "//tools/aquery_differ/..." + - "//tools/osx/crosstool/..." + - "//tools/python/..." + # C++ coverage is not supported on macOS yet. + - "-//src/test/shell/bazel:bazel_cc_code_coverage_test" + # MacOS does not have cgroups so it can't support hardened sandbox + - "-//src/test/shell/integration:bazel_hardened_sandboxed_worker_test" + # https://github.com/bazelbuild/bazel/issues/16521 + - "-//src/test/shell/bazel/android/..." + - "-//src/tools/android/java/com/google/devtools/build/android/..." + - "-//src/test/java/com/google/devtools/build/android/dexer:AllTests" + # https://github.com/bazelbuild/bazel/issues/16526 + - "-//src/test/shell/bazel:python_version_test" + # https://github.com/bazelbuild/bazel/issues/16525 + - "-//src/test/java/com/google/devtools/build/lib/buildtool:KeepGoingTest" + - "-//src/test/java/com/google/devtools/build/lib/buildtool:DanglingSymlinkTest" + - "-//src/test/java/com/google/devtools/build/lib/buildtool:CompileOneDependencyIntegrationTest" + - "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest" + - "-//src/test/java/com/google/devtools/build/lib/skyframe/rewinding:RewindingTest" + - "-//src/test/java/com/google/devtools/build/lib/buildtool:MiscAnalysisTest" + - "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests" + # https://github.com/bazelbuild/bazel/issues/16975 + - "-//scripts/docs:rewriter_test" + include_json_profile: + - build + - test windows: batch_commands: - powershell -Command "(Get-Content WORKSPACE) -Replace '# android_', 'android_' | Set-Content WORKSPACE"