travis: use alpine instead of ubuntu for CI
parent
a705b5a018
commit
67f8cc7fb9
49
.travis.yml
49
.travis.yml
|
@ -1,20 +1,26 @@
|
|||
language: c
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
sudo: required
|
||||
language: minimal
|
||||
env:
|
||||
matrix:
|
||||
- ARCH=x86_64
|
||||
- ARCH=x86
|
||||
- ARCH=aarch64
|
||||
- ARCH=armhf
|
||||
- ARCH=ppc64le
|
||||
|
||||
before_install:
|
||||
- scripts/install_deps.sh
|
||||
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
|
||||
- "wget 'https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.7.0/alpine-chroot-install' \
|
||||
&& echo '090d323d887ef3a2fd4e752428553f22a52b87bb alpine-chroot-install' | sha1sum -c || exit 1"
|
||||
- alpine() { /alpine/enter-chroot -u "$USER" "$@"; }
|
||||
|
||||
install:
|
||||
- sudo sh alpine-chroot-install -a "$ARCH"
|
||||
-p 'build-base autoconf automake libtool kyua atf'
|
||||
|
||||
script:
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then sh ./autogen.sh ; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./configure ; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then cp tests/parser.sh tests/parser; chmod +x tests/parser; make; tests/parser escaped_backslash ; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make distcheck ; fi
|
||||
- alpine sh ./autogen.sh
|
||||
- alpine ./configure
|
||||
- alpine make distcheck
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
@ -23,22 +29,3 @@ notifications:
|
|||
- "irc.freenode.org#pkgconf"
|
||||
on_success: change
|
||||
on_failure: always
|
||||
|
||||
env:
|
||||
global:
|
||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
||||
# via the "travis encrypt" command using the project repo's public key
|
||||
- secure: "blUnmLjOjZ1l9jSUff2gka+O6zI82wOMF/6zk6domstMjWbdRQFuEijkAngLyRYa/6uwbNQezqktJficEOvnU5kjq/IVUPkVTWR/nwhZdOpB4ksllpEWX6LH90HqxEaMqGZEaqPEG5uCYW+8pwTgWesPVzc0TF552WNoh4swAhs="
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- liblua5.2-dev
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "pkgconf/pkgconf"
|
||||
description: "package compiler and linker metadata toolkit"
|
||||
notification_email: nenolod@dereferenced.org
|
||||
build_command_prepend: "sh autogen.sh; ./configure"
|
||||
build_command: make
|
||||
branch_pattern: coverity
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Copyright (c) 2012 Bryan Drewery <bryan@shatow.net>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer
|
||||
# in this position and unchanged.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Install build dependencies for pkg on Mac or Linux (Debiaun/Ubuntu) systems.
|
||||
#
|
||||
# This script is primarily intended for travis CI to be able to setup the
|
||||
# build environment.
|
||||
#
|
||||
# To run on a clean Ubuntu system, try something like this:
|
||||
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
# sudo apt install liblua5.2-dev libsqlite3-dev
|
||||
# sh -ex scripts/install_deps.sh
|
||||
|
||||
install_from_github() {
|
||||
local name="${1}"
|
||||
local ver="${2}"
|
||||
local distname="${name}-${ver}"
|
||||
|
||||
# https://github.com/jmmv/kyua/releases/download/kyua-0.12/kyua-0.12.tar.gz
|
||||
local url="https://github.com/jmmv/${name}"
|
||||
wget "${url}/releases/download/${distname}/${distname}.tar.gz"
|
||||
tar -xzvf "${distname}.tar.gz"
|
||||
|
||||
cd "${distname}"
|
||||
./configure \
|
||||
--disable-developer \
|
||||
--without-atf \
|
||||
--without-doxygen \
|
||||
CPPFLAGS="-I/usr/local/include" \
|
||||
LDFLAGS="-L/usr/local/lib -Wl,-R/usr/local/lib" \
|
||||
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
|
||||
make -j2
|
||||
$SUDO make install
|
||||
cd -
|
||||
|
||||
rm -rf "${distname}" "${distname}.tar.gz"
|
||||
}
|
||||
|
||||
SUDO=sudo
|
||||
CFLAGS="-g -O2"
|
||||
case $(uname -s) in
|
||||
Darwin)
|
||||
brew update
|
||||
brew install libarchive --with-xz
|
||||
brew install openssl
|
||||
brew install kyua
|
||||
;;
|
||||
Linux)
|
||||
install_from_github atf 0.21
|
||||
install_from_github lutok 0.4
|
||||
install_from_github kyua 0.12
|
||||
;;
|
||||
CYGWIN*)
|
||||
SUDO=""
|
||||
apt-cyg update
|
||||
apt-cyg install lua-devel libsqlite3-devel
|
||||
install_from_github lutok 0.4
|
||||
|
||||
# Work around
|
||||
# utils/process/system.cpp:59:68: error: invalid conversion from ‘pid_t (*)(pid_t, __wait_status_ptr_t, int) {aka int (*)(int, void*, int)}’ to ‘pid_t (*)(pid_t, int*, int) {aka int (*)(int, int*, int)}’ [-fpermissive]
|
||||
# pid_t (*detail::syscall_waitpid)(const pid_t, int*, const int) = ::waitpid;
|
||||
# ^
|
||||
# make[1]: *** [Makefile:7014: utils/process/libutils_a-system.o] Error 1
|
||||
export CXXFLAGS="-g -O2 -fpermissive"
|
||||
install_from_github kyua 0.12
|
||||
unset CXXFLAGS
|
||||
|
||||
install_from_github atf 0.21
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue