Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Rtools40v2 to test bindings on Windows #56

Merged
merged 11 commits into from
May 26, 2021

Conversation

Ilia-Kosenkov
Copy link
Member

This fixes #53.
Rtools40v2 has been recently released.
It includes our hack to please rust compiler and resolves gcc linking issue.

libR-sys can now be safely tested using Rtools only (no dependence on msys2 is required for pre-computed bindings).

However, the setup-r action currently have a bug that does not allow installing other versions of Rtools40 even if the version string is explicitly specified (see my issue here r-lib/actions#289).
There is also a PR to make the new version default (r-lib/actions#287), which will not work until the issue is resolved.

I suggest to leave this PR as a draft for now. As soon as setup-r gets updated, we will remove the relevant code (marked with comments in the .yaml) and will finally have a working setup:
https://github.com/Ilia-Kosenkov/libR-sys/blob/a55515f4a999adfa4535aaed57112e3a233864ef/.github/workflows/test.yml#L215-L227

@Ilia-Kosenkov Ilia-Kosenkov marked this pull request as ready for review May 26, 2021 09:15
@Ilia-Kosenkov
Copy link
Member Author

So Rtools40v2 was pushed to chocolatey and other places, and Windows images here got updated as well.
The Windows-specific job runs tests using only Rtools dependency and with no magic tricks, which (I hope) means that at least {rextendr} can work without additional dependencies.

Note that in this scenario, we use the default Rust toolchain for Windows, stable-x86_64-pc-windows-msvc.
It depends on Visual Studio Build Tools, which is basically a set of native compilers, linkers and various resources.
The stable-msvc toolchain is then used to cross-compile to pc-windows-gnu, using Rtools' mingw toolset.
In short, on Windows we now use default native compilers, default native Rust toolchain, and standard Rtools distribution, and no extra configuration (apart from PATH I guess) is needed.

Copy link
Member

@clauswilke clauswilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Ilia-Kosenkov Ilia-Kosenkov merged commit 1b234be into extendr:master May 26, 2021
CGMossa pushed a commit to CGMossa/libR-sys that referenced this pull request Jan 21, 2024
* Enabling CI on dev branch

* Disable unmodified jobs

* Removed rtools hack

* Explicit rtools40v2

* Removing system rtools installation

* Handling no base rtools installation

* Testing with reset cashe

* Reversing back

* Removing debug infrastructure

* Comments

* Switching to new rtools version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] [CI] Use Rtools to test pre-computed bindings
2 participants