Skip to content

Commit

Permalink
chore: use aspect workflows RBE
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide committed Aug 26, 2024
1 parent 07b98dc commit 322de6f
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 44 deletions.
8 changes: 8 additions & 0 deletions .aspect/workflows/bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# build without the bytes
common --remote_download_outputs=minimal
common --nobuild_runfile_links

common:aspect_rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote
common:aspect_rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote
common:aspect_rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/grpc
common:aspect_rbe --genrule_strategy=remote,local
common:aspect_rbe --jobs=32
common:aspect_rbe --remote_timeout=3600
common:aspect_rbe --nocache_test_results
8 changes: 8 additions & 0 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
queue: bazel-lib-default
bazel:
flags:
- --config=aspect_rbe
workspaces:
.:
tasks:
- test:
filters:
- no-workflows-rbe
- configure:
bazel:
flags: [] # TODO: Aspect CLI does not support --config for configure cmd
e2e/copy_action:
icon: bazel
tasks:
Expand Down
86 changes: 43 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ workflows:
- aw-buildifier:
context: []
workspace: .
- aw-configure:
context: []
workspace: .
- aw-format:
context: []
workspace: .
- aw-gazelle:
context: []
workspace: .
- aw-root_workspace_configure:
context: []
workspace: .
- aw-root_workspace_test:
context: []
workspace: .
Expand Down Expand Up @@ -208,46 +208,6 @@ jobs:
no_output_timeout: 10m
when: always
working_directory: /mnt/ephemeral/workdir
aw-configure:
environment:
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >>
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >>
ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows
ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml
ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >>
XDG_CACHE_HOME: /mnt/ephemeral/caches
machine: true
parameters:
delivery_manifest:
default: true
type: boolean
workspace:
type: string
resource_class: aspect-build/bazel-lib-small
steps:
- run:
command: /etc/aspect/workflows/bin/configure_workflows_env
name: Workflows environment
- checkout
- run:
command: rm -rf /workflows/artifacts /workflows/testlogs
name: Prepare archive directories
- run:
command: /etc/aspect/workflows/bin/agent_health_check
name: Agent health check
no_output_timeout: 180m
- run:
command: rosetta run configure --workspace << parameters.workspace >>
name: Configure
no_output_timeout: 180m
- store_artifacts:
path: /workflows/artifacts
- run:
command: rosetta run finalization
name: Finalization
no_output_timeout: 10m
when: always
working_directory: /mnt/ephemeral/workdir
aw-e2e_copy_action_test:
environment:
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >>
Expand Down Expand Up @@ -666,6 +626,46 @@ jobs:
name: Delivery
no_output_timeout: 180m
working_directory: /mnt/ephemeral/workdir
aw-root_workspace_configure:
environment:
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >>
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >>
ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows
ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml
ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >>
XDG_CACHE_HOME: /mnt/ephemeral/caches
machine: true
parameters:
delivery_manifest:
default: true
type: boolean
workspace:
type: string
resource_class: aspect-build/bazel-lib-small
steps:
- run:
command: /etc/aspect/workflows/bin/configure_workflows_env
name: Workflows environment
- checkout
- run:
command: rm -rf /workflows/artifacts /workflows/testlogs
name: Prepare archive directories
- run:
command: /etc/aspect/workflows/bin/agent_health_check
name: Agent health check
no_output_timeout: 180m
- run:
command: rosetta run configure --workspace << parameters.workspace >>
name: Configure
no_output_timeout: 180m
- store_artifacts:
path: /workflows/artifacts
- run:
command: rosetta run finalization
name: Finalization
no_output_timeout: 10m
when: always
working_directory: /mnt/ephemeral/workdir
aw-root_workspace_test:
environment:
ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >>
Expand Down
2 changes: 2 additions & 0 deletions lib/tests/coreutils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ genrule(
name = "ls",
outs = ["ls.txt"],
cmd = "$(COREUTILS_BIN) ls > $@",
tags = ["no-workflows-rbe"], # TODO: Fails on Workflows RBE
toolchains = ["@coreutils_toolchains//:resolved_toolchain"],
)

diff_test(
name = "ls_test",
file1 = "ls.txt.expected",
file2 = ":ls",
tags = ["no-workflows-rbe"], # TODO: Fails on Workflows RBE
)

genrule(
Expand Down
4 changes: 3 additions & 1 deletion lib/tests/jq/diff_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ test jq output on Windows. See https://github.com/stedolan/jq/issues/92.

load("//lib:diff_test.bzl", _diff_test = "diff_test")

def diff_test(name, file1, file2):
def diff_test(name, file1, file2, **kwargs):
"""Perform a diff_test ignoring carriage returns
Args:
name: name of the test rule
file1: first file to compare
file2: second file to compare
**kwargs: Additional arguments to pass to diff_test
"""
test_files = []
for i, file in enumerate([file1, file2], start = 1):
Expand All @@ -33,4 +34,5 @@ def diff_test(name, file1, file2):
name = name,
file1 = test_files[0],
file2 = test_files[1],
**kwargs
)

0 comments on commit 322de6f

Please sign in to comment.