Add travis / ci build script

pull/1/head
Thomas Orozco 10 years ago
parent 296a29e3da
commit ec36a858db
  1. 19
      .travis.yml
  2. 2
      Dockerfile
  3. 22
      ci/run_build.sh

@ -0,0 +1,19 @@
language: c
compiler:
- gcc
- clang
script: ./ci/run_build.sh
sudo: false
deploy:
provider: releases
api_key:
secure: Yk90ANpSPv1iJy8QDXCPwfaSmEr/WIJ3bzhQ6X8JvZjfrwTosbh0HrUzQyeac3nyvNwj7YJRssolOFc21IBKPpCFTZqYxSkuLPU6ysG4HGHgN6YJhOMm4mG4KKJ6741q3DJendhZpalBhCEi+NcZK/PCSD97Vl4OqRjBUged0fs=
file:
- "./tini"
- "./tini-static"
on:
repo: krallin/tini
tags: true
condition: "$CC = gcc"

@ -7,6 +7,6 @@ RUN apt-get update \
ADD . /tini
WORKDIR /tini
RUN cmake . && make clean && make
RUN ./ci/run_build.sh
ENTRYPOINT ["/tini/tini"]

@ -0,0 +1,22 @@
#!/bin/bash
# Should be run from the root dir (!)
set -o errexit
set -o nounset
# Build
cmake .
make clean
make
# Smoke tests (actual tests need Docker to run; they don't run within the CI environment)
# Success
for tini in ./tini ./tini-static; do
echo "Testing $tini with: true"
$tini -vvvv true
echo "Testing $tini with: false"
if $tini -vvvv false; then
exit 1
fi
done
Loading…
Cancel
Save