Currently, there's a build failure when link_swift_package() is called with package_root not ending in /. This happens because cargo:rustc-link-search is determined using string concatenation. This PR modifies it to use std::pathjoin methods instead.
When trying to test this change, I realised that there were the following other miscellaneous issues, which I've fixed as well:
Removed Cargo.lock. This file is supposed to be committed to repo only by end binaries. Given that this crate is a library, it shouldn't be having this.
Add tests to the repo. Without this it would be difficult to continue to expand the work of this crate. cargo test now works.
Add Github Actions workflows to run cargo build and cargo test on every push to master branch, and for PRs.
Include crates.io, license and build status badges in README header. The build status would start working only after you've merged this PR.
Miscellaneous changes to code to satisfy rustfmt and clippy.
Wowow thankyou! I haven't touched this crate in a while but it's been in need of some maintenance. CI work is great, and the package_root problem was just me being silly.
Currently, there's a build failure when
link_swift_package()
is called withpackage_root
not ending in/
. This happens becausecargo:rustc-link-search
is determined using string concatenation. This PR modifies it to usestd::path
join
methods instead.When trying to test this change, I realised that there were the following other miscellaneous issues, which I've fixed as well:
Cargo.lock
. This file is supposed to be committed to repo only by end binaries. Given that this crate is a library, it shouldn't be having this.cargo test
now works.cargo build
andcargo test
on every push tomaster
branch, and for PRs.crates.io
,license
andbuild status
badges in README header. The build status would start working only after you've merged this PR.rustfmt
andclippy
.Thank you for this useful crate.