diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..20c661c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: build +on: + push: + pull_request: + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + # This is currently the only way to get a version into + # the cache tag name - see https://github.com/actions/cache/issues/543 + - run: | + echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV + - uses: actions/checkout@v2 + - name: Cache pulseaudio source + uses: actions/cache@v2 + env: + cache-name: cache-pulseaudio-src + with: + path: ~/pulseaudio.src + key: ${{ runner.os }}-${{ env.OS_VERSION }}-build-${{ env.cache-name }} + - run: scripts/install_pulseaudio_sources.sh + - run: sudo apt-get update + - run: sudo apt-get -yq install build-essential libpulse-dev + - run: ./bootstrap + - run: ./configure PULSE_DIR=~/pulseaudio.src + - run: make diff --git a/.travis.centos.sh b/.travis.centos.sh deleted file mode 100644 index e0f0de5..0000000 --- a/.travis.centos.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -SRC_DIR=${PWD} - -cd /tmp -yum install -y epel-release -yum install -y wget sudo -yum install -y pulseaudio pulseaudio-libs pulseaudio-libs-devel -yum install -y rpmdevtools yum-utils -yum-builddep -y pulseaudio -yum groupinstall -y "Development Tools" - -sed -i.bak \ - -e 's/\(^%wheel\s*ALL=(ALL)\s*ALL\)/# \1/' \ - -e 's/^#\s\(%wheel\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/\1/' \ - /etc/sudoers -useradd -m -G wheel travis -# Docker issue #2259 -chown -R travis:travis ~travis - -PULSE_VER=$(pkg-config --modversion libpulse) -sudo -u travis yumdownloader --source pulseaudio || exit 1 -sudo -u travis rpm --install pulseaudio\*.src.rpm || exit 1 -sudo -u travis rpmbuild -bb --noclean ~travis/rpmbuild/SPECS/pulseaudio.spec || exit 1 - -cd ${SRC_DIR} -sudo -u travis ./bootstrap && ./configure PULSE_DIR=~travis/rpmbuild/BUILD/pulseaudio-${PULSE_VER} && make || exit 1 diff --git a/.travis.ubuntu.sh b/.travis.ubuntu.sh deleted file mode 100644 index 53f267a..0000000 --- a/.travis.ubuntu.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -SRC_DIR=${PWD} - -cd /tmp -sed -i.bak -e 's|^# deb-src|deb-src|' /etc/apt/sources.list - -apt update -apt install -y build-essential dpkg-dev libpulse-dev pulseaudio pkg-config -apt install -y g++ clang - -apt install -y pulseaudio -apt build-dep -y pulseaudio -apt source pulseaudio - -PULSE_VER=$(pkg-config --modversion libpulse) - -cd pulseaudio-${PULSE_VER} -./configure || exit 1 - -cd ${SRC_DIR} -./bootstrap && ./configure PULSE_DIR=/tmp/pulseaudio-${PULSE_VER} && make diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4bc89a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -# vim:ts=2:sw=2:sts=0:number:expandtab -language: c - -env: - matrix: - - OS_TYPE=ubuntu OS_VERSION=18.04 BRANCH=devel - - OS_TYPE=ubuntu OS_VERSION=18.04 BRANCH=master - - OS_TYPE=centos OS_VERSION=7 BRANCH=devel - - OS_TYPE=centos OS_VERSION=7 BRANCH=master - -services: - - docker - -before_install: - - docker pull ${OS_TYPE}:${OS_VERSION} - -script: - - docker run --rm --interactive --tty --volume=${PWD}:${PWD} ${OS_TYPE}:${OS_VERSION} bash -c "cd ${PWD} && bash .travis.${OS_TYPE}.sh" diff --git a/scripts/install_pulseaudio_sources.sh b/scripts/install_pulseaudio_sources.sh new file mode 100755 index 0000000..4fc3d8f --- /dev/null +++ b/scripts/install_pulseaudio_sources.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e ; # Exit on any error +cd $HOME + +if [ ! -d pulseaudio.src ]; then + sudo sed -i.bak -e 's|^# deb-src|deb-src|' /etc/apt/sources.list + + sudo apt-get update + + sudo apt-get build-dep -y pulseaudio + apt-get source pulseaudio + + pulse_dir=$(find . -maxdepth 1 -name pulseaudio-\*) + if [[ -z $pulse_dir ]]; then + echo "** Can't find pulse dir in $(ls)" >&2 + exit 1 + fi + + cd $pulse_dir + ./configure + cd .. + mv $pulse_dir pulseaudio.src +fi + +exit 0