diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3348b91c..10bfd2d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,12 +22,13 @@ jobs: build: # Skip CI if PR is a draft if: github.event.pull_request.draft == false - name: build (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}}) + name: build (${{matrix.os}}-${{matrix.container}}-${{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 runs-on: ${{matrix.os}} + container: ${{matrix.container}} env: CXX: ${{ matrix.cxx }} strategy: @@ -49,6 +50,8 @@ jobs: - { os: ubuntu-22.04, cxx: clang++ } - { os: macos-14, cxx: g++ } - { os: macos-14, mpi: "ON"} + include: + - { os: ubuntu-22.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" } steps: - uses: actions/checkout@v4 @@ -67,8 +70,9 @@ jobs: uses: actions/cache@v4 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 }} @@ -78,11 +82,18 @@ jobs: # run: ccache --clear - 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 libeigen3-dev libtiff-dev ccache + - 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 ccache eigen3-devel libtiff-devel git + - name: Install Dependencies on MacOS if: ${{ contains(matrix.os, 'macos') }} run: | @@ -142,8 +153,9 @@ jobs: test: needs: build - name: test (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}}) + name: test (${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}}) runs-on: ${{matrix.os}} + container: ${{matrix.container}} env: CXX: ${{ matrix.cxx }} strategy: @@ -165,22 +177,32 @@ jobs: - { os: ubuntu-22.04, cxx: clang++ } - { os: macos-14, cxx: g++ } - { os: macos-14, mpi: "ON"} + include: + - { os: ubuntu-22.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" } + steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: dependencies-${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }} + name: dependencies-${{ matrix.os }}-${{matrix.container}}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }} - name: Unpack dependencies run: tar xfv dependencies.tar - 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 ccache graphviz libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-dev + sudo apt install openmpi-bin libopenmpi-dev ccache libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-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 ccache eigen3-devel libtiff-devel cfitsio-devel boost-devel + - name: Install Dependencies on MacOS if: ${{ contains(matrix.os, 'macos') }} run: |