-
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 #344 from astro-informatics/cg_cppflow_migration
Updates from MSSL in-person meeting
- Loading branch information
Showing
10 changed files
with
128 additions
and
393 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 |
---|---|---|
|
@@ -17,9 +17,6 @@ env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
OMP_NUM_THREADS: 2 | ||
CONAN_PRINT_RUN_COMMANDS: 1 | ||
CONAN_CPU_COUNT: 2 | ||
CONAN_SKIP_BROKEN_SYMLINKS_CHECK: 'True' | ||
|
||
jobs: | ||
build: | ||
|
@@ -49,11 +46,11 @@ jobs: | |
- g++-11 | ||
- clang++ | ||
mpi: | ||
- "on" | ||
- "off" | ||
- "ON" | ||
- "OFF" | ||
omp: | ||
- "on" | ||
- "off" | ||
- "ON" | ||
- "OFF" | ||
exclude: | ||
- cc: gcc-11 | ||
cxx: clang++ | ||
|
@@ -76,55 +73,19 @@ jobs: | |
cc: gcc-11 | ||
- os: macos-14 | ||
mpi: "on" | ||
- os: macos-14 | ||
cxx: g++-11 | ||
- cxx: clang++ | ||
omp: "on" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: actions/checkout@v4 | ||
|
||
# Enable tmate debugging of manually-triggered workflows if the input option was provided | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | ||
|
||
- name: Install Dependencies on Ubunutu | ||
if: ${{ contains(matrix.os, 'ubuntu') }} | ||
run: | | ||
sudo apt update | ||
sudo apt install openmpi-bin libopenmpi-dev ccache casacore-dev | ||
pip install conan | ||
- name: Install Dependencies on MacOS | ||
if: ${{ contains(matrix.os, 'macos') }} | ||
run: | | ||
brew install gcc libtiff open-mpi libomp libyaml ccache conan | ||
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV | ||
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH | ||
- name: Install Tensorflow API on Ubuntu | ||
# TODO could this be combined with mac version somehow? if/else? | ||
if: ${{ contains(matrix.os, 'ubuntu') }} | ||
uses: UCL/install-tensorflow-action@main | ||
with: | ||
version: 2.11.0 | ||
os: linux | ||
|
||
- name: Install Tensorflow API on MacOS | ||
if: ${{ contains(matrix.os, 'macos') }} | ||
uses: UCL/install-tensorflow-action@main | ||
with: | ||
version: 2.11.0 | ||
os: darwin | ||
|
||
- name: Select Python 3.10 | ||
# otherwise turtlebrowser/[email protected] fails on macos-12 | ||
# ref: https://github.com/turtlebrowser/get-conan/issues/4 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Prepare ccache timestamp | ||
id: ccache_cache_timestamp | ||
run: echo "{date_and_time}={$(date +'%Y-%m-%d-%H;%M;%S')}" >> $GITHUB_OUTPUT | ||
|
@@ -145,20 +106,70 @@ jobs: | |
# - name: Clear ccache | ||
# run: ccache --clear | ||
|
||
- name: Build sopt | ||
- name: Install Dependencies on Ubunutu | ||
if: ${{ contains(matrix.os, 'ubuntu') }} | ||
run: | | ||
conan profile detect | ||
conan create ${{github.workspace}}/sopt --build missing -s compiler.cppstd=17 -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} | ||
sudo apt update | ||
sudo apt install openmpi-bin libopenmpi-dev ccache graphviz libeigen3-dev libspdlog-dev libtiff-dev libcfitsio-dev libbenchmark-dev libboost-all-dev libyaml-cpp-dev | ||
- name: Dependencies | ||
run: conan install ${{github.workspace}} -of ${{github.workspace}}/build -s compiler.cppstd=17 --build missing -o docasa=off -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} | ||
- name: Install Dependencies on MacOS | ||
if: ${{ contains(matrix.os, 'macos') }} | ||
run: | | ||
brew install gcc libtiff open-mpi libomp eigen libyaml ccache cfitsio boost yaml-cpp | ||
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV | ||
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH | ||
- name: Checkout Catch2 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: catchorg/Catch2.git | ||
path: Catch2 | ||
ref: v3.4.0 | ||
|
||
- name: Build Catch2 | ||
run: | | ||
mkdir Catch2/build | ||
cd Catch2/build | ||
cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local | ||
make -j$(nproc --ignore 1) install | ||
- name: Install FFTW | ||
run: | | ||
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}}/local --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}}/local/lib*/cmake/*/FFTW3Config.cmake | ||
- name: Checkout SOPT | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: astro-informatics/sopt.git | ||
path: sopt | ||
ref: development | ||
|
||
- name: Build sopt | ||
run: | | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH | ||
mkdir -p ${{github.workspace}}/sopt/build | ||
cd ${{github.workspace}}/sopt/build | ||
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=OFF -Dexamples=OFF | ||
make -j$(nproc --ignore 1) install | ||
- name: Install | ||
# Build your program with the given configuration | ||
run: conan build ${{github.workspace}} -of ${{github.workspace}}/build -s compiler.cppstd=17 -o docasa=off -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} | ||
run: | | ||
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH | ||
mkdir -p ${{github.workspace}}/build | ||
cd ${{github.workspace}}/build | ||
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddocasa=OFF -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} | ||
make -j$(nproc --ignore 1) install | ||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | ||
run: | | ||
export LD_LIBRARY_PATH=${{github.workspace}}/local/lib:${{github.workspace}}/local/external/lib:${LD_LIBRARY_PATH} | ||
ctest -C ${{env.BUILD_TYPE}} --output-on-failure |
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
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.