snapcast/.github/workflows/ubuntu.yml
2021-12-08 10:13:00 +01:00

47 lines
1.9 KiB
YAML

name: Ubuntu-amd64
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: dependencies
run: sudo apt-get update && sudo apt-get install -yq rename libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat
- name: cache boost
id: cache-boost
uses: actions/cache@v2
with:
path: boost_1_78_0
key: ${{ runner.os }}-boost
- name: get boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: wget https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2 && tar xjf boost_1_78_0.tar.bz2
- name: cache ccache
id: cache-ccache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-ccache-
#- name: ccache dump config
# run: ccache -p
- name: cmake build
run: cmake -S . -B build -DBOOST_ROOT=boost_1_78_0 -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DREVISION=${{ github.sha }}
- name: cmake make
run: cmake --build build --parallel 3
- name: debian package
run: |
fakeroot make -f debian/rules CMAKEFLAGS="-DBOOST_ROOT=boost_1_78_0 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DREVISION=${{ github.sha }} -DBUILD_WITH_PULSE=OFF" binary
rename 's/_amd64/_without-pulse_amd64/g' ../snapclient*_amd64.deb
rm ../snapserver*_amd64.deb
fakeroot make -f debian/rules clean
fakeroot make -f debian/rules CMAKEFLAGS="-DBOOST_ROOT=boost_1_78_0 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DREVISION=${{ github.sha }}" binary
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: develop_snapshot_amd64-${{github.sha}}
path: /home/runner/work/snapcast/snap*_amd64.deb