-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup travis and fixed some unit testing issues on Linux. Also remove…
…d an obsolete file, causing the build to fail on Linux.
- Loading branch information
Showing
5 changed files
with
73 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# make sudo to enforce running on a real linux VM and not in a container on a macOS VM. | ||
sudo: required | ||
# do not use swift as language, since otherwise the build always runs on a macOS VM. | ||
language: c | ||
dist: trusty # Ubuntu 14.04 LTS | ||
osx_image: xcode9.3beta | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
compiler: clang | ||
# gcc currently it is not possible to compile with gcc | ||
# - os: linux | ||
# compiler: gcc | ||
- os: osx | ||
compiler: clang | ||
|
||
before_install: | ||
- uname -a | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | ||
# update silently | ||
brew update >/dev/null | ||
brew upgrade swiftlint | ||
# check swift version | ||
swift --version | ||
fi | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
sudo apt-get update | ||
sudo apt-get install clang-3.6 | ||
export SWIFT_VERSION=4.1 | ||
# download swift | ||
SWIFT_ARCHIVE=swift-$SWIFT_VERSION-RELEASE-ubuntu14.04.tar.gz | ||
curl https://swift.org/builds/swift-$SWIFT_VERSION-release/ubuntu1404/swift-$SWIFT_VERSION-RELEASE/$SWIFT_ARCHIVE -s -o $SWIFT_ARCHIVE | ||
tar xf $SWIFT_ARCHIVE | ||
rm -f $SWIFT_ARCHIVE | ||
# setup env for swift | ||
export SWIFT_HOME=$(pwd)/swift-$SWIFT_VERSION-RELEASE-ubuntu14.04/usr/bin/ | ||
export PATH=$SWIFT_HOME:$PATH | ||
# check swift version | ||
swift --version | ||
# fix linker issue: https://bugs.swift.org/browse/SR-2299 | ||
sudo ln -sf ld.gold /usr/bin/ld | ||
fi | ||
script: | ||
- swift build | ||
- swift test | ||
- | | ||
# lint on osx only (no need to do this on every platform) | ||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | ||
swiftlint --reporter json > swiftlint.json | ||
cat swiftlint.json | ||
# check for warnings as well | ||
grep "Warning" swiftlint.json > /dev/null && echo "linting failed" && exit 1; | ||
echo "linting passed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import XCTest | ||
|
||
import GeodesicTests | ||
import geodesicTests | ||
|
||
var tests = [XCTestCaseEntry]() | ||
tests += GeodesicTests.allTests() | ||
tests += geodesicTests.allTests() | ||
XCTMain(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters