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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#!/bin/sh
set -e
CPU_CORES="$1"
export CPU_CORES
eval "$(opam config env)"
echo "::group::Preparing bindings"
cd /tmp/liquidsoap-full
git remote set-url origin https://github.com/savonet/liquidsoap-full.git
git fetch --recurse-submodules=no && git checkout origin/master -- Makefile.git
git reset --hard
git pull
git pull
make clean
make public
make update
echo "::endgroup::"
echo "::group::Checking out CI commit"
cd /tmp/liquidsoap-full/liquidsoap
git fetch origin "$GITHUB_SHA"
git checkout "$GITHUB_SHA"
mv .github /tmp
rm -rf ./*
mv /tmp/.github .
git reset --hard
echo "::endgroup::"
echo "::group::Setting up specific dependencies"
opam update
opam pin -y add re 1.13.2
opam upgrade -y posix-socket
cd /tmp/liquidsoap-full/liquidsoap
./.github/scripts/checkout-deps.sh
# TMP
cd /tmp/liquidsoap-full/ocaml-ffmpeg && git checkout v1.2.8
cd /tmp/liquidsoap-full
export PKG_CONFIG_PATH=/usr/share/pkgconfig/pkgconfig
echo "::endgroup::"
echo "::group::Cleaning up cache"
rm -rf /var/cache/liquidsoap/* "$HOME"/.cache/liquidsoap/*
echo "::endgroup::"
echo "::group::Compiling"
cd /tmp/liquidsoap-full
test -f PACKAGES || cp PACKAGES.default PACKAGES
# Workaround
touch liquidsoap/configure
./configure --prefix=/usr \
--includedir="\${prefix}/include" \
--mandir="\${prefix}/share/man" \
--infodir="\${prefix}/share/info" \
--sysconfdir=/etc \
--localstatedir=/var \
--with-camomile-data-dir=/usr/share/liquidsoap/camomile \
CFLAGS=-g
# Workaround
rm liquidsoap/configure
OCAMLPATH="$(cat .ocamlpath)"
export OCAMLPATH
cd /tmp/liquidsoap-full/liquidsoap
dune build --profile=release
echo "::endgroup::"
echo "::group::Print build config"
dune exec -- liquidsoap --build-config
echo "::endgroup::"
|