Skip to content

Commit

Permalink
bazelisk is pre-installed on github runners (#11173)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner authored Oct 26, 2022
1 parent 8e48e08 commit d78c5e8
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 83 deletions.
14 changes: 0 additions & 14 deletions .github/actions/setup-bazelisk/action.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
key: ${{ runner.os }}-bazel-build-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -69,8 +67,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-small-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -104,8 +100,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-medium-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -133,8 +127,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-lint-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -169,8 +161,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-${{ matrix.browser }}-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Java
Expand Down Expand Up @@ -227,8 +217,6 @@ jobs:
${{ runner.os }}-bazel-${{ matrix.browser }}-server-tests-
${{ runner.os }}-bazel-${{ matrix.browser }}-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Java
Expand Down Expand Up @@ -276,8 +264,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-firefox-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Java
Expand Down Expand Up @@ -317,8 +303,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-firefox-tests-
${{ runner.os }}-bazel-build-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Firefox and GeckoDriver
Expand Down Expand Up @@ -98,8 +96,6 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Firefox and GeckoDriver
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ jobs:
key: ${{ runner.os }}-bazel-python-unit-tests-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-python-unit-tests-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -130,8 +128,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-chrome-tests-
${{ runner.os }}-bazel-python-unit-tests-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Set up Python 3.7
Expand Down Expand Up @@ -173,8 +169,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-firefox-tests-
${{ runner.os }}-bazel-python-unit-tests-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Set up Python 3.7
Expand Down Expand Up @@ -215,8 +209,6 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-firefox-tests-
${{ runner.os }}-bazel-python-unit-tests-
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Set up Python 3.7
Expand Down
105 changes: 66 additions & 39 deletions .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,27 @@ jobs:
matrix:
target: [ 'selenium-devtools', 'selenium-webdriver' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- uses: ruby/setup-ruby@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-build-gem-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-build-gem-${{ matrix.target }}-
- uses: ./.github/actions/setup-bazelisk
- uses: ./.github/actions/bazel
- name: Build Gems
uses: ./.github/actions/bazel
with:
command: build //rb:${{ matrix.target }}

Expand All @@ -58,29 +62,35 @@ jobs:
matrix:
target: [ 'chrome-test', 'remote-chrome-test' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- uses: ruby/setup-ruby@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-${{ matrix.target }}-
- uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- uses: ./.github/actions/setup-chrome
- run: Xvfb :99 &
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
- name: Start XVFB
run: Xvfb :99 &
- name: Start Fluxbox
run: fluxbox -display :99 &
- uses: ./.github/actions/bazel
- name: Run Chrome tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:${{ matrix.target }}
attempts: 3
Expand All @@ -96,30 +106,38 @@ jobs:
matrix:
target: [ 'firefox-test', 'remote-firefox-test' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- uses: ruby/setup-ruby@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-${{ matrix.target }}-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-${{ matrix.target }}-
- uses: ./.github/actions/setup-bazelisk
- name: Setup Fluxbox
run: sudo apt-get -y install fluxbox
- name: Setup Firefox and GeckoDriver
uses: ./.github/actions/setup-firefox
- run: Xvfb :99 &
- name: Setup Firefox
uses: abhi1693/[email protected]
with:
browser: firefox
version: latest
- name: Start XVFB
run: Xvfb :99 &
- name: Start Fluxbox
run: fluxbox -display :99 &
- uses: ./.github/actions/bazel
- name: Run Firefox tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:${{ matrix.target }}
attempts: 3
Expand All @@ -131,20 +149,23 @@ jobs:
needs: check_workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-docs-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-${{ matrix.target }}-
- uses: ./.github/actions/setup-bazelisk
- uses: ./.github/actions/bazel
- name: Run docs tests
uses: ./.github/actions/bazel
with:
command: run //rb:docs

Expand All @@ -153,20 +174,23 @@ jobs:
needs: check_workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-lint-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-lint-
- uses: ./.github/actions/setup-bazelisk
- uses: ./.github/actions/bazel
- name: Run lint tests
uses: ./.github/actions/bazel
with:
command: run //rb:lint

Expand All @@ -179,19 +203,22 @@ jobs:
matrix:
ruby: [ '2.7', '3.1' ]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v2
ruby-version: 2.7
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-ruby-unit-test-${{ matrix.ruby }}-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-ruby-unit-test-${{ matrix.ruby }}-
- uses: ./.github/actions/setup-bazelisk
- uses: ./.github/actions/bazel
- name: Run unit tests
uses: ./.github/actions/bazel
with:
command: test --test_output=all //rb:unit-test
2 changes: 0 additions & 2 deletions .github/workflows/should-workflow-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down

0 comments on commit d78c5e8

Please sign in to comment.