Skip to content

Commit 73f2c27

Browse files
committed
MISC: support building instruments inside docker
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
1 parent 9a84601 commit 73f2c27

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

misc/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM gcc:latest
2+
3+
RUN apt-get update && apt-get install -y \
4+
libsndfile1-dev libfftw3-dev autoconf-archive ccache \
5+
gettext python3-scipy mesa-common-dev libgl-dev parallel zip
6+
7+
ADD . /spectmorph-instruments
8+
WORKDIR /spectmorph-instruments

misc/build-docker.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -Eeuo pipefail
3+
4+
export CCACHE_DIR=/output/ccache
5+
export CC="ccache gcc" CXX="ccache g++"
6+
7+
cd spectmorph
8+
./autogen.sh --without-ao
9+
make -j$(nproc)
10+
make install
11+
cd ..
12+
./make-dist
13+
INST_VERSION=$(grep version index.smindex | sed 's/.*"\([0-9a-z.-]*\)"$/\1/g')
14+
cp spectmorph-instruments-$INST_VERSION.tar.xz /output

misc/make-dist-docker.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -Eeuo pipefail
3+
4+
git clone https://github.com/swesterfeld/spectmorph.git || echo clone fail
5+
cd spectmorph
6+
git checkout ae2117f726d4da3a90f1fdb6187e929627b2c27e
7+
GIT_VERSION=$(git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S')
8+
cd ..
9+
10+
docker build -f misc/Dockerfile -t spectmorph-instruments .
11+
docker run -v $PWD/output:/output -t spectmorph-instruments misc/build-docker.sh
12+
13+
echo "*** used SpectMorph version $GIT_VERSION"
14+
echo
15+
echo "next steps:"
16+
echo " - git tag -a $(git log -1 --format=%cd --date=format:'%Y-%m-%d')"
17+
echo " - make a release on github"

0 commit comments

Comments
 (0)