-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from astro-informatics/chrisg_build_tweaks
Clean-up dependencies
- Loading branch information
Showing
56 changed files
with
740 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,12 @@ name: Documentation | |
on: | ||
push: | ||
branches: [ development ] | ||
pull_request: | ||
branches: [ development ] | ||
if: github.event.pull_request.draft == false | ||
|
||
env: | ||
USE_CONAN: 0 | ||
|
||
jobs: | ||
make-documentation: | ||
|
@@ -11,22 +17,40 @@ jobs: | |
|
||
- name: Check out Purify | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
#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=${{github.workspace}}/build | ||
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=${{github.workspace}}/build --enable-shared | ||
make -j$(nproc --ignore 1) install CFLAGS=-fPIC | ||
# Fix bug in FFT3 (cf. https://github.com/FFTW/fftw3/issues/332) | ||
sed -i -e 's/^.*FFTW3LibraryDepends.cmake.*$//1' ${{github.workspace}}/build/lib*/cmake/*/FFTW3Config.cmake | ||
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 | ||
|
@@ -39,33 +63,69 @@ jobs: | |
ref: master | ||
|
||
- name: Create cppflow package | ||
run: conan create ./cppflow/ -pr:h=default -pr:b=default | ||
|
||
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} | ||
#cmake .. -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build | ||
make -j$(nproc --ignore 1) install | ||
fi | ||
- name: Checkout SOPT | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: astroinformatics/sopt.git | ||
repository: astro-informatics/sopt.git | ||
path: sopt | ||
ref: development | ||
|
||
- name: Create SOPT package | ||
run : | | ||
conan create ./sopt --build missing -s:b compiler.libcxx=libstdc++11 -o mpi=off -o openmp=off -o docs=on -o cppflow=on -pr:h=default -pr:b=default | ||
if [[ "USE_CONAN" = 1 ]]; then | ||
conan create ./sopt --build missing -o mpi=off -o openmp=off -o docs=off -o cppflow=on -pr:h=default -pr:b=default | ||
else | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/cppflow/build:$CMAKE_PREFIX_PATH | ||
#export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake:$CMAKE_PREFIX_PATH | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/build:$CMAKE_PREFIX_PATH | ||
#export CMAKE_PREFIX_PATH=${{github.workspace}}/build/lib/cmake:$CMAKE_PREFIX_PATH | ||
mkdir sopt/build | ||
cd sopt/build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=OFF -Dcppflow=ON | ||
#cmake .. -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build -Ddompi=OFF -Dopenmp=OFF -Ddocs=OFF -Dcppflow=ON | ||
make -j$(nproc --ignore 1) install | ||
fi | ||
- name: Configure | ||
run: | | ||
# Need to install this specific version of doxygen because the other Conan build are broken on Conan v1 | ||
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 | ||
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 -o mpi=off -o openmp=off -o docs=on -o cppflow=on -pr:h=default -pr:b=default | ||
else | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/cppflow/build:$CMAKE_PREFIX_PATH | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/build:$CMAKE_PREFIX_PATH | ||
mkdir -p ${{github.workspace}}/build | ||
cd ${{github.workspace}}/build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Dcppflow=ON | ||
fi | ||
- name: Build | ||
run: conan build ${{github.workspace}} -bf ${{github.workspace}}/build | ||
|
||
- name: Make Docweb | ||
run: | | ||
cd build | ||
make docweb VERBOSE=1 | ||
if [[ "USE_CONAN" = 1 ]]; then | ||
conan build ${{github.workspace}} -bf ${{github.workspace}}/build | ||
else | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/cppflow/build:$CMAKE_PREFIX_PATH | ||
##export CMAKE_PREFIX_PATH=${{github.workspace}}/fftw-3.3.10/build/lib/cmake:$CMAKE_PREFIX_PATH | ||
#export CMAKE_PREFIX_PATH=${{github.workspace}}/fftw-3.3.10/build:$CMAKE_PREFIX_PATH | ||
#export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake:$CMAKE_PREFIX_PATH | ||
##export CMAKE_PREFIX_PATH=${{github.workspace}}/sopt/build:$CMAKE_PREFIX_PATH | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/build:$CMAKE_PREFIX_PATH | ||
cd ${{github.workspace}}/build | ||
make -j$(nproc --ignore 1) install | ||
fi | ||
- name: Deploy to GH pages | ||
if: ${{github.event_name == 'push'}} | ||
uses: JamesIves/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# Check code meets Google C++ style guide https://google.github.io/styleguide/cppguide.html | ||
# Check code meets Google C++ style guide https://google.github.io/styleguide/cppguide.html | ||
- name: Run linting | ||
uses: DoozyX/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ ipython-*.log | |
*.png | ||
*~ | ||
local | ||
CMakeUserPresets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.