Revision 128:3a8658f7e0b7

View differences:

SCRIPTS/Dockerfile_ubuntu1604.in
1
FROM ubuntu:16.04
2
MAINTAINER Chris Cannam <cannam@all-day-breakfast.com>
3
RUN apt-get update && \
4
    apt-get install -y \
5
    build-essential \
6
    libsndfile-dev \
7
    git mercurial subversion \
8
    curl wget zip \
9
    mlton \
10
    python libpython2.7-dev python-numpy \
11
    time valgrind
12
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
13
RUN hg clone -r[[REVISION]] https://code.soundsoftware.ac.uk/hg/vamp-build-and-test
14
WORKDIR vamp-build-and-test
15
RUN ./SCRIPTS/update.sh [[REPO]] [[REPOREVISION]]
16
RUN ./SCRIPTS/update.sh vamp-plugin-sdk
17
RUN ./SCRIPTS/update.sh vamp-plugin-tester
18
RUN ( cd vamp-plugin-tester && ./repoint update )
19
RUN ./SCRIPTS/process.sh native -c [[REPO]]
20

  
21

  
SCRIPTS/dockerbuild.sh
1
#!/bin/bash
2
#
3
# Docker required!
4

  
5
if [ -z "$1" ] || [ -z "$2" ]; then
6
    echo "Usage: $0 <repo> <repo-revision-id>"
7
    exit 2
8
fi
9

  
10
platform=ubuntu1604
11
dockerfile=SCRIPTS/Dockerfile_$platform
12

  
13
mkdir -p "PACKAGES/$platform"
14

  
15
if [ ! -f "$dockerfile.in" ]; then
16
    echo "Docker file source $dockerfile.in not found (are we in the right directory?"
17
    exit 1
18
fi
19

  
20
set -eu
21

  
22
repo="$1"
23
repo_revision="$2"
24

  
25
current=$(hg id | awk '{ print $1; }')
26

  
27
case "$current" in
28
    *+) echo "WARNING: Current working copy has been modified - build will check out the last commit, which must perforce be different";;
29
    *);;
30
esac
31

  
32
current=${current%%+}
33

  
34
cat "$dockerfile.in" \
35
    | perl -p -e 's/\[\[REVISION\]\]/'"$current"'/' \
36
    | perl -p -e 's/\[\[REPO\]\]/'"$repo"'/' \
37
    | perl -p -e 's/\[\[REPOREVISION\]\]/'"$repo_revision"'/' \
38
           > "$dockerfile"
39

  
40
dockertag="cannam/vamp-build-and-test-$current"
41

  
42
sudo docker build -t "$dockertag" -f "$dockerfile" SCRIPTS
43

  
44
container=$(sudo docker create "$dockertag")
45
sudo docker cp "$container":vamp-build-and-test/PACKAGES/linux64/ "PACKAGES/$platform"/
46
sudo docker rm "$container"
47

  
48
echo "Done!"
49

  

Also available in: Unified diff