cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.4k stars 359 forks source link

set QEMU_LD_PREFIX in the runners in order to be able to use env -i #1420

Closed glehmann closed 6 months ago

glehmann commented 6 months ago

I'm working on making assert_cmd working with cross.

There is one case a bit more difficult: when using clear_env() on a process, or env -i, the binary is not able to run anymore because the QEMU_LD_PREFIX envvar is not set anymore.

A (relatively) easy fix might be to ensure in linux-runner — and in any other runner — that the necessary environment is configured before running the executable. Something as proposed in this PR for aarch64-unknown-linux-gnu.

Would that be an acceptable solution?

https://github.com/assert-rs/assert_cmd/pull/193

glehmann commented 6 months ago

ok, I misunderstood what RUN was for — this is happening too often for a single PR!

glehmann commented 6 months ago

should be ok for windows too. I've used env -u to remove the runner config from the env. Just let me know if you prefer a plain script :-)

glehmann commented 6 months ago

and I need to look into what is going on with wasm.

The project is more complex than I thought (maybe I've been fooled by how easy it is to use), and this shows in the test suite. I'm curious to see what approach you chose to refactor the test suite in rust. Is it available in a branch?

Emilgardis commented 6 months ago

/ci try

github-actions[bot] commented 6 months ago

Starting try run. Link to action

Emilgardis commented 6 months ago

The project is more complex than I thought

Yes :D

I'm curious to see what approach you chose to refactor the test suite in rust. Is it available in a branch?

Its nothing concrete right now, basically replace bash with rust, then rewrite it to be prettier, we do have https://github.com/cross-rs/cross/issues/1037 for the bigger issue of actual UI tests

github-actions[bot] commented 6 months ago

Try run for comment

Failed Jobs

Successful Jobs

List - [aarch64-linux-android](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300001?pr=1420#step:10:1) - ✔️ - [aarch64-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300206?pr=1420#step:10:1) - ✔️ - [aarch64-unknown-linux-gnu:centos](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300367?pr=1420#step:10:1) - ✔️ - [aarch64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300571?pr=1420#step:10:1) - ✔️ - [aarch64-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300760?pr=1420#step:10:1) - ✔️ - [arm-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993300945?pr=1420#step:10:1) - ✔️ - [arm-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993301178?pr=1420#step:10:1) - ✔️ - [arm-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993301367?pr=1420#step:10:1) - ✔️ - [arm-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993301555?pr=1420#step:10:1) - ✔️ - [arm-unknown-linux-musleabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993301712?pr=1420#step:10:1) - ✔️ - [armv5te-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993301872?pr=1420#step:10:1) - ✔️ - [armv7-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993302069?pr=1420#step:10:1) - ✔️ - [armv7-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993302271?pr=1420#step:10:1) - ✔️ - [armv5te-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993302480?pr=1420#step:10:1) - ✔️ - [armv7-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993302658?pr=1420#step:10:1) - ✔️ - [armv7-unknown-linux-musleabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993302852?pr=1420#step:10:1) - ✔️ - [armv7-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993303045?pr=1420#step:10:1) - ✔️ - [cross](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993303256?pr=1420#step:10:1) - ✔️ - [i586-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993303474?pr=1420#step:10:1) - ✔️ - [i586-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993303650?pr=1420#step:10:1) - ✔️ - [i686-linux-android](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993303804?pr=1420#step:10:1) - ✔️ - [i686-pc-windows-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993304002?pr=1420#step:10:1) - ✔️ - [i686-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993304212?pr=1420#step:10:1) - ✔️ - [i686-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993304372?pr=1420#step:10:1) - ✔️ - [i686-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993304543?pr=1420#step:10:1) - ✔️ - [mips64el-unknown-linux-gnuabi64](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993304735?pr=1420#step:10:1) - ✔️ - [mips64-unknown-linux-gnuabi64](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993305133?pr=1420#step:10:1) - ✔️ - [mipsel-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993305496?pr=1420#step:10:1) - ✔️ - [mips-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993305885?pr=1420#step:10:1) - ✔️ - [powerpc64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993306158?pr=1420#step:10:1) - ✔️ - [powerpc64le-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993306616?pr=1420#step:10:1) - ✔️ - [powerpc-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993306815?pr=1420#step:10:1) - ✔️ - [sparc64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993307215?pr=1420#step:10:1) - ✔️ - [s390x-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993307383?pr=1420#step:10:1) - ✔️ - [thumbv6m-none-eabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993307796?pr=1420#step:10:1) - ✔️ - [thumbv7em-none-eabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993307968?pr=1420#step:10:1) - ✔️ - [thumbv7em-none-eabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993308136?pr=1420#step:10:1) - ✔️ - [thumbv7m-none-eabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993308324?pr=1420#step:10:1) - ✔️ - [thumbv7neon-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993308520?pr=1420#step:10:1) - ✔️ - [thumbv7neon-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993308714?pr=1420#step:10:1) - ✔️ - [thumbv8m.base-none-eabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993308954?pr=1420#step:10:1) - ✔️ - [thumbv8m.main-none-eabi](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993309116?pr=1420#step:10:1) - ✔️ - [thumbv8m.main-none-eabihf](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993309366?pr=1420#step:10:1) - ✔️ - [x86_64-apple-darwin](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993309617?pr=1420#step:10:1) - ✔️ - [x86_64-linux-android](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993310070?pr=1420#step:10:1) - ✔️ - [x86_64-pc-windows-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993310299?pr=1420#step:10:1) - ✔️ - [x86_64-pc-windows-msvc](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993310478?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-dragonfly](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993310903?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993311055?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-linux-gnu:centos](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993311247?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-illumos](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993311445?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993311649?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993311947?pr=1420#step:10:1) - ✔️ - [x86_64-unknown-netbsd](https://github.com/cross-rs/cross/actions/runs/7703230077/job/20993312149?pr=1420#step:10:1) - ✔️
Emilgardis commented 6 months ago

failures look fine, except the wasm one, should probably just exempt it from running this test.

glehmann commented 6 months ago

thanks for the kind guidance during the PR!

I'll look at https://github.com/cross-rs/cross-toolchains soon