Skip to content

Commit

Permalink
Avoid Ruby installation on every CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Nov 9, 2022
1 parent 71545c9 commit 5f4a05c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/.bazelrc.local
@@ -1,12 +1,15 @@
# Use predefined path for building so we could cache `external/`.
startup --output_base=/tmp/bazel

# Set up caching on local disk so incremental builds are faster
# See https://bazel.build/designs/2016/09/30/repository-cache.html
build --repository_cache=~/.cache/bazel-repo
test --repository_cache=~/.cache/bazel-repo
# See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache
build --disk_cache=~/.cache/bazel-disk
test --disk_cache=~/.cache/bazel-disk"
test --disk_cache=~/.cache/bazel-disk

# Make output easier to read
build --curses=no
build --color=no
build --show_timestamps
build --show_timestamps
17 changes: 9 additions & 8 deletions .github/workflows/ci-ruby.yml
Expand Up @@ -39,6 +39,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-build-gem-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
Expand All @@ -85,7 +86,7 @@ jobs:
- name: Run Chrome tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:${{ matrix.target }}
command: test --cache_test_results=no --test_output=all //rb:${{ matrix.target }}
attempts: 3
env:
DISPLAY: :99
Expand All @@ -109,7 +110,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
Expand All @@ -129,7 +130,7 @@ jobs:
- name: Run Firefox tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:${{ matrix.target }}
command: test --cache_test_results=no --test_output=all //rb:${{ matrix.target }}
attempts: 3
env:
DISPLAY: :99
Expand All @@ -145,7 +146,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-docs-${{ hashFiles('**/BUILD.bazel') }}
Expand All @@ -167,7 +168,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-lint-${{ hashFiles('**/BUILD.bazel') }}
Expand All @@ -193,7 +194,7 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
/tmp/bazel/external
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-unit-test-${{ matrix.ruby }}-${{ hashFiles('**/BUILD.bazel') }}
Expand All @@ -204,4 +205,4 @@ jobs:
- name: Run unit tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:unit-test
command: test --cache_test_results=no --test_output=all //rb:unit-test

0 comments on commit 5f4a05c

Please sign in to comment.