2021-11-25 13:45:14 +01:00
|
|
|
# Template C++ Application
|
|
|
|
|
|
|
|
# This template allows you to validate your C++ application.
|
|
|
|
# The workflow allows running tests and code linting on the default branch.
|
|
|
|
|
|
|
|
|
2021-11-25 14:37:27 +01:00
|
|
|
image: debian:latest
|
2021-11-25 13:45:14 +01:00
|
|
|
|
|
|
|
pipelines:
|
|
|
|
default:
|
|
|
|
- parallel:
|
|
|
|
- step:
|
|
|
|
script:
|
|
|
|
# Print the Linux version.
|
|
|
|
- uname -a
|
|
|
|
# Print the gcc version.
|
|
|
|
- apt-get update -qq
|
2021-11-25 14:44:19 +01:00
|
|
|
- apt-get install gcc g++ gfortran -qq -y
|
2021-11-25 14:38:18 +01:00
|
|
|
- gcc --version
|
2021-11-25 14:28:38 +01:00
|
|
|
# Install a CMake 3.0.2 version.
|
2021-11-25 14:44:19 +01:00
|
|
|
- apt-get install git cmake pkg-config cmake-data -y --force-yes
|
2021-11-25 13:45:14 +01:00
|
|
|
# Print the CMake version.
|
2021-11-25 13:48:24 +01:00
|
|
|
- cmake --version
|
|
|
|
# Install the necessary libraries
|
2021-11-28 13:23:55 +01:00
|
|
|
- apt-get install libfftw3-mpi-dev libfftw3-dev -y
|
2021-11-25 13:50:12 +01:00
|
|
|
- apt-get install libgsl-dev -y
|
|
|
|
- apt-get install libhdf5-serial-dev -y
|
2021-11-25 14:10:49 +01:00
|
|
|
- apt-get install libopenmpi-dev -y
|
2021-11-25 13:45:14 +01:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
# Call the CMake.
|
|
|
|
- cmake ..
|
|
|
|
# Build the project.
|
|
|
|
- make
|
|
|
|
|
|
|
|
#pipelines:
|
|
|
|
# default:
|
|
|
|
# - parallel:
|
|
|
|
# - step:
|
|
|
|
# name: Test
|
|
|
|
# script:
|
|
|
|
# - make check
|
|
|
|
# - step:
|
|
|
|
# name: Lint
|
|
|
|
# script:
|
|
|
|
# # apt update && apt -y install cppcheck && cppcheck .
|
|
|
|
# - make lint
|
|
|
|
# - step:
|
|
|
|
# name: Build and Run
|
|
|
|
# script:
|
|
|
|
# - make compile
|
|
|
|
# # Execute your C++ application after compilation to check success
|
|
|
|
# - make distcheck
|