Skip to content

Commit aa64b71

Browse files
committed
ci: migrate bazel build job to GHA
Migrate the bazel_build job from CircleCI to Github Actions (cherry picked from commit 78a75fe)
1 parent 29c710d commit aa64b71

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

.circleci/config.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,6 @@ commands:
165165
# must be part of a workflow definition in order to run for PRs and push builds.
166166
# -----------------------------------------------------------------------------------------
167167
jobs:
168-
# -----------------------------------
169-
# Job to test that everything builds with Bazel
170-
# -----------------------------------
171-
bazel_build:
172-
<<: *job_defaults
173-
resource_class: xlarge
174-
environment:
175-
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
176-
steps:
177-
- checkout_and_rebase
178-
- *restore_cache
179-
- *setup_bazel_ci_config
180-
- *setup_bazel_remote_execution
181-
- *yarn_install
182-
- *setup_bazel_binary
183-
184-
# Exclude release and docs packages here as those will be built within
185-
# the "build_release_packages" and "publish_snapshots" jobs.
186-
- run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
187-
- *slack_notify_on_failure
188-
189168
# -------------------------------------------------------------------------------------------
190169
# Job that builds all release packages. The built packages can be then used in the same
191170
# workflow to publish snapshot builds.
@@ -305,8 +284,6 @@ workflows:
305284

306285
default_workflow:
307286
jobs:
308-
- bazel_build:
309-
filters: *ignore_presubmit_branch_filter
310287
- build_release_packages:
311288
filters: *ignore_presubmit_branch_filter
312289
- upload_release_packages:

.github/angular-robot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ merge:
5454

5555
# list of PR statuses that need to be successful
5656
requiredStatuses:
57-
- 'ci/circleci: bazel_build'
5857
- 'ci/circleci: build_release_packages'
5958

6059
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,27 @@ jobs:
211211
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 }}'
212212
env:
213213
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}
214+
215+
build:
216+
runs-on: ubuntu-latest-4core
217+
steps:
218+
- name: Initialize environment
219+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
220+
with:
221+
cache-node-modules: true
222+
- name: Setup Bazel
223+
uses: angular/dev-infra/github-actions/bazel/setup@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
224+
- name: Setup Bazel RBE
225+
uses: angular/dev-infra/github-actions/bazel/configure-remote@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
226+
- name: Install node modules
227+
run: yarn install --frozen-lockfile
228+
- name: Run tests
229+
run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
230+
- name: Notify about failed test
231+
if: ${{ failure() && github.event_name == 'push'}}
232+
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
233+
with:
234+
channel-id: 'C015EBF2XB6'
235+
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 }}'
236+
env:
237+
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

0 commit comments

Comments
 (0)