chore: green up CI (#767)
This commit is contained in:
parent
8e5a86f8b8
commit
ce79ef07c0
|
@ -4,6 +4,12 @@ CIRCLECI_ORG = "aspect-build"
|
|||
|
||||
CIRCLECI_USER_CONFIG_FILE = "//.circleci:user-config.yml"
|
||||
|
||||
not_windows = select({
|
||||
# There isn't a published rosetta binary for windows as of Feb 2024
|
||||
"@platforms//os:windows": ["@platforms//:incompatible"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
alias(
|
||||
name = "rosetta",
|
||||
actual = select({
|
||||
|
@ -12,6 +18,7 @@ alias(
|
|||
"@bazel_tools//src/conditions:linux_aarch64": "@rosetta_linux_aarch64//file:rosetta",
|
||||
"@bazel_tools//src/conditions:linux_x86_64": "@rosetta_linux_x86_64//file:rosetta",
|
||||
}),
|
||||
target_compatible_with = not_windows,
|
||||
)
|
||||
|
||||
alias(
|
||||
|
@ -22,6 +29,7 @@ alias(
|
|||
"@bazel_tools//src/conditions:linux_aarch64": "@circleci_config_merge_linux_aarch64//:circleci-config-merge",
|
||||
"@bazel_tools//src/conditions:linux_x86_64": "@circleci_config_merge_linux_x86_64//:circleci-config-merge",
|
||||
}),
|
||||
target_compatible_with = not_windows,
|
||||
)
|
||||
|
||||
genrule(
|
||||
|
@ -29,6 +37,7 @@ genrule(
|
|||
srcs = ["//.aspect/workflows:config.yaml"],
|
||||
outs = [":aspect-workflows-config.yml"],
|
||||
cmd = "CIRCLE_PROJECT_USERNAME={0} $(execpath :rosetta) steps --configuration .aspect/workflows/config.yaml --host circleci > $@".format(CIRCLECI_ORG),
|
||||
target_compatible_with = not_windows,
|
||||
tools = [":rosetta"],
|
||||
)
|
||||
|
||||
|
@ -40,6 +49,7 @@ genrule(
|
|||
],
|
||||
outs = [":_config.yml"],
|
||||
cmd = "echo -e '# GENERATED FILE - DO NOT EDIT!\\n# Update with: bazel run //.circleci:write_merged_config' > $@ && $(execpath :circleci-config-merge) merge $(execpath :aspect-workflows-config.yml) $(execpath {0}) >> $@".format(CIRCLECI_USER_CONFIG_FILE),
|
||||
target_compatible_with = not_windows,
|
||||
tools = [":circleci-config-merge"],
|
||||
)
|
||||
|
||||
|
@ -47,4 +57,5 @@ write_source_file(
|
|||
name = "write_merged_config",
|
||||
in_file = ":_config.yml",
|
||||
out_file = "config.yml",
|
||||
target_compatible_with = not_windows,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue