diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c1a1a04e7..dcbef9941 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -22,58 +22,50 @@ jobs: build: # Skip CI if PR is a draft if: github.event.pull_request.draft == false - name: ${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}} - # The CMake configure and build commands are platform agnostic and should work equally - # well on Windows or Mac. You can convert this to a matrix build if you need - # cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + name: ${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}} runs-on: ${{matrix.os}} + container: ${{matrix.container}} env: CC: ${{ matrix.cc }} CXX: ${{ matrix.cxx }} strategy: fail-fast: false matrix: - os: - - ubuntu-20.04 - - macos-14 - cc: - - gcc-10 - - clang - cxx: - - g++-10 - - clang++ - mpi: - - "ON" - - "OFF" - omp: - - "ON" - - "OFF" - exclude: - - cc: gcc-10 - cxx: clang++ - - cc: clang - cxx: g++-10 - - os: ubuntu-20.04 - cc: clang - cxx: clang++ - - os: macos-14 - mpi: "ON" - # This doesn't seem to work with ONNXrt yet: - - os: macos-14 - cxx: g++-10 + include: + - { os: ubuntu-20.04, cxx: g++-10, mpi: "ON", omp: "ON" } + - { os: ubuntu-20.04, cxx: g++-10, mpi: "ON", omp: "OFF" } + - { os: ubuntu-20.04, cxx: g++-10, mpi: "OFF", omp: "ON" } + - { os: ubuntu-20.04, cxx: g++-10, mpi: "OFF", omp: "OFF" } + - { os: ubuntu-20.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" } + - { os: macos-14, cxx: clang++, mpi: "ON", omp: "ON" } + - { os: macos-14, cxx: clang++, mpi: "OFF", omp: "OFF" } + #- { os: macos-14, cxx: clang++, mpi: "OFF", omp: "ON" } + #- { os: macos-14, cxx: clang++, mpi: "ON", omp: "OFF" } steps: - uses: actions/checkout@v3 - with: - submodules: recursive - name: Install Dependencies on Ubunutu - if: ${{ contains(matrix.os, 'ubuntu') }} + if: contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora') run: | sudo apt update sudo apt install openmpi-bin libopenmpi-dev libyaml-cpp-dev ccache libeigen3-dev libtiff-dev + - name: Install Dependencies on Fedora + if: ${{ contains(matrix.container, 'fedora') }} + run: | + sudo dnf -y update + sudo dnf -y install cmake gcc gcc-c++ + sudo dnf -y install openmpi openmpi-devel yaml-cpp doxygen graphviz ccache eigen3-devel libtiff-devel git + + - name: Install Dependencies on MacOS + if: ${{ contains(matrix.os, 'macos') }} + run: | + brew install libtiff libomp open-mpi eigen libyaml ccache catch2 + echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV + echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH + #echo "/opt/homebrew/opt/libomp" >> $GITHUB_PATH + - name: Checkout Catch2 uses: actions/checkout@v4 with: @@ -88,19 +80,6 @@ jobs: cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local make -j$(nproc --ignore 1) install - - name: Install Dependencies on MacOS - if: ${{ contains(matrix.os, 'macos') }} - run: | - brew install libtiff libomp open-mpi eigen libyaml ccache catch2 - echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV - echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH - #echo "/opt/homebrew/opt/libomp" >> $GITHUB_PATH - - #- name: Install gcc on MacOS - # if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++10') }} - # run: | - # brew install gcc@10 - # Enable tmate debugging of manually-triggered workflows if the input option was provided - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -116,8 +95,9 @@ jobs: uses: actions/cache@v3 with: path: ${{runner.workspace}}/.ccache - key: ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }} + key: ${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }} restore-keys: | + ${{ matrix.os }}-${{ matrix.container }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }} ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }} ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }} ${{ matrix.os }}-${{ matrix.cxx }} @@ -128,8 +108,7 @@ jobs: # The Github Actions machines are dual-core so we can build faster using 2 parallel processes run: | export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH - mkdir ${{github.workspace}}/build - cd ${{github.workspace}}/build + mkdir build && cd build cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} make -j$(nproc --ignore 1) install diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e93d0eb72..870fb0acb 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -22,8 +22,6 @@ jobs: steps: - name: Check out sopt uses: actions/checkout@v3 - with: - submodules: recursive # Enable tmate debugging of manually-triggered workflows if the input option was provided - name: Setup tmate session @@ -52,9 +50,8 @@ jobs: - name: Build run: | export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH - mkdir ${{github.workspace}}/build - cd ${{github.workspace}}/build - cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Donnxrt=ON + mkdir build && cd build + cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${PWD}/../local -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Donnxrt=ON make -j$(nproc --ignore 1) make -j$(nproc --ignore 1) install