Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add linux support to .travis.yml
Sam Clegg committed 10 years ago
commit 12714526fe05e37ac2f6862c18ee07ff50ec4c3b
parent 5bc1e90
4 files changed +112 -8
modified .travis.yml
@@ -1,23 +1,32 @@
language: c

os:
+
  - linux
  - osx

+
addons:
+
  apt:
+
    packages:
+
      - libbsd-dev
+
      - libarchive-dev
+
      - libssl-dev
+
      - liblzma-dev
+
      - libldns-dev
+

+
sudo: false
+

compiler:
  - clang
  - gcc

+
before_install:
+
  - scripts/install_deps.sh
+

before_script:
-
  - brew update
-
  - brew install libarchive --with-xz
-
  - brew install openssl
-
  - brew install kyua
  - autoreconf -i

script:
-
  - ./configure
-
  - make V=1
-
  - make check
+
  - scripts/travis_build.sh

after_failure:
  - kyua report --verbose
modified README.md
@@ -29,7 +29,7 @@ Table of Contents:
* [Creating a package repository](#pkgcreate)
* [Additional resources](#resources)

-
OSX:
+
Linux/OSX:
[<img src="https://travis-ci.org/freebsd/pkg.svg" />](https://travis-ci.org/freebsd/pkg)

FreeBSD:
added scripts/install_deps.sh
@@ -0,0 +1,40 @@
+
#! /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.
+

+
if [ $(uname -s) = "Darwin" ]; then
+
	brew update
+
	brew install libarchive --with-xz
+
	brew install openssl
+
	brew install kyua
+
fi
+
#elif [ $(uname -s) = "Linux" ]; then
+
	#sudo apt-get update -qq
+
	#sudo apt-get install -y libarchive-dev libssl-dev liblzma-dev libldns-dev
+
#fi
added scripts/travis_build.sh
@@ -0,0 +1,55 @@
+
#! /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.
+

+
# This script is run as the 'script' step in .travis.yml.  Have a standalone
+
# script is better than listing multiple scripts in .travis.yml for several
+
# reasons:
+
# 1 - It allows for condition logic
+
# 2 - We can bail out on the first failure (set -x).  Travis will always try
+
#     to run all the scripts so, for example, it will try to run 'make' even
+
#     if 'configure' fails.
+
# 3 - It allows developers to easily, with a single command re-produce what
+
#     travis is doing.
+

+
set -x
+
set -e
+

+
if [ $(uname -s) = "Darwin" ]; then
+
  ./configure
+
elif [ $(uname -s) = "Linux" ]; then
+
  CFLAGS="-Wno-strict-aliasing -Wno-unused-result -Wno-unused-value" \
+
    ./configure --with-ldns
+
fi
+

+
# Build quietly and in parallel first.  If the build fails re-run
+
# with verbosity and in serial, both of which which make build errors
+
# easier to interpret.
+
make -j4 || make V=1
+

+
if [ $(uname -s) = "Darwin" ]; then
+
  # TODO(sbc100): Figure out how to get kyua and atf installed on the
+
  # linux travis instances so we can run the tests.
+
  make check
+
fi