Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed Sep 15, 2023
1 parent 2982aef commit f2afcf4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ jobs:
# The two platforms don't agree on how to talk about env vars but they
# do agree on 'cat' and '$()' so we use that to marshal values between commands.
run: |
# TODO: this cannot be built
rm -rf ./savvy
# Actually do builds and make zips and whatnot
cargo dist build --tag=${{ github.ref_name }} --output-format=json ${{ matrix.dist-args }} > dist-manifest.json
echo "dist ran successfully"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["savvy", "savvy-macro", "savvy-bindgen"]
resolver = "2"

[workspace.package]
version = "0.1.4"
version = "0.1.5"
edition = "2021"
authors = ["Hiroaki Yutani"]
license = "MIT"
Expand Down
3 changes: 0 additions & 3 deletions savvy-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ authors.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.dist]
dist = false

[lib]
proc-macro = true

Expand Down
3 changes: 0 additions & 3 deletions savvy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ authors.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.dist]
dist = false

[dependencies]
libR-sys = { git = "https://github.com/extendr/libR-sys" }
once_cell = "1"
Expand Down
15 changes: 9 additions & 6 deletions savvy/build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
use std::path::Path;

fn main() {
let r_include_dir =
std::env::var("R_INCLUDE_DIR").expect("R_INCLUDE_DIR envvar must be provided.");
let r_include_dir = std::env::var("R_INCLUDE_DIR");

cc::Build::new()
.file("src/unwind_protect_wrapper.c")
.include(Path::new(&r_include_dir))
.compile("unwind_protect");
if let Ok(d) = r_include_dir {
cc::Build::new()
.file("src/unwind_protect_wrapper.c")
.include(Path::new(d.as_str()))
.compile("unwind_protect");
} else {
eprintln!("R_INCLUDE_DIR envvar must be provided.");
}

println!("cargo:rerun-if-changed=src/unwind_protect_wrapper.c");
}

0 comments on commit f2afcf4

Please sign in to comment.