-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
.github: CICD: add workspace test to build matrix #7386
Conversation
GNU testsuite comparison:
|
Lots of failures, at build time for now... some ubuntu are missing selinux headers (should be easy to fix):
Build (ubuntu-latest, i686-unknown-linux-musl, feat_os_unix_musl, use-cross):
macos, unclear what's the problem exactly:
Windows:
|
GNU testsuite comparison:
|
273075a
to
66d7595
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
Thanks for the rebase @sylvestre ,-) I think this looks good? The Will look into this one, and clean this up:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
Should be good, ready for review! |
@@ -624,6 +627,14 @@ jobs: | |||
esac | |||
outputs CARGO_CMD | |||
outputs CARGO_CMD_OPTIONS | |||
outputs ARTIFACTS_SUFFIX | |||
CARGO_TEST_OPTIONS='' | |||
case '${{ matrix.job.workspace-tests }}' in |
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.
it would be nice to document here why we have "workspace-tests"?
(afaik, because it doesn't work well because of cross compil, right)
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.
Sure! Added a couple of comments.
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.
thanks
out of scope but do you think we should move away from the cross image?
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.
Not sure... I'm a bit surprised cross-rs
still use 16.04
by default... and... that a new release hasn't happened in 2 years milestone tracking? Development seems active though.
The convenience of cross
, and the fact that it's really easy to reproduce CI builds locally, is really nice though...
It is possible to force cross
to use a new image though (:main
uses 20.04, which is... better already I guess?). It looks like the workspace tests can pass with something like this in Cross.toml
:
[build]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libselinux1-dev:$CROSS_DEB_ARCH"
]
[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
(the last 2 lines would need to be copy-pasted a few times, I don't see a way to use the :main
tag for all targets?! -- and :main
syntax is only supported after 0.2.5)
One downside is that the main
image is frequently updated, so I guess we'd be at the mercy of upstream breakage, so I think a fixed tag would be slightly safer (we could manually fix a sha if we wanted to, but we'd need to set it for each architecture though, not great in terms of maintenance...)
I think the current solution is still the simplest, and good as a stop-gap at least. But if you want to add --workspace
tests for *-musl
and i686
, we should probably rethink (and check with cross
developer on what is blocking a new release).
Add a new Linux build that runs without `cross`, and adds `--workspace` to the cargo test command. From cargo test documentation, this option "tests all members in the workspace.". For example, this includes running tests within the `uucore` package (see uutils#7383). Fixes uutils#7392.
GNU testsuite comparison:
|
Add a new Linux build that runs without
cross
, and adds--workspace
to the cargo test command.From cargo test documentation, this option "tests all members in
the workspace.". For example, this includes running tests within
the
uucore
package (see #7383).Fixes #7392.