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

Commit

Permalink
appveyor and travis update
Browse files Browse the repository at this point in the history
  • Loading branch information
Turupawn committed Dec 18, 2018
1 parent 695b9d4 commit 81165ad
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 22 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"
26 changes: 16 additions & 10 deletions appveyor.yml
Expand Up @@ -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
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"
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.