Skip to content

Commit

Permalink
Various CI build fixes (#409)
Browse files Browse the repository at this point in the history
* Pin oxi-test ref

* Fix docker build tests

* Only integration test on ruby 3.0+

* Remove secret check

* Only run docker workflow on main

* Try to fix windows tests

* Bump magnus ref

* Allow dead code to avoid warnings from bindings

* Lints
  • Loading branch information
ianks committed Aug 2, 2024
1 parent 3217dd1 commit 17f488c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Build and push docker images
on:
workflow_dispatch:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -101,7 +103,7 @@ jobs:
rb_sys_dock_cache_dir="$HOME/.cache/rb-sys-dock"
sudo chmod 777 tmp/oxi-test
cd tmp/oxi-test
sed -i "s|gem 'rb_sys', '.*'|gem 'rb_sys', path: '$rb_sys_gem_path/gem'|" Gemfile
ruby -e "File.write('Gemfile', File.read('Gemfile').gsub(/gem .rb_sys.*$/, 'gem \"rb_sys\", git: \"https://github.com/oxidize-rb/rb-sys\", ref: \"$GITHUB_SHA\"'))"
mkdir .cargo
echo "[patch.crates-io]" >> .cargo/config.toml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
repo:
- name: "oxidize-rb/oxi-test"
slug: oxi-test
ref: main
run: rake
ref: ead2c358a6cde270863e686c7302fb56a333febc
run: bundle exec rake compile && bundle exec ruby -rminitest/autorun -Itest test/oxi/test_test.rb && cargo test
- name: "matsadler/magnus"
slug: magnus-0.5
ref: "0.5.5"
run: cargo test
- name: "matsadler/magnus"
slug: magnus-head
ref: "627755429885eb1a84929e4d876f8cd8ec7303cf"
ref: "52a0817d4327cf78f91958f6b84f66946251fc9c"
run: cargo test
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
rust: ["stable"]
ruby: ["2.7", "3.2", "3.3"]
ruby: ["3.0", "3.2", "3.3"]

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion crates/rb-sys-build/src/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Build {
.with_extension("o");

let mut cmd = compiler;
cmd.args(&get_include_args(rb))
cmd.args(get_include_args(rb))
.arg("-c")
.arg(f)
.args(&rb.cflags)
Expand Down
5 changes: 5 additions & 0 deletions crates/rb-sys-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ rusty-fork = "0.3.0"

[build-dependencies]
rb-sys-env = { path = "../rb-sys-env" }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(ruby_has_ruby_abi_version,)",
] }
1 change: 1 addition & 0 deletions crates/rb-sys/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#![allow(rustdoc::invalid_rust_codeblocks)]
#![allow(rustdoc::invalid_html_tags)]
#![allow(deprecated)]
#![allow(dead_code)]

include!(env!("RB_SYS_BINDINGS_PATH"));

Expand Down

0 comments on commit 17f488c

Please sign in to comment.