Skip to content

Commit

Permalink
ci: migrate bazel build job to GHA
Browse files Browse the repository at this point in the history
Migrate the bazel_build job from CircleCI to Github Actions

(cherry picked from commit 78a75fe)
  • Loading branch information
josephperrott committed Oct 19, 2023
1 parent 29c710d commit aa64b71
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
23 changes: 0 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,27 +165,6 @@ commands:
# must be part of a workflow definition in order to run for PRs and push builds.
# -----------------------------------------------------------------------------------------
jobs:
# -----------------------------------
# Job to test that everything builds with Bazel
# -----------------------------------
bazel_build:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

# Exclude release and docs packages here as those will be built within
# the "build_release_packages" and "publish_snapshots" jobs.
- run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
- *slack_notify_on_failure

# -------------------------------------------------------------------------------------------
# Job that builds all release packages. The built packages can be then used in the same
# workflow to publish snapshot builds.
Expand Down Expand Up @@ -305,8 +284,6 @@ workflows:

default_workflow:
jobs:
- bazel_build:
filters: *ignore_presubmit_branch_filter
- build_release_packages:
filters: *ignore_presubmit_branch_filter
- upload_release_packages:
Expand Down
1 change: 0 additions & 1 deletion .github/angular-robot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ merge:

# list of PR statuses that need to be successful
requiredStatuses:
- 'ci/circleci: bazel_build'
- 'ci/circleci: build_release_packages'

# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,27 @@ jobs:
slack-message: 'Browser test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

build:
runs-on: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run tests
run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Build job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

0 comments on commit aa64b71

Please sign in to comment.