@@ -22,33 +22,26 @@ jobs:
2222 build :
2323 # Skip CI if PR is a draft
2424 if : github.event.pull_request.draft == false
25- name : build (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
25+ name : build (${{matrix.os}}-${{matrix.container}}-${{matrix. cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
2626 # The CMake configure and build commands are platform agnostic and should work equally
2727 # well on Windows or Mac. You can convert this to a matrix build if you need
2828 # cross-platform coverage.
2929 # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
3030 runs-on : ${{matrix.os}}
31+ container : ${{matrix.container}}
3132 env :
3233 CXX : ${{ matrix.cxx }}
3334 strategy :
3435 fail-fast : false
3536 matrix :
36- os :
37- - ubuntu-22.04
38- - macos-14
39- cxx :
40- - g++
41- - clang++
42- mpi :
43- - " ON"
44- - " OFF"
45- omp :
46- - " ON"
47- - " OFF"
48- exclude :
49- - { os: ubuntu-22.04, cxx: clang++ }
50- - { os: macos-14, cxx: g++ }
51- - { os: macos-14, mpi: "ON"}
37+ include :
38+ - { os: ubuntu-22.04, cxx: g++, mpi: "ON", omp: "ON" }
39+ - { os: ubuntu-22.04, cxx: g++, mpi: "ON", omp: "OFF" }
40+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "ON" }
41+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "OFF" }
42+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "ON", container: "fedora:39" }
43+ - { os: macos-14, cxx: clang++, mpi: "ON", omp: "ON" }
44+ - { os: macos-14, cxx: clang++, mpi: "OFF", omp: "OFF" }
5245 steps :
5346 - uses : actions/checkout@v4
5447
6760 uses : actions/cache@v4
6861 with :
6962 path : ${{runner.workspace}}/.ccache
70- key : ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
63+ key : ${{matrix.os}}-${{matrix.container}}-${{matrix. cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
7164 restore-keys : |
65+ ${{ matrix.os }}-${{matrix.container}}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
7266 ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
7367 ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
7468 ${{ matrix.os }}-${{ matrix.cxx }}
@@ -78,11 +72,18 @@ jobs:
7872# run: ccache --clear
7973
8074 - name : Install Dependencies on Ubunutu
81- if : ${{ contains(matrix.os, 'ubuntu') }}
75+ if : contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
8276 run : |
8377 sudo apt update
8478 sudo apt install openmpi-bin libopenmpi-dev libyaml-cpp-dev libeigen3-dev libtiff-dev ccache
8579
80+ - name : Install Dependencies on Fedora
81+ if : ${{ contains(matrix.container, 'fedora') }}
82+ run : |
83+ sudo dnf -y update
84+ sudo dnf -y install cmake gcc gcc-c++ wget
85+ sudo dnf -y install openmpi openmpi-devel yaml-cpp ccache eigen3-devel libtiff-devel git
86+
8687 - name : Install Dependencies on MacOS
8788 if : ${{ contains(matrix.os, 'macos') }}
8889 run : |
@@ -142,44 +143,45 @@ jobs:
142143 test :
143144 needs :
144145 build
145- name : test (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
146+ name : test (${{matrix.os}}-${{matrix.container}}-${{matrix. cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
146147 runs-on : ${{matrix.os}}
148+ container : ${{matrix.container}}
147149 env :
148150 CXX : ${{ matrix.cxx }}
149151 strategy :
150152 fail-fast : false
151153 matrix :
152- os :
153- - ubuntu-22.04
154- - macos-14
155- cxx :
156- - g++
157- - clang++
158- mpi :
159- - " ON"
160- - " OFF"
161- omp :
162- - " ON"
163- - " OFF"
164- exclude :
165- - { os: ubuntu-22.04, cxx: clang++ }
166- - { os: macos-14, cxx: g++ }
167- - { os: macos-14, mpi: "ON"}
154+ include :
155+ - { os: ubuntu-22.04, cxx: g++, mpi: "ON", omp: "ON" }
156+ - { os: ubuntu-22.04, cxx: g++, mpi: "ON", omp: "OFF" }
157+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "ON" }
158+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "OFF" }
159+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "ON", container: "fedora:39" }
160+ - { os: macos-14, cxx: clang++, mpi: "ON", omp: "ON" }
161+ - { os: macos-14, cxx: clang++, mpi: "OFF", omp: "OFF" }
162+
168163 steps :
169164 - uses : actions/checkout@v4
170165
171166 - uses : actions/download-artifact@v4
172167 with :
173- name : dependencies-${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
168+ name : dependencies-${{ matrix.os }}-${{matrix.container}}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
174169
175170 - name : Unpack dependencies
176171 run : tar xfv dependencies.tar
177172
178173 - name : Install Dependencies on Ubunutu
179- if : ${{ contains(matrix.os, 'ubuntu') }}
174+ if : contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
180175 run : |
181176 sudo apt update
182- sudo apt install openmpi-bin libopenmpi-dev ccache graphviz libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-dev
177+ sudo apt install openmpi-bin libopenmpi-dev ccache libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-dev
178+
179+ - name : Install Dependencies on Fedora
180+ if : ${{ contains(matrix.container, 'fedora') }}
181+ run : |
182+ sudo dnf -y update
183+ sudo dnf -y install cmake gcc gcc-c++
184+ sudo dnf -y install openmpi openmpi-devel yaml-cpp ccache eigen3-devel libtiff-devel cfitsio-devel boost-devel
183185
184186 - name : Install Dependencies on MacOS
185187 if : ${{ contains(matrix.os, 'macos') }}
@@ -215,14 +217,8 @@ jobs:
215217 strategy :
216218 fail-fast : false
217219 matrix :
218- os :
219- - ubuntu-22.04
220- cxx :
221- - g++
222- mpi :
223- - " OFF"
224- omp :
225- - " OFF"
220+ include :
221+ - { os: ubuntu-22.04, cxx: g++, mpi: "OFF", omp: "OFF" }
226222 steps :
227223 - uses : actions/checkout@v4
228224
0 commit comments