Skip to content

feat: support registering system Ruby #198

feat: support registering system Ruby

feat: support registering system Ruby #198

Workflow file for this run

name: CI
on:
- pull_request
- push
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
JAVA_OPTS: -Djdk.io.File.enableADS=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
strategy:
fail-fast: false
matrix:
ruby:
- 3.0.6
- 3.1.4
- 3.2.2
- 3.3.0-preview3
- jruby-9.4.5.0
- truffleruby-23.1.1
- system
os:
- ubuntu
- macos
- windows
mode:
- bzlmod
- WORKSPACE
exclude:
# RubyInstaller doesn't ship previews.
- os: windows
ruby: 3.3.0-preview3
# TruffleRuby doesn't work on Windows.
- os: windows
ruby: truffleruby-23.1.1
# https://github.com/p0deje/rules_ruby/issues/23
- mode: bzlmod
ruby: system
- mode: bzlmod
ruby: 3.0.6
- mode: bzlmod
ruby: 3.1.4
- mode: bzlmod
ruby: 3.2.2
- mode: bzlmod
ruby: 3.3.0-preview3
- mode: bzlmod
ruby: 3.0.6
- mode: bzlmod
ruby: truffleruby-23.1.1
defaults:
run:
working-directory: examples/gem
steps:
- uses: actions/checkout@v4
- uses: p0deje/[email protected]
with:
bazelrc: |
build --announce_rc
${{ matrix.mode == 'bzlmod' && 'common --enable_bzlmod' || '' }}
- run: echo 'RUBY_VERSION = "${{ matrix.ruby }}"' > ruby_version.bzl
- if: matrix.ruby == 'system'
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.6'
- run: bazel test ...
- run: bazel run lib/gem:add-numbers 2
- run: bazel run lib/gem:print-version
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3
release:
name: Release
if: startsWith(github.ref, 'refs/tag/v')
needs:
- ruleset
- examples-gem
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v5
with:
prerelease: false
release_files: rules_ruby-*.tar.gz