feat: support bzlmod #162
Workflow file for this run
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: | |
- push | |
- pull_request | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
JAVA_OPTS: -Djdk.io.File.enableADS=true | |
jobs: | |
examples-gem: | |
name: Examples / Gem | |
runs-on: ${{ matrix.os }} | |
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 | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
bzlmodEnabled: [true, false] | |
exclude: | |
- os: windows-latest | |
ruby: 3.3.0-preview3 | |
- os: windows-latest | |
ruby: truffleruby-23.1.1 | |
defaults: | |
run: | |
working-directory: examples/gem | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: p0deje/[email protected] | |
- name: Set bzlmod flag | |
# Store the --enable_bzlmod flag that we add to the test command below | |
# only when we're running bzlmod in our test matrix. | |
id: set_bzlmod_flag | |
if: matrix.bzlmodEnabled | |
run: echo "bzlmod_flag=--enable_bzlmod" >> $GITHUB_OUTPUT | |
- id: set_ruby_version | |
run: echo 'RUBY_VERSION = "${{ matrix.ruby }}"' > ruby_version.bzl | |
- run: bazel test ${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} //... | |
- run: bazel run ${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} lib/gem:add-numbers 2 | |
- run: bazel run ${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} lib/gem:print-version | |
- if: failure() && runner.debug == '1' | |
uses: mxschmitt/action-tmate@v3 | |
ruleset: | |
name: Ruleset | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bazel run :buildifier.check | |
- run: bazel test ... |