Skip to content

Commit

Permalink
chore: align ci patterns (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan authored May 14, 2024
1 parent 155e3f2 commit ffc5a7b
Show file tree
Hide file tree
Showing 23 changed files with 367 additions and 180 deletions.
1 change: 1 addition & 0 deletions .aspect/bazelrc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user.bazelrc
21 changes: 18 additions & 3 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workspaces:
.:
tasks:
- test:
e2e/smoke:
e2e/copy_action:
icon: bazel
tasks:
- test:
Expand All @@ -19,7 +19,7 @@ workspaces:
without: true
- delivery:
without: true
e2e/coreutils:
e2e/copy_to_directory:
icon: bazel
tasks:
- test:
Expand All @@ -34,7 +34,7 @@ workspaces:
without: true
- delivery:
without: true
e2e/copy_to_directory:
e2e/coreutils:
icon: bazel
tasks:
- test:
Expand Down Expand Up @@ -64,6 +64,21 @@ workspaces:
without: true
- delivery:
without: true
e2e/smoke:
icon: bazel
tasks:
- test:
queue: bazel-lib-small
- format:
without: true
- gazelle:
without: true
- configure:
without: true
- buildifier:
without: true
- delivery:
without: true
tasks:
- test:
hooks:
Expand Down
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import %workspace%/.aspect/bazelrc/performance.bazelrc
# For testing our --stamp behavior.
# Normally users would use a --workspace_status_command with a script that calls `git describe`.
build --embed_label=v1.2.3

# Mock versioning command to test the --stamp behavior
build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3"

Expand Down
135 changes: 129 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ workflows:
equal:
- scheduled_pipeline
- << pipeline.trigger_source >>
aspect-workflows-e2e-copy_action:
jobs:
- aw-e2e_copy_action_test:
context: []
delivery_manifest: false
workspace: e2e/copy_action
when:
and:
- not: << pipeline.parameters.perform_delivery >>
- not:
equal:
- scheduled_pipeline
- << pipeline.trigger_source >>
aspect-workflows-e2e-copy_to_directory:
jobs:
- aw-e2e_copy_to_directory_test:
Expand Down Expand Up @@ -321,6 +334,105 @@ jobs:
no_output_timeout: 10m
when: always
working_directory: /mnt/ephemeral/workdir
aw-e2e_copy_action_test:
environment:
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
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Configure Workflows
- checkout
- run:
command: rm -rf /workflows/artifacts /workflows/testlogs
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Prepare archive directories
- run:
command: /etc/aspect/workflows/bin/agent_health_check
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Agent health checks
no_output_timeout: 180m
- run:
command: rosetta run test --workspace << parameters.workspace >>
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Test
no_output_timeout: 180m
- store_test_results:
path: /workflows/testlogs
- when:
condition:
and:
- <<parameters.delivery_manifest>>
- or:
- matches:
pattern: ^main$
value: << pipeline.git.branch >>
steps:
- run:
command: rosetta run delivery_manifest --workspace << parameters.workspace
>> --data TARGETS_SOURCE=test
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Delivery Manifest
no_output_timeout: 180m
- store_artifacts:
path: /workflows/testlogs
- store_artifacts:
path: /workflows/artifacts
- store_artifacts:
path: vmstat.out
- run:
command: rosetta run finalization
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Finalization
no_output_timeout: 10m
when: always
working_directory: /mnt/ephemeral/workdir
aw-e2e_copy_to_directory_test:
environment:
ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml
Expand Down Expand Up @@ -1042,26 +1154,26 @@ jobs:
name: Agent health checks
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace e2e/external_copy_to_directory
command: rosetta run warming --workspace e2e/smoke
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Create warming archive for e2e/external_copy_to_directory
name: Create warming archive for e2e/smoke
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace e2e/copy_to_directory
command: rosetta run warming --workspace e2e/external_copy_to_directory
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Create warming archive for e2e/copy_to_directory
name: Create warming archive for e2e/external_copy_to_directory
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace e2e/coreutils
Expand All @@ -1075,15 +1187,26 @@ jobs:
name: Create warming archive for e2e/coreutils
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace e2e/smoke
command: rosetta run warming --workspace e2e/copy_to_directory
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Create warming archive for e2e/smoke
name: Create warming archive for e2e/copy_to_directory
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace e2e/copy_action
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
XDG_CACHE_HOME: /mnt/ephemeral/caches
name: Create warming archive for e2e/copy_action
no_output_timeout: 180m
- run:
command: rosetta run warming --workspace .
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Bazel options included on CI using the --bazelrc Bazel flag
# Directories caches by GitHub actions
common:local --disk_cache=~/.cache/bazel-disk-cache
common --repository_cache=~/.cache/bazel-repository-cache

# CI specific caching options
build --repository_cache=~/.cache/bazel-repo
test --test_env=XDG_CACHE_HOME
# Debug where options came from
common --announce_rc

# When no remote cache, use a local one
build:local --disk_cache=~/.cache/bazel
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
common --test_env=XDG_CACHE_HOME

# Remote build execution
build:rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote
build:rbe --genrule_strategy=remote
build:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote
build:rbe --jobs=32

# BuildBuddy remote exec
build:rbe --bes_results_url=https://app.buildbuddy.io/invocation/
build:rbe --bes_backend=grpcs://remote.buildbuddy.io
build:rbe --remote_timeout=3600
build:rbe --remote_executor=grpcs://remote.buildbuddy.io

test --test_output=errors
Loading

0 comments on commit ffc5a7b

Please sign in to comment.