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 14.04 LTS (trusty) x {clang,gcc} x {ext4}
- Ubuntu 16.04 LTS (xenial) x {clang,gcc} x {ext4}

Some initial scaffolding is filled in for OSX, but I haven't fully
tested out the Travis CI integration, so I'm not yet throwing that
switch. It seems to be beta supported, per
https://docs.travis-ci.com/user/multi-os/ , so I might need to run the
builds on my Mac hardware for the time being.

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).

Fixes GitHub issue # 12

Capture more information for FreeBSD, Linux, and OSX

FreeBSD isn't supported with Travis CI, but Linux definitely is, and OSX
is partially supported.
  • Loading branch information
ngie-eign committed Apr 4, 2017
1 parent 5153abe commit 6549aef
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: c
sudo: required

matrix:
include:
- os: linux
compiler: clang
dist: trusty
- os: linux
compiler: gcc
dist: trusty
- 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 6549aef

Please sign in to comment.