-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_CommanderConda_Linux.sh
executable file
·42 lines (35 loc) · 1.5 KB
/
build_CommanderConda_Linux.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# set -o verbose
set -o errexit
set -o pipefail
set -o nounset
case "${ARCH}" in
x86_64)
DOCKER_ARCH=amd64
DOCKERIMAGE=condaforge/linux-anvil-comp7 # @sha256:88138de6129f9bef6c41d7add4c09327280582da0e53905a2f9ea1ba151e751c
;;
ppc64le)
DOCKER_ARCH=ppc64le
DOCKERIMAGE=condaforge/linux-anvil-ppc64le
;;
aarch64)
DOCKER_ARCH=arm64v8
DOCKERIMAGE=condaforge/linux-anvil-aarch64
;;
esac
export DOCKER_ARCH
export DOCKERIMAGE
echo "============= Create build directory ============="
mkdir -p build/ || true
chmod 777 build/
echo "============= Enable QEMU ============="
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
echo "============= Build the installer ============="
# See github actions issue #241 comment here: https://github.com/actions/runner/issues/241#issuecomment-577360161
script -e -c "docker run --rm -ti -v $(pwd):/construct -e GITHUB_REF -e ARCH -e COMMANDERCONDA_VERSION $DOCKERIMAGE /construct/scripts/build.sh"
echo "============= Test the installer ============="
for TEST_IMAGE_NAME in "ubuntu:20.04" "ubuntu:16.04" "ubuntu:18.04" "centos:7" "debian:buster" "opensuse:42.3"
do
echo "============= Test installer on $TEST_IMAGE_NAME ============="
script -e -c "docker run --rm -ti -v $(pwd):/construct -v $(pwd)/build/qemu/qemu-${ARCH}-static:/usr/bin/qemu-${ARCH}-static -e GITHUB_REF -e ARCH ${DOCKER_ARCH}/$TEST_IMAGE_NAME /construct/scripts/test.sh"
done