Skip to content

Commit 014ca6b

Browse files
committed
Merge branch 'dockerized-inst-building'
* dockerized-inst-building: GITHUB: add CI script make-dist: fix script for systems without . in $PATH dockerignore MISC: support building instruments inside docker Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
2 parents 9a84601 + bba965f commit 014ca6b

File tree

6 files changed

+62
-1
lines changed

6 files changed

+62
-1
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
spectmorph-instruments*.tar.xz
3+
output

.github/workflows/testing.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
2+
3+
# https://rhysd.github.io/actionlint/
4+
5+
name: Testing
6+
on: [push]
7+
jobs:
8+
linux:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/cache@v4
13+
with: { path: "ccache", key: "${{ github.job }}-${{hashFiles ('misc/*')}}" }
14+
- name: Test Instrument Build
15+
run: misc/make-dist-docker.sh
16+
- uses: actions/upload-artifact@v4
17+
with:
18+
name: spectmorph-instruments
19+
path: output/spectmorph-instruments-*.tar.xz

make-dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ done)
4242
for i in $INSTS
4343
do
4444
if [ -d "$i" ]; then
45-
echo build.sh $i
45+
echo ./build.sh $i
4646
else
4747
die "instrument data for $i missing"
4848
fi

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)