mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Add Travis CI tests for Arch, Debian and OSX/macOS
+ Arch and Debian are run in Docker containers, as openSUSE Tumbleweed. + OSX/macOS doesn't use any containers. * Homebrew is used to fetch all the dependencies. * The dependencies are declared in the Brewfile.travis file. + The travis-build.sh script has been modified to check for the current OS and the different configure flags has been moved into an array that'll be looped through instead. The xscreensaver (for libXScrnSaver) flags has been removed for macOS as it only makes sense for systems running X11, which macOS doesn't (usually) do. + Some minor shellcheck fixes, too. Fixes: #1100
This commit is contained in:
parent
48013f8d43
commit
3700c80ad1
45
.travis.yml
45
.travis.yml
@ -1,10 +1,47 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
language: c
|
language: bash
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker # Linux tests are run in Docker containers.
|
||||||
|
|
||||||
|
addons:
|
||||||
|
homebrew:
|
||||||
|
brewfile: Brewfile.travis # mac OS dependencies.
|
||||||
|
# libsignal-protocol-c is still not in the Travis CI Homebrew snapshot, the
|
||||||
|
# line below could be removed when the snapshot has been updated to speed up
|
||||||
|
# the OSX job.
|
||||||
|
update: true
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
env: BUILD_FLAVOR=tumbleweed
|
||||||
|
- os: linux
|
||||||
|
env: BUILD_FLAVOR=debian
|
||||||
|
- os: linux
|
||||||
|
env: BUILD_FLAVOR=arch
|
||||||
|
- os: osx
|
||||||
|
env:
|
||||||
|
# Ensure that "keg-only" Homebrew versions are used.
|
||||||
|
- PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
- PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
- PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
- PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
- PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- docker build -f Dockerfile -t profanity .
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
|
docker build -f Dockerfile."$BUILD_FLAVOR" -t profanity .;
|
||||||
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run -it profanity ./travis-build.sh
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
|
docker run -it profanity ./travis-build.sh;
|
||||||
|
fi
|
||||||
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
|
./travis-build.sh;
|
||||||
|
fi
|
||||||
|
|
||||||
|
after_failure:
|
||||||
|
- cat ./config.log
|
||||||
|
- env
|
||||||
|
20
Brewfile.travis
Normal file
20
Brewfile.travis
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
brew 'autoconf'
|
||||||
|
brew 'autoconf-archive'
|
||||||
|
brew 'automake'
|
||||||
|
brew 'check'
|
||||||
|
brew 'curl'
|
||||||
|
brew 'expat'
|
||||||
|
brew 'glib'
|
||||||
|
brew 'gnutls'
|
||||||
|
brew 'gpgme'
|
||||||
|
brew 'gtk+'
|
||||||
|
brew 'libffi'
|
||||||
|
brew 'libotr'
|
||||||
|
brew 'libsignal-protocol-c'
|
||||||
|
brew 'libstrophe'
|
||||||
|
brew 'libtool'
|
||||||
|
brew 'ncurses'
|
||||||
|
brew 'openssl'
|
||||||
|
brew 'ossp-uuid'
|
||||||
|
brew 'pkg-config'
|
||||||
|
brew 'readline'
|
58
Dockerfile.arch
Normal file
58
Dockerfile.arch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
FROM archlinux/base
|
||||||
|
|
||||||
|
RUN pacman -Syu --noconfirm && pacman -S --needed --noconfirm \
|
||||||
|
autoconf \
|
||||||
|
autoconf-archive \
|
||||||
|
automake \
|
||||||
|
base-devel \
|
||||||
|
check \
|
||||||
|
cmake \
|
||||||
|
cmocka \
|
||||||
|
curl \
|
||||||
|
doxygen \
|
||||||
|
expat \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
gpgme \
|
||||||
|
gtk2 \
|
||||||
|
libgcrypt \
|
||||||
|
libmicrohttpd \
|
||||||
|
libnotify \
|
||||||
|
libotr \
|
||||||
|
libtool \
|
||||||
|
libxss \
|
||||||
|
make \
|
||||||
|
openssl \
|
||||||
|
pkg-config \
|
||||||
|
python \
|
||||||
|
wget
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/{stabber,profanity}
|
||||||
|
|
||||||
|
RUN useradd -mb /usr/src --shell=/bin/false aur && usermod -L aur
|
||||||
|
USER aur
|
||||||
|
|
||||||
|
WORKDIR /usr/src/aur
|
||||||
|
RUN wget https://aur.archlinux.org/cgit/aur.git/snapshot/libstrophe-git.tar.gz
|
||||||
|
RUN wget https://aur.archlinux.org/cgit/aur.git/snapshot/libsignal-protocol-c.tar.gz
|
||||||
|
RUN tar -zxvf libstrophe-git.tar.gz
|
||||||
|
RUN tar -zxvf libsignal-protocol-c.tar.gz
|
||||||
|
RUN pushd libstrophe-git && makepkg && popd
|
||||||
|
RUN pushd libsignal-protocol-c && makepkg && popd
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN pacman -U --noconfirm libstrophe-git/libstrophe-git-*.pkg.tar.xz
|
||||||
|
RUN pacman -U --noconfirm libsignal-protocol-c/libsignal-protocol-c-*.pkg.tar.xz
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
RUN git clone git://github.com/boothj5/stabber.git
|
||||||
|
|
||||||
|
WORKDIR /usr/src/stabber
|
||||||
|
RUN ./bootstrap.sh
|
||||||
|
RUN ./configure --prefix=/usr --disable-dependency-tracking
|
||||||
|
RUN make
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /usr/src/profanity
|
||||||
|
COPY . /usr/src/profanity
|
49
Dockerfile.debian
Normal file
49
Dockerfile.debian
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Build the latest Debian testing image
|
||||||
|
FROM debian:testing
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
autoconf \
|
||||||
|
autoconf-archive \
|
||||||
|
automake \
|
||||||
|
expect \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
libcmocka-dev \
|
||||||
|
libcurl3-dev \
|
||||||
|
libgcrypt-dev \
|
||||||
|
libglib2.0-dev \
|
||||||
|
libgpgme11-dev \
|
||||||
|
libgtk2.0-dev \
|
||||||
|
libmicrohttpd-dev \
|
||||||
|
libncursesw5-dev \
|
||||||
|
libnotify-dev \
|
||||||
|
libotr5-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
libsignal-protocol-c-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libtool \
|
||||||
|
libxss-dev \
|
||||||
|
make \
|
||||||
|
pkg-config \
|
||||||
|
python-dev
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/{stabber,libmesode,profanity}
|
||||||
|
WORKDIR /usr/src
|
||||||
|
|
||||||
|
RUN git clone git://github.com/boothj5/stabber.git
|
||||||
|
RUN git clone git://github.com/profanity-im/libmesode.git
|
||||||
|
|
||||||
|
WORKDIR /usr/src/stabber
|
||||||
|
RUN ./bootstrap.sh
|
||||||
|
RUN ./configure --prefix=/usr --disable-dependency-tracking
|
||||||
|
RUN make
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /usr/src/libmesode
|
||||||
|
RUN ./bootstrap.sh
|
||||||
|
RUN ./configure --prefix=/usr
|
||||||
|
RUN make
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /usr/src/profanity
|
||||||
|
COPY . /usr/src/profanity
|
@ -5,35 +5,35 @@ FROM opensuse/tumbleweed
|
|||||||
# libmicrohttpd - for stabber
|
# libmicrohttpd - for stabber
|
||||||
# glibc-locale - to have en_US locale
|
# glibc-locale - to have en_US locale
|
||||||
RUN zypper --non-interactive in --no-recommends \
|
RUN zypper --non-interactive in --no-recommends \
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
autoconf \
|
autoconf \
|
||||||
autoconf-archive \
|
autoconf-archive \
|
||||||
make \
|
|
||||||
automake \
|
automake \
|
||||||
libtool \
|
|
||||||
glib2-devel \
|
|
||||||
gtk2-devel \
|
|
||||||
expect-devel \
|
expect-devel \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
glib2-devel \
|
||||||
|
glibc-locale \
|
||||||
|
gtk2-devel \
|
||||||
libXss-devel \
|
libXss-devel \
|
||||||
|
libcmocka-devel \
|
||||||
libcurl-devel \
|
libcurl-devel \
|
||||||
libexpat-devel \
|
libexpat-devel \
|
||||||
|
libgcrypt-devel \
|
||||||
libgpgme-devel \
|
libgpgme-devel \
|
||||||
libmesode-devel \
|
libmesode-devel \
|
||||||
|
libmicrohttpd-devel \
|
||||||
libnotify-devel \
|
libnotify-devel \
|
||||||
libotr-devel \
|
libotr-devel \
|
||||||
libuuid-devel \
|
|
||||||
libcmocka-devel \
|
|
||||||
ncurses-devel \
|
|
||||||
python3-devel \
|
|
||||||
python3 \
|
|
||||||
python-devel \
|
|
||||||
python \
|
|
||||||
readline-devel \
|
|
||||||
libsignal-protocol-c-devel \
|
libsignal-protocol-c-devel \
|
||||||
libgcrypt-devel \
|
libtool \
|
||||||
libmicrohttpd-devel \
|
libuuid-devel \
|
||||||
glibc-locale
|
make \
|
||||||
|
ncurses-devel \
|
||||||
|
python \
|
||||||
|
python-devel \
|
||||||
|
python3 \
|
||||||
|
python3-devel \
|
||||||
|
readline-devel
|
||||||
|
|
||||||
# https://github.com/openSUSE/docker-containers-build/issues/26
|
# https://github.com/openSUSE/docker-containers-build/issues/26
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mkdir -p m4
|
mkdir -p m4
|
||||||
autoreconf -i $@
|
autoreconf -i "$@"
|
||||||
|
176
travis-build.sh
176
travis-build.sh
@ -13,123 +13,63 @@ trap error_handler ERR
|
|||||||
|
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
|
|
||||||
echo
|
tests=()
|
||||||
echo "--> Building with ./configure --enable-notifications --enable-icons --enable-otr --enable-pgp --enable-omemo --enable-plugins --enable-c-plugins --enable-python-plugins --with-xscreensaver"
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
||||||
echo
|
linux*)
|
||||||
./configure --enable-notifications --enable-icons --enable-otr --enable-pgp --enable-omemo --enable-plugins --enable-c-plugins --enable-python-plugins --with-xscreensaver
|
tests=(
|
||||||
make
|
"--enable-notifications --enable-icons --enable-otr --enable-pgp
|
||||||
./profanity -v
|
--enable-omemo --enable-plugins --enable-c-plugins
|
||||||
make clean
|
--enable-python-plugins --with-xscreensaver"
|
||||||
|
"--disable-notifications --disable-icons --disable-otr --disable-pgp
|
||||||
|
--disable-omemo --disable-plugins --disable-c-plugins
|
||||||
|
--disable-python-plugins --without-xscreensaver"
|
||||||
|
"--disable-notifications"
|
||||||
|
"--disable-icons"
|
||||||
|
"--disable-otr"
|
||||||
|
"--disable-pgp"
|
||||||
|
"--disable-omemo"
|
||||||
|
"--disable-pgp --disable-otr"
|
||||||
|
"--disable-pgp --disable-otr --disable-omemo"
|
||||||
|
"--disable-plugins"
|
||||||
|
"--disable-python-plugins"
|
||||||
|
"--disable-c-plugins"
|
||||||
|
"--disable-c-plugins --disable-python-plugins"
|
||||||
|
"--without-xscreensaver"
|
||||||
|
"")
|
||||||
|
;;
|
||||||
|
darwin*)
|
||||||
|
tests=(
|
||||||
|
"--enable-notifications --enable-icons --enable-otr --enable-pgp
|
||||||
|
--enable-omemo --enable-plugins --enable-c-plugins
|
||||||
|
--enable-python-plugins"
|
||||||
|
"--disable-notifications --disable-icons --disable-otr --disable-pgp
|
||||||
|
--disable-omemo --disable-plugins --disable-c-plugins
|
||||||
|
--disable-python-plugins"
|
||||||
|
"--disable-notifications"
|
||||||
|
"--disable-icons"
|
||||||
|
"--disable-otr"
|
||||||
|
"--disable-pgp"
|
||||||
|
"--disable-omemo"
|
||||||
|
"--disable-pgp --disable-otr"
|
||||||
|
"--disable-pgp --disable-otr --disable-omemo"
|
||||||
|
"--disable-plugins"
|
||||||
|
"--disable-python-plugins"
|
||||||
|
"--disable-c-plugins"
|
||||||
|
"--disable-c-plugins --disable-python-plugins"
|
||||||
|
"")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo
|
for flags in "${tests[@]}"
|
||||||
echo "--> Building with ./configure --disable-notifications --disable-icons --disable-otr --disable-pgp --disable-omemo --disable-plugins --disable-c-plugins --disable-python-plugins --without-xscreensaver"
|
do
|
||||||
echo
|
echo
|
||||||
./configure --disable-notifications --disable-icons --disable-otr --disable-pgp --disable-omemo --disable-plugins --disable-c-plugins --disable-python-plugins --without-xscreensaver
|
echo "--> Building with ./configure $flags"
|
||||||
make
|
echo
|
||||||
./profanity -v
|
# shellcheck disable=SC2086
|
||||||
make clean
|
./configure $flags
|
||||||
|
make
|
||||||
|
./profanity -v
|
||||||
|
make clean
|
||||||
|
|
||||||
echo
|
echo "$flags"
|
||||||
echo "--> Building with ./configure --disable-notifications"
|
done
|
||||||
echo
|
|
||||||
./configure --disable-notifications
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-icons"
|
|
||||||
echo
|
|
||||||
./configure --disable-icons
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-otr"
|
|
||||||
echo
|
|
||||||
./configure --disable-otr
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-pgp"
|
|
||||||
echo
|
|
||||||
./configure --disable-pgp
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-omemo"
|
|
||||||
echo
|
|
||||||
./configure --disable-omemo
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-pgp --disable-otr"
|
|
||||||
echo
|
|
||||||
./configure --disable-pgp --disable-otr
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-pgp --disable-otr --disable-omemo"
|
|
||||||
echo
|
|
||||||
./configure --disable-pgp --disable-otr --disable-omemo
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-plugins"
|
|
||||||
echo
|
|
||||||
./configure --disable-plugins
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-python-plugins"
|
|
||||||
echo
|
|
||||||
./configure --disable-python-plugins
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-c-plugins"
|
|
||||||
echo
|
|
||||||
./configure --disable-c-plugins
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --disable-c-plugins --disable-python-plugins"
|
|
||||||
echo
|
|
||||||
./configure --disable-c-plugins --disable-python-plugins
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure --without-xscreensaver"
|
|
||||||
echo
|
|
||||||
./configure --without-xscreensaver
|
|
||||||
make
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "--> Building with ./configure"
|
|
||||||
echo
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make check
|
|
||||||
./profanity -v
|
|
||||||
make clean
|
|
||||||
|
Loading…
Reference in New Issue
Block a user