Skip to content

Commit

Permalink
Add CDash link to readme and add a rough draft Travis CI yaml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel committed Nov 12, 2019
1 parent b1d551b commit 067fc8b
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
language: cpp
sudo: false

# Use Linux unless specified otherwise
os: linux
dist: xenial

# All environments to test
matrix:
include:
- env:
- CXX_COMPILER=g++-7
- C_COMPILER=gcc-7
- Fortran_COMPILER=gfortran
- MPI_CXX_COMPILER=mpicxx
- MPI_C_COMPILER=mpicc
- MPI_Fortran_COMPILER=mpifort
- BUILD_TYPE=Release
addons: &mpich
apt:
packages:
- g++-7
- gcc-7
- gfortran
- mpich
- libmpich-dev
- python3.6
- python3.6-venv
sources:
- ubuntu-toolchain-r-test
- deadsnakes

install:
# Set the ${CXX} variable properly
- export CXX=${CXX_COMPILER}
- export CC=${C_COMPILER}
- ${CXX} --version
- ${CC} --version

# Travis machines have 2 cores
- export JOBS=2

# Dependencies required by the CI are installed in ${TRAVIS_BUILD_DIR}/deps/
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p "${DEPS_DIR}"
- cd "${DEPS_DIR}"

# Install python dependencies in virtual environment
- python3.6 -m venv env
- source env/bin/activate
- pip3 install matplotlib numpy nose pandas

# Install a recent CMake (unless already installed on OS X)
- CMAKE_VERSION=3.15.5
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v${CMAKE_VERSION%.[0-9]}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew install cmake || brew upgrade cmake
fi
- cmake --version

before_script:
# have CMake to generate build files
- cd "${TRAVIS_BUILD_DIR}"
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=./install -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE -DAMR_WIND_ENABLE_MPI:BOOL=ON -DCMAKE_CXX_COMPILER:STRING=$MPI_CXX_COMPILER -DCMAKE_C_COMPILER:STRING=$MPI_C_COMPILER -DCMAKE_Fortran_COMPILER:STRING=$MPI_Fortran_COMPILER -DAMR_WIND_ENABLE_TESTS:BOOL=ON -DAMR_WIND_TEST_WITH_FEXTREMA:BOOL=ON ..

script:
# Build the tests and run tests only if built successfully
- cmake --build . -- -j${JOBS} && ctest --output-on-failure -j${JOBS}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ library](https://amrex-codes.github.io/amrex/), and is a wind-focused fork of

The AMR-Wind documentation website is located [here](http://amr-wind.readthedocs.io/en/latest/).

### Nightly Testing Status

[![CDash Logo](https://github.com/NaluCFD/Nalu/wiki/images/cDashLogo.gif)](http://my.cdash.org/index.php?project=AMR-Wind)

[![Powered by AMReX](https://amrex-codes.github.io/badges/powered%20by-AMReX-red.svg)](https://amrex-codes.github.io/amrex/)

0 comments on commit 067fc8b

Please sign in to comment.