-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
CI: use MSYS2 cargo package for example project #194
Conversation
Codecov Report
@@ Coverage Diff @@
## master #194 +/- ##
=======================================
Coverage 84.70% 84.70%
=======================================
Files 12 12
Lines 1811 1811
=======================================
Hits 1534 1534
Misses 277 277 Continue to review full report at Codecov.
|
I've just re-based this PR and the error still occurs:
|
f9c026c
to
702c3a3
Compare
I finally managed to make this work! I had to manually specify |
# NB: --prefix doesn't seem to matter on Windows | ||
cp -r temp/usr/local/{lib,bin,include} /mingw64/ | ||
shell: msys2 {0} | ||
cargo cinstall --verbose --release --prefix /mingw64 --target x86_64-pc-windows-gnu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess cargo has the msvc toolchain as default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, looks like it.
I was hoping to get the right target automatically, since I'm using cargo
from MSYS2, which should know that it uses the GNU toolchain.
Strangely, when I'm using the MSYS2 package for cargo-c
(instead of compiling it on-the-fly), the --target
flag is not necessary (see https://github.com/mgeier/cargo-c/runs/4754623622)!
So why does the MSYS2 package of cargo-c
do the right thing?
But, as I said, I don't think this should be a blocker for now, we can try to figure this out later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a separate issue as a reminder: #244.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness, I've also created one about the --prefix
: #245
Thank you! |
I recently found out that there is a Rust package for MSYS2 (https://packages.msys2.org/base/mingw-w64-rust), and there is even a package for
cargo-c
(https://packages.msys2.org/base/mingw-w64-cargo-c)!I tried to use the Rust package on CI, but still compile the latest version of
cargo-c
on the fly.Sadly, there are a few problems ...
Currently, there is a build error during
cargo cinstall
, any ideas how to fix this?After that, there might still be a problem with the library not being installed into the default location normally used for MSYS2, but for now that's blocked by the compilation error.
There seems to be another error in the Windows build (the one without MSYS2), which should also be solved, but it isn't really related to this PR.