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

Add very basic linux CI #264

Merged
merged 2 commits into from
Sep 20, 2023
Merged
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
28 changes: 10 additions & 18 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ x_defaults:
test_targets:
- "//..."

toolchain_flags: &toolchain_flags
build_flags:
- "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
- "--crosstool_top=@local_config_apple_cc//:toolchain"
- "--host_crosstool_top=@local_config_apple_cc//:toolchain"
test_flags:
- "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
- "--crosstool_top=@local_config_apple_cc//:toolchain"
- "--host_crosstool_top=@local_config_apple_cc//:toolchain"
linux_common: &linux_common
platform: ubuntu2004
build_targets:
- "//test/test_data:multi_arch_cc_binary"

tasks:
macos_latest:
Expand All @@ -29,7 +24,6 @@ tasks:
macos_latest_bzlmod:
name: "Current LTS using bzlmod"
bazel: latest
<<: *toolchain_flags
<<: *common
build_targets:
- "//..."
Expand Down Expand Up @@ -58,16 +52,14 @@ tasks:
- .bazelci/update_workspace_to_deps_heads.sh
<<: *common

macos_latest_vendored_toolchain:
name: "Latest Bazel vendored toolchain"
linux_latest:
name: "Current LTS on Linux"
bazel: latest
<<: *common
<<: *toolchain_flags
<<: *linux_common

macos_last_green_vendored_toolchain:
name: "Last Green Bazel vendored toolchain"
linux_last_green:
name: "last_green on Linux"
bazel: last_green
<<: *common
<<: *toolchain_flags
<<: *linux_common

buildifier: latest
8 changes: 5 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build --apple_crosstool_top=@local_config_apple_cc//:toolchain
build --crosstool_top=@local_config_apple_cc//:toolchain
build --host_crosstool_top=@local_config_apple_cc//:toolchain
build --enable_platform_specific_config
build --features=treat_warnings_as_errors

build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
5 changes: 4 additions & 1 deletion lib/transitions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def _macos_universal_transition_impl(settings, _attr):
},
]
else:
return settings
return {
"//command_line_option:cpu": settings["//command_line_option:cpu"],
"//command_line_option:platforms": settings["//command_line_option:platforms"],
}

macos_universal_transition = transition(
implementation = _macos_universal_transition_impl,
Expand Down