Skip to content

FF-3205 perf: minimize copying and a bunch of other optimizations #234

FF-3205 perf: minimize copying and a bunch of other optimizations

FF-3205 perf: minimize copying and a bunch of other optimizations #234

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
cargo_build_and_test:
name: Cargo Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: npm ci
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose --all-targets
- run: cargo test --verbose
- run: cargo doc --verbose
ruby_test:
runs-on: ${{ matrix.os }}-latest
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