feat: support RBE #372
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- v*.*.* | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ruleset: | |
name: Ruleset | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bazel run :buildifier.check | |
- run: bazel test ... | |
- if: failure() && runner.debug == '1' | |
uses: mxschmitt/action-tmate@v3 | |
examples-gem: | |
name: Examples / Gem | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- 3.0.6 | |
- 3.1.4 | |
- 3.2.2 | |
- 3.3.0 | |
- jruby-9.4.5.0 | |
- truffleruby-23.1.1 | |
- system | |
os: | |
- ubuntu | |
- macos | |
- windows | |
mode: | |
- bzlmod | |
- WORKSPACE | |
exclude: | |
# JRuby with bzlmod fails with long path issues on Windows. | |
# See #64 | |
- os: windows | |
ruby: jruby-9.4.5.0 | |
mode: bzlmod | |
# TruffleRuby doesn't work on Windows. | |
- os: windows | |
ruby: truffleruby-23.1.1 | |
defaults: | |
run: | |
working-directory: examples/gem | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: p0deje/[email protected] | |
with: | |
bazelrc: common --announce_rc --color=yes ${{ matrix.mode == 'WORKSPACE' && '--noenable_bzlmod' || '' }} | |
- run: echo ${{ matrix.ruby }} > .ruby-version | |
- if: matrix.ruby == 'system' | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0.6' | |
- run: bazel build ... | |
- run: bazel run lib/gem:add-numbers 2 | |
- run: bazel run lib/gem:print-version | |
- run: bazel test ... | |
- if: failure() && runner.debug == '1' | |
uses: mxschmitt/action-tmate@v3 | |
release: | |
name: Release | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- ruleset | |
- examples-gem | |
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v5 | |
with: | |
prerelease: false | |
release_files: rules_ruby-*.tar.gz |