Skip to content

Commit

Permalink
Implement travis and appveyor ci recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
allanleal committed Aug 9, 2019
1 parent 3905f89 commit a00e5ae
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: cpp

os:
- linux
- osx

cache:
directories:
- $HOME/miniconda

install:
- bash ci/travis/install.sh

script:
- bash ci/travis/test.sh

before_cache:
- rm -f $HOME/miniconda/envs/thermofun/conda-meta/history* # Delete these history files to prevent a new cache upload step.
30 changes: 30 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
image:
# - Visual Studio 2015
- Visual Studio 2017

build:
parallel: true

platform:
- x64

configuration:
- Release

environment:
CONDA_DIR: C:\Miniconda36-x64

matrix:
fast_finish: true

init:
- set PATH=%CONDA_DIR%;%CONDA_DIR%\Scripts;%CONDA_DIR%\Library\bin;%PATH%

install:
- call ci\appveyor\install.bat

build_script:
- call ci\appveyor\build.bat

test_script:
- call ci\appveyor\test.bat
12 changes: 12 additions & 0 deletions ci/appveyor/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
)
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
)

echo "Configuring..."
cmake -S . -B build
echo "Building..."
cmake --build build --config %CONFIGURATION% --target install
7 changes: 7 additions & 0 deletions ci/appveyor/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda install conda-devenv
conda update -q conda
conda info -a
conda devenv
call activate thermofun
1 change: 1 addition & 0 deletions ci/appveyor/test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REM call build\test\%CONFIGURATION%\tests.exe
24 changes: 24 additions & 0 deletions ci/travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
if [ ! -f $HOME/miniconda/bin/conda ]; then
echo "Downloading and installing miniconda"
if [ $TRAVIS_OS_NAME = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-$OS.sh
rm -rf $HOME/miniconda
bash miniconda.sh -b -p $HOME/miniconda
fi
if [ ! -f $HOME/miniconda/bin/conda ]; then
echo ERROR: conda was not installed.
exit 1
fi
bash $HOME/miniconda/etc/profile.d/conda.sh
export PATH=$HOME/miniconda/bin/:$PATH
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda install conda-devenv
conda update -q conda
conda info -a
conda devenv
source activate thermofun
mkdir build
cd build
cmake .. -GNinja
ninja
1 change: 1 addition & 0 deletions ci/travis/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ./build/test/tests

0 comments on commit a00e5ae

Please sign in to comment.