blob: d663d9bbe886fee4b90e644865544faab6609a31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env bash
#
# This script runs as the top level of our reproducible build process.
# It launches the actual build script inside a docker container.
set -euo pipefail
## use a fixed image to not suffer from image retaging when newer rustc or
## alpine emerges. Increase shm size for the reasons described in
## reproducible_build
##
## If you change this image, make sure also to change the one listed in
## the build-repro job in .gitlab-ci.yml
CONTAINER=rust:1.86.0-alpine3.21
if [ "$1" = "android" ]; then
if ! docker image inspect arti/docker-android > /dev/null ; then
echo "Error: docker container arti/docker-android doesn't seem to be available"
echo "please generate the container with:"
echo " cd maint/docker-android"
echo " docker build . -t arti/docker-android"
exit 1
fi;
CONTAINER=arti/docker-android
fi
echo $CONTAINER
exec docker run --rm -i -v "$(git rev-parse --show-toplevel)":/builds/arti \
-w /builds/arti $CONTAINER \
sh -c "apk add bash && ./maint/reproducible_build $*"
|