Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #75 from Turupawn/devel
Browse files Browse the repository at this point in the history
CI improvements
  • Loading branch information
Turupawn committed Dec 19, 2018
2 parents c11892d + 9e6cb90 commit 7d29133
Show file tree
Hide file tree
Showing 415 changed files with 31,436 additions and 56,009 deletions.
47 changes: 35 additions & 12 deletions .travis.yml
Expand Up @@ -4,20 +4,43 @@ os:
- linux
- osx

dist: trusty
dist: xenial
sudo: false

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5

script:
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then CXX=/usr/bin/g++-5 CC=/usr/bin/gcc-5 cmake . ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake . ; fi
- cmake -Dtest=on .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cmake -D test=on . ;
else
CXX=/usr/bin/g++-5 CC=/usr/bin/gcc-5 cmake -Dtest=on . ;
fi
- make -j2
- make test
- ls
- if [[ "$TRAVIS_TAG" ]]; then
cmake -D mode=static . ;
make -j2 ;
fi
- if [ "$TRAVIS_TAG" ]; then
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
zip Macos.zip libmodio.a libmodio.dylib;
else
zip Linux.zip libmodio.a libmodio.so;
fi
fi

deploy:
- provider: releases
api_key: "${token}"
file:
- "Linux.zip"
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_OS_NAME != "osx"
- provider: releases
api_key: "${token}"
file:
- "Macos.zip"
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_OS_NAME == "osx"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -53,7 +53,7 @@ ENDIF()
IF( test AND test STREQUAL "on" )
message("Testing enabled")
file(GLOB TEST_SRC_FILES ${PROJECT_SOURCE_DIR}/test/*.cpp)
add_subdirectory(ext/gtest-1.8.0)
add_subdirectory(ext/googletest-master)
enable_testing()
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(runUnitTests ${TEST_SRC_FILES})
Expand Down
25 changes: 15 additions & 10 deletions appveyor.yml
Expand Up @@ -3,15 +3,20 @@ image:
clone_folder: c:\projects\source
build_script:
- cmd: >-
mkdir build
cd build
cmake c:\projects\source -G "Visual Studio 15"
cmake --build . --config "Debug"
.\appveyor_build_config.bat
test_script:
- cmd: ctest -C Debug

- cmd: >-
test_build\Debug\runUnitTests.exe
artifacts:
- path: Windows.zip
name: Windows

deploy:
provider: GitHub
auth_token:
secure: "mPa2q6gkctTgPbec+bAGiPew2J7ehiDHalv4DW9H+RzIxgKZGr/ELPc9sLTVGlIB"
artifact: Windows
draft: false
prerelease: false
on:
APPVEYOR_REPO_TAG: true
29 changes: 29 additions & 0 deletions appveyor_build_config.bat
@@ -0,0 +1,29 @@
mkdir test_build
cd test_build
cmake -D mode=static -D test=on -D gtest_force_shared_crt=on -G "Visual Studio 15" c:\projects\source
cmake --build . --config "Debug"

if %APPVEYOR_REPO_TAG% == true (
echo "Release tag detected, building and deploying releases"
mkdir dynamic_build
cd dynamic_build
cmake -D test=on -G "Visual Studio 15" c:\projects\source
cmake --build . --config "Release"
mkdir ..\static_build
cd ..\static_build
cmake -D mode=static -G "Visual Studio 15" c:\projects\source
cmake --build . --config "Release"
mkdir ..\dynamic_build_64bits
cd ..\dynamic_build_64bits
cmake -G "Visual Studio 15 Win64" c:\projects\source
cmake --build . --config "Release"
mkdir ..\static_build_64bits
cd ..\static_build_64bits
cmake -D mode=static -G "Visual Studio 15 Win64" c:\projects\source
cmake --build . --config "Release"
7z a Windows.zip dynamic_build\Release\* static_build\Release\* dynamic_build_64bits\Release\* static_build_64bits\Release\*
) else (
echo "Release tag not detected, not building releases"
)

cd ..
2 changes: 0 additions & 2 deletions build.bat

This file was deleted.

4 changes: 4 additions & 0 deletions ext/googletest-master/.clang-format
@@ -0,0 +1,4 @@
# Run manually to reformat a file:
# clang-format -i --style=file <file>
Language: Cpp
BasedOnStyle: Google
56 changes: 56 additions & 0 deletions ext/googletest-master/.gitignore
@@ -0,0 +1,56 @@
# Ignore CI build directory
build/
xcuserdata
cmake-build-debug/
.idea/
bazel-bin
bazel-genfiles
bazel-googletest
bazel-out
bazel-testlogs
# python
*.pyc

# Visual Studio files
*.sdf
*.opensdf
*.VC.opendb
*.suo
*.user
_ReSharper.Caches/
Win32-Debug/
Win32-Release/
x64-Debug/
x64-Release/

# Ignore autoconf / automake files
Makefile.in
aclocal.m4
configure
build-aux/
autom4te.cache/
googletest/m4/libtool.m4
googletest/m4/ltoptions.m4
googletest/m4/ltsugar.m4
googletest/m4/ltversion.m4
googletest/m4/lt~obsolete.m4

# Ignore generated directories.
googlemock/fused-src/
googletest/fused-src/

# macOS files
.DS_Store
googletest/.DS_Store
googletest/xcode/.DS_Store

# Ignore cmake generated directories and files.
CMakeFiles
CTestTestfile.cmake
Makefile
cmake_install.cmake
googlemock/CMakeFiles
googlemock/CTestTestfile.cmake
googlemock/Makefile
googlemock/cmake_install.cmake
googlemock/gtest
78 changes: 78 additions & 0 deletions ext/googletest-master/.travis.yml
@@ -0,0 +1,78 @@
# Build matrix / environment variable are explained on:
# https://docs.travis-ci.com/user/customizing-the-build/
# This file can be validated on:
# http://lint.travis-ci.org/

sudo: false
language: cpp

# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env).
# It is more tedious, but grants us far more flexibility.
matrix:
include:
- os: linux
dist: trusty
sudo: required
group: deprecated-2017Q3
before_install: chmod -R +x ./ci/*platformio.sh
install: ./ci/install-platformio.sh
script: ./ci/build-platformio.sh
- os: linux
compiler: gcc
sudo : true
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-bazel.sh
- os: linux
compiler: clang
sudo : true
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-bazel.sh
- os: linux
group: deprecated-2017Q4
compiler: gcc
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-autotools.sh
env: VERBOSE=1 CXXFLAGS=-std=c++11
- os: linux
group: deprecated-2017Q4
compiler: gcc
env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11
- os: linux
group: deprecated-2017Q4
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
- os: linux
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
- os: osx
compiler: gcc
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
- os: osx
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if: type != pull_request

# These are the install and build (script) phases for the most common entries in the matrix. They could be included
# in each entry in the matrix, but that is just repetitive.
install:
- ./ci/install-${TRAVIS_OS_NAME}.sh
- . ./ci/env-${TRAVIS_OS_NAME}.sh
- ./ci/log-config.sh

script: ./ci/travis.sh

# For sudo=false builds this section installs the necessary dependencies.
addons:
apt:
# List of whitelisted in travis packages for ubuntu-precise can be found here:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
# List of whitelisted in travis apt-sources:
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
packages:
- g++-4.9
- clang-3.9

notifications:
email: false

0 comments on commit 7d29133

Please sign in to comment.