Skip to content

Clean-up dependencies #31

Clean-up dependencies

Clean-up dependencies #31

Workflow file for this run

name: Documentation
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
if: github.event.pull_request.draft == false
env:
USE_CONAN: 0
jobs:
make-documentation:
runs-on: ubuntu-20.04
steps:
- name: Check out Purify
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt update
sudo apt install openmpi-bin libopenmpi-dev casacore-dev doxygen graphviz
if [[ "$USE_CONAN" = 0 ]]; then
sudo apt install libeigen3-dev libspdlog-dev libtiff-dev libcfitsio-dev
sudo apt install libbenchmark-dev libboost-all-dev libyaml-cpp-dev
git clone https://github.com/catchorg/Catch2.git -b v3.4.0
mkdir Catch2/build
cd Catch2/build
cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${PWD}
make -j$(nproc --ignore 1) install
cd -
wget --no-check-certificate --no-verbose http://www.fftw.org/fftw-3.3.10.tar.gz -O- tar --no-same-owner -xz;
cd fftw-3.3.10
./configure --prefix=${PWD}/build
make -j$(nproc --ignore 1) install
cd -
fi
- name: Install Tensorflow API on Ubuntu
uses: UCL/install-tensorflow-action@main
with:
version: 2.11.0
os: linux
- name: Install Conan
id: conan
if: env.USE_CONAN != '0'
uses: turtlebrowser/get-conan@main
with:
version: 1.60.1
- name: Checkout cppflow repo
uses: actions/checkout@v3
with:
repository: UCL/cppflow.git
path: cppflow
ref: master
- name: Create cppflow package
run: |
if [[ "USE_CONAN" = 1 ]]; then
conan create ./cppflow/ -pr:h=default -pr:b=default
else
mkdir cppflow/build
cd cppflow/build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}
make -j$(nproc --ignore 1) install
fi
- name: Checkout SOPT
uses: actions/checkout@v3
with:
repository: astro-informatics/sopt.git
path: sopt
ref: chrisg_build_tweaks
- name: Create SOPT package
run : |
if [[ "USE_CONAN" = 1 ]]; then
conan create ./sopt --build missing -s:b compiler.libcxx=libstdc++11 -o mpi=off -o openmp=off -o cppflow=on -pr:h=default -pr:b=default
else
export PATH=${{github.workspace}}/cppflow/build:$PATH
export PATH=${{github.workspace}}/Catch2/build:$PATH
export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake/Catch2:$CMAKE_PREFIX_PATH
mkdir sopt/build
cd sopt/build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Dcppflow=ON
make -j$(nproc --ignore 1) install
fi
- name: Configure
run: |
if [[ "USE_CONAN" = 1 ]]; then
# Doxygen currently broken in Conan v1 and v2
#conan install doxygen/1.9.4@#2af713e135f12722e3536808017ba086 --update
conan install ${{github.workspace}} -if ${{github.workspace}}/build --build missing -s compiler.libcxx=libstdc++11 -o mpi=off -o openmp=off -o docs=on -o cppflow=on -pr:h=default -pr:b=default
else
export PATH=${{github.workspace}}/cppflow/build:$PATH
export PATH=${{github.workspace}}/fftw-3.3.10/build:$PATH
export PATH=${{github.workspace}}/Catch2/build:$PATH
export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake/Catch2:$CMAKE_PREFIX_PATH
export PATH=${{github.workspace}}/sopt/build:$PATH
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Dcppflow=ON
fi
- name: Build
run: |
if [[ "USE_CONAN" = 1 ]]; then
conan build ${{github.workspace}} -bf ${{github.workspace}}/build
else
export PATH=${{github.workspace}}/cppflow/build:$PATH
export PATH=${{github.workspace}}/Catch2/build:$PATH
export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake/Catch2:$CMAKE_PREFIX_PATH
export PATH=${{github.workspace}}/sopt/build:$PATH
cd ${{github.workspace}}/build
make -j$(nproc --ignore 1) install
fi
#- name: Make Docweb
# run: |
# cd build
# make docweb VERBOSE=1
- name: Deploy to GH pages
if: ${{github.event_name == 'push'}}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: build/cpp/docs/html # The folder the action should deploy.