-
Notifications
You must be signed in to change notification settings - Fork 38.2k
doc: Improve CI docs on env and qemu-user-static #33887
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,8 +28,19 @@ the CI locally you may need to reduce that entropy by running: | |
| sudo sysctl -w vm.mmap_rnd_bits=28 | ||
| ``` | ||
|
|
||
| It is recommended to run the ci system in a clean env. To run the test stage | ||
| with a specific configuration, | ||
| To run a test that requires emulating a CPU architecture different from the | ||
| host, we may rely on the container environment recognizing foreign executables | ||
| and automatically running them using `qemu`. The following sets us up to do so | ||
| (also works for `podman`): | ||
|
|
||
| ``` | ||
| docker run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes | ||
| ``` | ||
|
|
||
| It is recommended to run the CI system in a clean environment. The `env -i` | ||
| command below ensures that *only* specified environment variables are propagated | ||
| into the local CI. | ||
| To run the test stage with a specific configuration: | ||
|
|
||
| ``` | ||
| env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference, this was half-fixed in commit fd813bf for env vars that have nothing to do with the CI (like However, your
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Pushed new version which is hopefully slightly more accurate.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reminds me that the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Added a commit for this to #33903, as that CI pull didn't have any review yet anyway. |
||
|
|
||
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.
maybe unrelated, because I think it was working at some point, but using
podmanon various distros (Debian/Ubuntu/OpenSuse) to try to run the s390x task fails with a segfault in the depends compilation:On Fedora, or RHEL-based VMs with podman and qemu-user-s390x it seems to work. A bit odd and unrelated to the code changes here, but I wanted to drop the note somewhere.
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.
Yes, I've seen similar segfaults when building for s390x on NixOS. Don't know if some distros apply custom patches or use other versions, or if they set up the environment differently in some other way.