Skip to content

fix(ruby): Enable ruby-sdk to be cross compiled ahead of time #21

fix(ruby): Enable ruby-sdk to be cross compiled ahead of time

fix(ruby): Enable ruby-sdk to be cross compiled ahead of time #21

Workflow file for this run

---
name: Ruby SDK
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ruby_test:
runs-on: ${{ matrix.os }}-latest
outputs:
gem-path: ${{ steps.set-outputs.outputs.gem-path }}
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: [3.0, 3.1, 3.2]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby & Rust
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cargo-cache: true
rubygems: '3.5.11'
- run: npm ci
- name: Override eppo_core for testing
run: |
mkdir -p ~/.cargo/
echo "[patch.crates-io.eppo_core]" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml"
echo "path = '$PWD/eppo_core'" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml"
- name: Install dependencies
run: bundle install
working-directory: ruby-sdk
- name: Build
run: bundle exec rake build
working-directory: ruby-sdk
- name: Run tests
run: npm run with-server test:ruby