-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ruby): Enable ruby-sdk to be cross compiled ahead of time (#42)
* fix(ruby): Enable rust-sdk to be cross compiled ahead of time * add github action to cross compile gems * remove comment * fix indentation * change working directory for ruby * fix cross-gem agai * yet another fix * another try * yep * manually run cross compile * fix indentation * more fixes * skip tags * adapt build from https://github.com/BoundaryML/baml/blob/canary/.github/workflows/build-ruby-release.reusable.yaml * fix path * Fix https://github.com/openssl/openssl/pull/25367\#issuecomment-2338141250 * chore: add "vendored" feature flag to eppo_core * chore(ruby): build gem for 3.0 version * code review comments * add fake publish step for testing * comment out needs * update cargo lockfile * fix file path * fix version * another try * another try * 20th time is the charm * fix paths * add ls for debugging * final try * move cross_gems and publish to publish.yml --------- Co-authored-by: Oleksii Shmalko <[email protected]>
- Loading branch information
Showing
9 changed files
with
256 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.