Permalink
Browse files

appveyor and travis update

  • Loading branch information...
Turupawn committed Dec 18, 2018
1 parent 695b9d4 commit 81165ad4c1bebab4e594b16fc91590dd3b42c81f
Showing with 80 additions and 22 deletions.
  1. +35 −12 .travis.yml
  2. +16 −10 appveyor.yml
  3. +29 −0 appveyor_build_config.bat
@@ -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"
@@ -3,15 +3,21 @@ 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: >-
cd 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
@@ -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"
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"
)

cd ..

0 comments on commit 81165ad

Please sign in to comment.