Skip to content

Commit

Permalink
Auto merge of #3427 - Arnavion:unique-docker-image-name, r=JohnTitor
Browse files Browse the repository at this point in the history
Use a unique name for the Docker image used by CI.

This allows testing multiple targets in parallel on the same host machine.
  • Loading branch information
bors committed Nov 9, 2023
2 parents f2c1788 + 90bd662 commit d0ce87b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ run() {
echo "Building docker container for target ${1}"

# use -f so we can use ci/ as build context
docker build -t libc -f "ci/docker/${1}/Dockerfile" ci/
docker build -t "libc-${1}" -f "ci/docker/${1}/Dockerfile" ci/
mkdir -p target
if [ -w /dev/kvm ]; then
kvm="--volume /dev/kvm:/dev/kvm"
Expand All @@ -50,15 +50,15 @@ run() {
$kvm \
--init \
--workdir /checkout \
libc \
"libc-${1}" \
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/run.sh ${1}"
}

build_switch() {
echo "Building docker container for target switch"

# use -f so we can use ci/ as build context
docker build -t libc -f "ci/docker/switch/Dockerfile" ci/
docker build -t libc-switch -f "ci/docker/switch/Dockerfile" ci/
mkdir -p target
if [ -w /dev/kvm ]; then
kvm="--volume /dev/kvm:/dev/kvm"
Expand All @@ -82,7 +82,7 @@ build_switch() {
$kvm \
--init \
--workdir /checkout \
libc \
libc-switch \
sh -c "HOME=/tmp RUSTUP_HOME=/tmp PATH=\$PATH:/rust/bin rustup default nightly \
&& rustup component add rust-src --target ci/switch.json \
&& cargo build -Z build-std=core,alloc --target ci/switch.json"
Expand Down

0 comments on commit d0ce87b

Please sign in to comment.