Skip to content

Commit

Permalink
[ci] Wrap all the build steps for the rbe build into one step
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jun 19, 2023
1 parent 46da039 commit 2ddce97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/ci-rbe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,10 @@ on:
workflow_dispatch:

jobs:
set-ruby-version:
name: Set Ruby version
uses: ./.github/workflows/bazel.yml
with:
run: echo 'RUBY_VERSION = "jruby-9.4.2.0"' >rb/ruby_version.bzl

# The NPM repository rule wants to write to the HOME directory
# but that's configured for the remote build machines, so run
# that repository rule first so that the subsequent remote
# build runs successfully.
warm-cache:
name: Warm repository rule cache
uses: ./.github/workflows/bazel.yml
needs: set-ruby-version
with:
name: Cache
cache-key: rbe
run: bazel query @npm//:all

rbe-tests:
test:
name: Test
uses: ./.github/workflows/bazel.yml
needs: warm-cache
with:
name: Cache
cache-key: rbe
run: bazel test --config=remote --keep_going //java/...
run: ./scripts/github-actions/ci-build.sh
18 changes: 18 additions & 0 deletions scripts/github-actions/ci-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -eufo pipefail
# We want to see what's going on
set -x

# We want to use a pre-built Ruby version
echo 'RUBY_VERSION = "jruby-9.4.2.0"' >rb/ruby_version.bzl

# The NPM repository rule wants to write to the HOME directory
# but that's configured for the remote build machines, so run
# that repository rule first so that the subsequent remote
# build runs successfully.
bazel query @npm//:all

# Now run the tests. The engflow build uses pinned browsers
# so this should be fine
bazel test --config=remote --keep_going //java/...

0 comments on commit 2ddce97

Please sign in to comment.