Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
matsadler committed Dec 3, 2023
1 parent d7eab0e commit fc1b3a9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 62 deletions.
122 changes: 61 additions & 61 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
name: Test

on:
- push
- pull_request
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
ruby-version:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- head
rustup-toolchain:
- "1.61"
- stable
include:
- os: windows-latest
ruby-version: mswin
rustup-toolchain: stable
exclude:
- os: windows-latest
ruby-version: head
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
# - ubuntu-latest
# - macos-latest
- windows-latest
ruby-version:
# - "2.7"
# - "3.0"
# - "3.1"
# - "3.2"
- head
rustup-toolchain:
# - "1.61"
- stable
include:
- os: windows-latest
ruby-version: mswin
rustup-toolchain: stable
exclude:
- os: windows-latest
ruby-version: head

steps:
- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v3

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
rustup-toolchain: ${{ matrix.rustup-toolchain }}
ruby-version: ${{ matrix.ruby-version }}
cache-version: v2
bundler-cache: true
cargo-cache: true
cargo-cache-extra-path: |
examples/rust_blank/tmp/
examples/complete_object/tmp/
examples/custom_exception_ruby/tmp/
examples/custom_exception_rust/tmp/
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
rustup-toolchain: ${{ matrix.rustup-toolchain }}
ruby-version: ${{ matrix.ruby-version }}
cache-version: v2
bundler-cache: true
cargo-cache: true
cargo-cache-extra-path: |
examples/rust_blank/tmp/
examples/complete_object/tmp/
examples/custom_exception_ruby/tmp/
examples/custom_exception_rust/tmp/
- uses: KyleMayes/install-llvm-action@v1
if: contains(matrix.os, 'windows') && matrix.ruby-version != 'mswin'
with:
version: "15.0"
- uses: KyleMayes/install-llvm-action@v1
if: contains(matrix.os, 'windows') && matrix.ruby-version != 'mswin'
with:
version: "15.0"

- name: Example gem tests (blank?)
working-directory: examples/rust_blank
run: bundle exec rake test
# - name: Example gem tests (blank?)
# working-directory: examples/rust_blank
# run: bundle exec rake test

- name: Example gem tests (complete object)
working-directory: examples/complete_object
run: bundle exec rake test
# - name: Example gem tests (complete object)
# working-directory: examples/complete_object
# run: bundle exec rake test

- name: Example gem tests (custom exception defined in Ruby)
if: matrix.ruby-version != 'head'
working-directory: examples/custom_exception_ruby
run: bundle exec rake test
# - name: Example gem tests (custom exception defined in Ruby)
# if: matrix.ruby-version != 'head'
# working-directory: examples/custom_exception_ruby
# run: bundle exec rake test

- name: Example gem tests (custom exception defined in Rust)
if: matrix.ruby-version != 'head'
working-directory: examples/custom_exception_rust
run: bundle exec rake test
# - name: Example gem tests (custom exception defined in Rust)
# if: matrix.ruby-version != 'head'
# working-directory: examples/custom_exception_rust
# run: bundle exec rake test

- name: Run tests
run: cargo test --workspace
- name: Run tests
run: cargo test --doc Ruby::require -- --show-output
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,13 @@ impl Ruby {
/// use magnus::{Error, Ruby};
///
/// fn example(ruby: &Ruby) -> Result<(), Error> {
/// assert!(ruby.require("net/http")?);
/// match ruby.require("net/http") {
/// Ok(v) => assert!(v),
/// Err(e) => {
/// println!("{e:?}");
/// panic!("fail");
/// }
/// }
///
/// Ok(())
/// }
Expand Down

0 comments on commit fc1b3a9

Please sign in to comment.