Add dependency to OpenSSL

This commit is contained in:
badaix 2024-05-10 13:31:28 +02:00
parent 153d004004
commit eb9fc4ce65
3 changed files with 95 additions and 96 deletions

View file

@ -19,33 +19,37 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: print environment - name: print environment
run: env run: env
- name: dependencies - name: dependencies
run: sudo apt-get update && sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat cppcheck run: |
- name: cache boost sudo apt-get update && \
id: cache-boost sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev \
uses: actions/cache@v4 libopus-dev alsa-utils libpulse-dev libavahi-client-dev libssl-dev libcrypto-dev \
with: avahi-daemon debhelper ccache expat cppcheck
path: boost_${{ env.BOOST_VERSION }} - name: cache boost
key: boost-${{ env.BOOST_VERSION }} id: cache-boost
enableCrossOsArchive: true uses: actions/cache@v4
- name: get boost with:
if: steps.cache-boost.outputs.cache-hit != 'true' path: boost_${{ env.BOOST_VERSION }}
run: | key: boost-${{ env.BOOST_VERSION }}
wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 enableCrossOsArchive: true
tar xjf boost_${BOOST_VERSION}.tar.bz2 - name: get boost
- name: configure if: steps.cache-boost.outputs.cache-hit != 'true'
run: | run: |
cmake -S . -B build \ wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2
-DWERROR=ON -DBUILD_TESTS=ON \ tar xjf boost_${BOOST_VERSION}.tar.bz2
-DBOOST_ROOT=boost_${BOOST_VERSION} \ - name: configure
-DCMAKE_BUILD_TYPE=Release \ run: |
-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \ cmake -S . -B build \
-DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" -DWERROR=ON -DBUILD_TESTS=ON \
- name: analysis -DBOOST_ROOT=boost_${BOOST_VERSION} \
run: cmake --build build --target ${{ matrix.tool }} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \
-DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14"
- name: analysis
run: cmake --build build --target ${{ matrix.tool }}
linux: linux:

View file

@ -71,74 +71,67 @@ jobs:
container: container:
image: ${{matrix.image_prefix}}${{matrix.debian}} image: ${{matrix.image_prefix}}${{matrix.debian}}
steps: steps:
- name: Get dependencies - name: Get dependencies
run: apt-get update && apt-get install -yq wget debhelper build-essential cmake git rename libatomic1 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon libexpat1-dev python3 ccache unzip run: |
env: apt-get update && \
DEBIAN_FRONTEND: noninteractive apt-get install -yq wget debhelper build-essential cmake git rename \
- name: Get GitHub cli libatomic1 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev \
run: | libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon libexpat1-dev \
(type -p wget >/dev/null || (apt update && apt-get install wget -y)) \ libssl-dev libcrypto-dev python3 ccache unzip
&& mkdir -p -m 755 /etc/apt/keyrings \ env:
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ DEBIAN_FRONTEND: noninteractive
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ - name: Checkout
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ uses: actions/checkout@v4
&& apt update \ - name: Setup environment
&& apt install gh -y run: |
- name: Checkout echo "PARENT_DIR=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
uses: actions/checkout@v4 BOOST_DOT_VERSION=$(echo ${BOOST_VERSION} | sed 's/_/./g')
- name: Setup environment echo "BOOST_DOT_VERSION=$BOOST_DOT_VERSION" >> $GITHUB_ENV
run: | echo "BOOST=boost_${BOOST_VERSION}" >> $GITHUB_ENV
echo "PARENT_DIR=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV ln -s extras/package/debian debian
BOOST_DOT_VERSION=$(echo ${BOOST_VERSION} | sed 's/_/./g') - name: Create changelog
echo "BOOST_DOT_VERSION=$BOOST_DOT_VERSION" >> $GITHUB_ENV run: |
echo "BOOST=boost_${BOOST_VERSION}" >> $GITHUB_ENV $GITHUB_WORKSPACE/debian/changelog_md2deb.py $GITHUB_WORKSPACE/changelog.md > $GITHUB_WORKSPACE/debian/changelog
ln -s extras/package/debian debian cat $GITHUB_WORKSPACE/debian/changelog
- name: Create changelog - name: Clean up
run: | run: rm -rf ${{env.PARENT_DIR}}/snap*_${{ matrix.arch }}.deb
$GITHUB_WORKSPACE/debian/changelog_md2deb.py $GITHUB_WORKSPACE/changelog.md > $GITHUB_WORKSPACE/debian/changelog - name: Cache boost
cat $GITHUB_WORKSPACE/debian/changelog id: cache-boost
- name: Clean up uses: actions/cache@v4
run: rm -rf ${{env.PARENT_DIR}}/snap*_*.deb with:
- name: Cache boost path: ${{env.BOOST}}
id: cache-boost key: ${{env.BOOST}}
uses: actions/cache@v4 - name: Get boost
with: if: steps.cache-boost.outputs.cache-hit != 'true'
path: ${{env.BOOST}} run: |
key: ${{env.BOOST}} wget https://boostorg.jfrog.io/artifactory/main/release/${{env.BOOST_DOT_VERSION}}/source/${{env.BOOST}}.tar.bz2
- name: Get boost tar xjf ${{env.BOOST}}.tar.bz2
if: steps.cache-boost.outputs.cache-hit != 'true' - name: cache ccache
run: | id: cache-ccache
wget https://boostorg.jfrog.io/artifactory/main/release/${{env.BOOST_DOT_VERSION}}/source/${{env.BOOST}}.tar.bz2 uses: actions/cache@v4
tar xjf ${{env.BOOST}}.tar.bz2 with:
- name: cache ccache # TODO: use environment variable $HOME/.ccache
id: cache-ccache path: /home/runner/.ccache
uses: actions/cache@v4 key: ${{ matrix.os }}-${{ matrix.debian }}-ccache-${{ github.sha }}
with: restore-keys: ${{ matrix.os }}-${{ matrix.debian }}-ccache-
# TODO: use environment variable $HOME/.ccache - name: Get Snapweb
path: /home/runner/.ccache run: |
key: ${{ matrix.os }}-${{ matrix.debian }}-ccache-${{ github.sha }} wget https://github.com/badaix/snapweb/releases/download/${SNAPWEB_VERSION}/snapweb.zip
restore-keys: ${{ matrix.os }}-${{ matrix.debian }}-ccache- unzip snapweb.zip -d snapweb
- name: Get Snapweb - name: Create deb package
run: | env:
wget https://github.com/badaix/snapweb/releases/download/${SNAPWEB_VERSION}/snapweb.zip # TODO: use environment variable $HOME/.ccache
unzip snapweb.zip -d snapweb CCACHE_DIR: /home/runner/.ccache
- name: Create deb package run: |
env: fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_PULSE=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary
# TODO: use environment variable $HOME/.ccache rename 's/_${{ matrix.arch }}/_without-pulse_${{ matrix.arch }}/g' ../snapclient*_${{ matrix.arch }}.deb
CCACHE_DIR: /home/runner/.ccache fakeroot make -f debian/rules clean
run: | fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary
fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DBUILD_WITH_PULSE=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary - name: Archive artifacts
rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}/g' ../snap*_${{ matrix.arch }}.deb uses: actions/upload-artifact@v4
fakeroot make -f debian/rules clean with:
fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary name: snapcast_${{ matrix.arch }}-debian-${{matrix.debian}}-${{ github.sha }}
rm ../snapserver_*_${{ matrix.arch }}.deb path: ${{env.PARENT_DIR}}/snap*_${{ matrix.arch }}.deb
rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}_with-pulse/g' ../snap*_${{ matrix.arch }}.deb
- name: Release artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
gh release upload ${{needs.release.outputs.tag}} ${{env.PARENT_DIR}}/snap*_*.deb
win: win:

View file

@ -10,7 +10,9 @@ Build-Depends: debhelper (>= 10~),
libopus-dev, libopus-dev,
libavahi-client-dev, libavahi-client-dev,
libasio-dev, libasio-dev,
libsoxr-dev libsoxr-dev,
libssl-dev,
libcrypto-dev
Standards-Version: 4.1.4 Standards-Version: 4.1.4
Homepage: https://github.com/badaix/snapcast Homepage: https://github.com/badaix/snapcast
Vcs-Git: https://github.com/badaix/snapcast.git Vcs-Git: https://github.com/badaix/snapcast.git