mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 10:47:16 +00:00

This commit adds CI for a few more targets: * i686-unknown-linux-gnu * arm-unknown-linux-gnueabihf * armv7-unknown-linux-gnueabihf * aarch64-unknown-linux-gnu The CI here is structured around using a Docker container to set up a test environment and then QEMU is used to actually execute code from these platforms. QEMU's emulation actually makes it so we can continue to just use `cargo test`, as processes can be spawned from QEMU like `objdump` and files can be read (for libbacktrace). Ends up being a relatively seamless experience! Note that a number of intrinsics were disabled on i686 because they were failing tests, and otherwise a few ARM touch-ups were made to get tests passing.
33 lines
691 B
Bash
Executable File
33 lines
691 B
Bash
Executable File
# Small script to run tests for a target (or all targets) inside all the
|
|
# respective docker images.
|
|
|
|
set -ex
|
|
|
|
run() {
|
|
echo $1
|
|
docker build -t stdsimd ci/docker/$1
|
|
mkdir -p target
|
|
docker run \
|
|
--user `id -u`:`id -g` \
|
|
--rm \
|
|
--init \
|
|
--volume $HOME/.cargo:/cargo \
|
|
--env CARGO_HOME=/cargo \
|
|
--volume `rustc --print sysroot`:/rust:ro \
|
|
--env TARGET=$1 \
|
|
--volume `pwd`:/checkout:ro \
|
|
--volume `pwd`/target:/checkout/target \
|
|
--workdir /checkout \
|
|
stdsimd \
|
|
bash \
|
|
-c 'PATH=$PATH:/rust/bin exec ci/run.sh $1'
|
|
}
|
|
|
|
if [ -z "$1" ]; then
|
|
for d in `ls ci/docker/`; do
|
|
run $d
|
|
done
|
|
else
|
|
run $1
|
|
fi
|