Skip to content

Commit

Permalink
Add necessary integration pieces for Travis CI
Browse files Browse the repository at this point in the history
- .travis.yml: provides the metadata for describing how
  the project should be built and tested.
- travis/build.sh: builds the project.
- travis/test.sh: tests the project.

This commit adds support for the following matrix:
- Ubuntu 16.04 LTS (xenial) x {clang,gcc} x {ext4}

Support for OS X will be added once runtime issues with it
have been resolved.

Some administrative switches need to be flipped in order for
this change to be made effective, but this has proven
successful on my fork (yaneurabeya/pjdfstest).

Capture client information for FreeBSD, Linux, and OS X

FreeBSD isn't supported with Travis CI, but Linux definitely
is, and OS X is partially supported.

Fixes GitHub issue pjd#12.
  • Loading branch information
ngie-eign committed Apr 4, 2017
1 parent 9f74a0d commit f8d02e3
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: c
sudo: required

matrix:
include:
- os: linux
compiler: clang
dist: xenial
- os: linux
compiler: gcc
dist: xenial

script:
- ./travis/build.sh
- ./travis/test.sh
6 changes: 6 additions & 0 deletions travis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -e

cd $(dirname $0)/..
make
27 changes: 27 additions & 0 deletions travis/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

set -ex

cd $(dirname $0)/..

df .
uname -a

case "$(uname)" in
Darwin)
sw_vers -productVersion
mount
;;
FreeBSD)
mount -p
;;
Linux)
for release_file in /etc/lsb-release /etc/os-release; do
echo "$release_file.. ->"
cat $release_file
done
mount
;;
esac

sudo prove -rv .

0 comments on commit f8d02e3

Please sign in to comment.