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

Cleanup build. #4341

Merged
merged 5 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/build-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fi

BUILD_OS='["debian_trixie", "debian_bookworm", "ubuntu_oracular", "ubuntu_noble", "alpine"]'
BUILD_PLATFORM='["amd64", "arm64"]'
BUILD_INCLUDE='[{"platform": "amd64", "runs-on": "depot-ubuntu-22.04-4", "alpine-arch": "x86_64", "docker-debian-os": "bookworm"}, {"platform": "arm64", "runs-on": "depot-ubuntu-22.04-arm-4", "alpine-arch": "aarch64", "docker-debian-os": "bookworm"}]'
BUILD_INCLUDE='[{"platform": "amd64", "runs-on": "depot-ubuntu-24.04-4", "alpine-arch": "x86_64", "docker-debian-os": "bookworm"}, {"platform": "arm64", "runs-on": "depot-ubuntu-24.04-arm-4", "alpine-arch": "aarch64", "docker-debian-os": "bookworm"}]'

SHA=$(git rev-parse --short HEAD)

Expand Down
29 changes: 2 additions & 27 deletions .github/scripts/build-posix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,12 @@ echo "::endgroup::"

echo "::group::Setting up specific dependencies"

git clone https://github.com/savonet/ocaml-xiph.git
cd ocaml-xiph
opam install -y .
cd ..

cd /tmp
rm -rf ocaml-posix
git clone https://github.com/savonet/ocaml-posix.git
cd ocaml-posix
opam pin -ny .
opam install -y posix-socket.2.2.0 posix-base.2.2.0 posix-time2.2.2.0 posix-types.2.2.0

cd /tmp/liquidsoap-full/liquidsoap

./.github/scripts/checkout-deps.sh

git clone https://github.com/savonet/ocaml-mem_usage.git
cd ocaml-mem_usage
opam install -y .
cd ..

opam update
opam remove -y jemalloc
opam install -y tls.1.0.2 ca-certs mirage-crypto-rng cstruct saturn_lockfree.0.5.0 ppx_hash memtrace xml-light odoc

cd /tmp/liquidsoap-full

# TODO: Remove gstreamer from liquidsoap-full
sed -e 's@ocaml-gstreamer@#ocaml-gstreamer@' -i PACKAGES

# TODO: Remove taglib from liquidsoap-full
sed -e 's@ocaml-taglib@#ocaml-taglib@' -i PACKAGES

export PKG_CONFIG_PATH=/usr/share/pkgconfig/pkgconfig

echo "::endgroup::"
Expand All @@ -80,6 +53,8 @@ echo "::group::Compiling"

cd /tmp/liquidsoap-full

test -f PACKAGES || cp PACKAGES.default PACKAGES

# Workaround
touch liquidsoap/configure

Expand Down
62 changes: 7 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: depot-ubuntu-24.04-4
needs: build_details
container:
image: savonet/liquidsoap-ci:debian_bookworm@sha256:a9e3ce58f99dd80e06e50239cd51530c451d37e4a8fc6947ebcf7375ef1e41e4
image: savonet/liquidsoap-ci:debian_bookworm
options: --user opam
env:
HOME: /home/opam
Expand All @@ -67,11 +67,6 @@ jobs:
git remote set-url origin https://github.com/savonet/liquidsoap.git
git fetch origin ${{ github.sha }}
git checkout ${{ github.sha }}
- name: Install pandoc
run: |
cd /tmp
git clone https://github.com/smimram/ocaml-pandoc.git
opam pin -y add ocaml-pandoc
- name: Build
run: |
echo "::group::Preparing build"
Expand All @@ -86,10 +81,9 @@ jobs:
cp PACKAGES.minimal PACKAGES
opam update
opam pin -yn .
opam install -y saturn_lockfree.0.5.0 ppx_hash
opam info -f "depopts:" liquidsoap | grep -v osx-secure-transport | xargs opam remove -y inotify ffmpeg-avutil cohttp-lwt-unix prometheus-app ${{ needs.build_details.outputs.minimal_exclude_deps }}
opam install -y mem_usage
echo "::endgroup::"
opam install -y mem_usage
cd liquidsoap
./.github/scripts/build-posix.sh "${{ steps.cpu_cores.outputs.count }}"
env:
Expand All @@ -102,7 +96,7 @@ jobs:
build_js:
runs-on: depot-ubuntu-24.04-4
container:
image: savonet/liquidsoap-ci:debian_bookworm@sha256:a9e3ce58f99dd80e06e50239cd51530c451d37e4a8fc6947ebcf7375ef1e41e4
image: savonet/liquidsoap-ci:debian_bookworm
options: --user opam
env:
HOME: /home/opam
Expand All @@ -122,7 +116,6 @@ jobs:
cd /tmp/liquidsoap-full/liquidsoap
eval "$(opam config env)"
opam update
opam install -y xml-light saturn_lockfree.0.5.0
dune build --profile release ./src/js/interactive_js.bc.js

tree_sitter_parse:
Expand Down Expand Up @@ -166,7 +159,7 @@ jobs:
needs: build_details
if: github.event_name != 'pull_request' && github.repository_owner == 'savonet' && needs.build_details.outputs.branch == 'main'
container:
image: savonet/liquidsoap-ci:debian_bookworm@sha256:a9e3ce58f99dd80e06e50239cd51530c451d37e4a8fc6947ebcf7375ef1e41e4
image: savonet/liquidsoap-ci:debian_bookworm
options: --user root -v ${{ github.workspace }}/${{ github.run_number }}:/tmp/${{ github.run_number }}
env:
HOME: /home/opam
Expand All @@ -185,11 +178,6 @@ jobs:
run: |
apt-get update
apt-get install -y npm
- name: Install pandoc
run: |
cd /tmp
sudo -u opam -E git clone https://github.com/smimram/ocaml-pandoc.git
sudo -u opam -E opam pin -y add ocaml-pandoc
- name: Build doc
env:
CPU_CORES: ${{ steps.cpu_cores.outputs.count }}
Expand Down Expand Up @@ -231,7 +219,7 @@ jobs:
runs-on: depot-ubuntu-24.04-4
needs: build_details
container:
image: savonet/liquidsoap-ci:debian_bookworm@sha256:a9e3ce58f99dd80e06e50239cd51530c451d37e4a8fc6947ebcf7375ef1e41e4
image: savonet/liquidsoap-ci:debian_bookworm
options: --user root --privileged --ulimit core=-1 --security-opt seccomp=unconfined -v ${{ github.workspace }}/${{ github.run_number }}:/tmp/${{ github.run_number }}
strategy:
fail-fast: false
Expand All @@ -256,20 +244,6 @@ jobs:
sudo -u opam -E git remote set-url origin https://github.com/savonet/liquidsoap.git
sudo -u opam -E git fetch origin ${{ github.sha }}
sudo -u opam -E git checkout ${{ github.sha }}
- name: Install sqlite
run: |
sudo apt-get -y update
sudo apt-get -y install libsqlite3-dev
sudo -u opam -E opam install -y sqlite3
- name: Install pandoc
run: |
cd /tmp
if [ ! -d ocaml-pandoc ]; then
mkdir -p ocaml-pandoc;
chown -R opam ocaml-pandoc;
sudo -u opam -E git clone https://github.com/smimram/ocaml-pandoc.git ocaml-pandoc
fi
sudo -u opam -E opam pin -y add ocaml-pandoc
- name: Build
env:
CPU_CORES: ${{ steps.cpu_cores.outputs.count }}
Expand All @@ -288,7 +262,6 @@ jobs:
run: |
apt-get -y update
apt-get -y install frei0r-plugins
sudo -u opam -E opam install -y prometheus-liquidsoap
- name: Run tests
env:
CPU_CORES: ${{ steps.cpu_cores.outputs.count }}
Expand Down Expand Up @@ -406,27 +379,6 @@ jobs:
sudo -u opam -E git remote set-url origin https://github.com/savonet/liquidsoap.git
sudo -u opam -E git fetch origin ${{ github.sha }}
sudo -u opam -E git checkout ${{ github.sha }}
- name: Update debian packages
if: contains(matrix.os, 'debian') || contains(matrix.os, 'ubuntu')
run: |
echo "opam hold" | sudo dpkg --set-selections
sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
sudo apt-get -y install libsqlite3-dev
- name: Update alpine packages
if: matrix.os == 'alpine'
run: |
apk -U --force-overwrite upgrade
apk add -i sqlite-dev
- name: Install additional libraries
run: |
sudo -u opam -E opam install -y sqlite3
- name: Install pandoc
run: |
cd /tmp
sudo -u opam -E git clone https://github.com/smimram/ocaml-pandoc.git ocaml-pandoc
sudo -u opam -E opam pin -y add ocaml-pandoc
- name: Build
run: |
cd /tmp/liquidsoap-full/liquidsoap
Expand Down Expand Up @@ -503,7 +455,7 @@ jobs:
path: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts

build_win32:
runs-on: depot-ubuntu-22.04-4
runs-on: depot-ubuntu-24.04-4
needs: build_details
strategy:
fail-fast: false
Expand Down Expand Up @@ -553,7 +505,7 @@ jobs:
rm -rf /tmp/${{ github.run_number }}/win32

update_release:
runs-on: depot-ubuntu-22.04-4
runs-on: depot-ubuntu-24.04-4
needs:
[
build_details,
Expand Down
Loading