Skip to content

Commit cd4be6b

Browse files
authored
Merge pull request #2 from Simverge/travis-ci
Add Travis CI configuration (#1)
2 parents 0846bd7 + 512668f commit cd4be6b

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
sudo: required
2+
3+
language: minimal
4+
services: docker
5+
6+
env:
7+
- DISTRO=alpine BUILD_TYPE=Release
8+
- DISTRO=alpine BUILD_TYPE=Debug
9+
- DISTRO=ubuntu BUILD_TYPE=Release
10+
- DISTRO=ubuntu BUILD_TYPE=Debug
11+
12+
before_install:
13+
- docker pull simverge/pdalc-build-deps:$DISTRO
14+
15+
script:
16+
- chmod u+x $TRAVIS_BUILD_DIR/tests/travis/script.sh
17+
- docker run -e TRAVIS_BRANCH -e BUILD_TYPE -e DISTRO -v $TRAVIS_BUILD_DIR:/pdalc -t simverge/pdalc-build-deps:$DISTRO /pdalc/tests/travis/script.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
pdal-c: PDAL C API
22
==================
33

4+
[![Build Status](https://travis-ci.com/Simverge/pdal-c.svg?branch=master)](https://travis-ci.com/Simverge/pdal-c)
5+
46
*pdal-c* is a C API for the Point Data Abstraction Library ([PDAL](http:/github.com/PDAL/PDAL))
57
and is compatible with PDAL 1.7 and later.
68

tests/travis/script.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
gcc --version
4+
g++ --version
5+
6+
export CI_PROJECT_DIR=/pdalc
7+
export CI_PROJECT_NAME=pdal-c
8+
export TARGET_PLATFORM=$DISTRO-`uname -m`-$BUILD_TYPE
9+
echo "Building $CI_PROJECT_NAME ($TRAVIS_BRANCH branch) for $TARGET_PLATFORM"
10+
rm -rf "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
11+
mkdir -p "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
12+
cd "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
13+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPDALC_GCC_PARAM_GGC_MIN_HEAPSIZE=8192 "$CI_PROJECT_DIR"
14+
make
15+
make coverage_pdalc

0 commit comments

Comments
 (0)