Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sanity-check CI #16

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
19 changes: 19 additions & 0 deletions .github/problem-matcher-liquidsoap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"problemMatcher": [
{
"owner": "liquidsoap",
"pattern": [
{
"regexp": "^([^\\s].*): Line (\\d+), char (\\d+)(?:-(\\d+))?:$",
"file": 1,
"line": 2,
"column": 3
},
{
"regexp": "^([^\\s].*): (.*)$",
"message": 2
}
]
}
]
}
43 changes: 43 additions & 0 deletions .github/workflows/check-liquidsoap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check Liquidsoap scripts for correctness

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
check-liquidsoap:
runs-on: ubuntu-latest
strategy:
matrix:
liquidsoap-version: ["1.4.3"]
steps:
- uses: actions/checkout@v4
- name: Set up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "4.14.0"
- name: Install Liquidsoap
run: |
opam pin -y --no-action liquidsoap ${{ matrix.liquidsoap-version }}
sudo apt update -y
sudo apt -f install libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libfdk-aac-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libjack-dev liblo-dev libmp3lame-dev libogg-dev libopus-dev libsamplerate0-dev libswresample-dev libswscale-dev libtag1-dev libunwind-dev libvorbis-dev
opam install -y ffmpeg opus bjack cry fdkaac gstreamer lame samplerate taglib ssl vorbis lo liquidsoap
- name: Set up config files
run: |
pushd conf
for f in *.dist; do
cp $f ${f%.dist}
done
popd
- name: Check scripts
run: |
echo "::add-matcher::.github/problem-matcher-liquidsoap.json"
set +e -o pipefail
exit=0
for f in *.liq; do
opam exec -- liquidsoap --check $f | sed -e "s/^/$f: /;"
exit=$((exit + $?))
done
exit $exit
Loading