Skip to content

Commit 80761b1

Browse files
committed
Add fedora job to matrix
1 parent f28c476 commit 80761b1

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ 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:
@@ -49,6 +50,8 @@ jobs:
4950
- { os: ubuntu-22.04, cxx: clang++ }
5051
- { os: macos-14, cxx: g++ }
5152
- { os: macos-14, mpi: "ON"}
53+
include:
54+
- { os: ubuntu-22.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" }
5255
steps:
5356
- uses: actions/checkout@v4
5457

@@ -67,8 +70,9 @@ jobs:
6770
uses: actions/cache@v4
6871
with:
6972
path: ${{runner.workspace}}/.ccache
70-
key: ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
73+
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
7174
restore-keys: |
75+
${{ matrix.os }}-${{matrix.container}}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
7276
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
7377
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
7478
${{ matrix.os }}-${{ matrix.cxx }}
@@ -78,11 +82,18 @@ jobs:
7882
# run: ccache --clear
7983

8084
- name: Install Dependencies on Ubunutu
81-
if: ${{ contains(matrix.os, 'ubuntu') }}
85+
if: contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
8286
run: |
8387
sudo apt update
8488
sudo apt install openmpi-bin libopenmpi-dev libyaml-cpp-dev libeigen3-dev libtiff-dev ccache
8589
90+
- name: Install Dependencies on Fedora
91+
if: ${{ contains(matrix.container, 'fedora') }}
92+
run: |
93+
sudo dnf -y update
94+
sudo dnf -y install cmake gcc gcc-c++
95+
sudo dnf -y install openmpi openmpi-devel yaml-cpp ccache eigen3-devel libtiff-devel git
96+
8697
- name: Install Dependencies on MacOS
8798
if: ${{ contains(matrix.os, 'macos') }}
8899
run: |
@@ -142,8 +153,9 @@ jobs:
142153
test:
143154
needs:
144155
build
145-
name: test (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
156+
name: test (${{matrix.os}}-${{os.container}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
146157
runs-on: ${{matrix.os}}
158+
container: ${{matrix.container}}
147159
env:
148160
CXX: ${{ matrix.cxx }}
149161
strategy:
@@ -165,6 +177,9 @@ jobs:
165177
- { os: ubuntu-22.04, cxx: clang++ }
166178
- { os: macos-14, cxx: g++ }
167179
- { os: macos-14, mpi: "ON"}
180+
include:
181+
- { os: ubuntu-22.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" }
182+
168183
steps:
169184
- uses: actions/checkout@v4
170185

@@ -176,11 +191,18 @@ jobs:
176191
run: tar xfv dependencies.tar
177192

178193
- name: Install Dependencies on Ubunutu
179-
if: ${{ contains(matrix.os, 'ubuntu') }}
194+
if: contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
180195
run: |
181196
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
197+
sudo apt install openmpi-bin libopenmpi-dev ccache libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-dev
183198
199+
- name: Install Dependencies on Fedora
200+
if: ${{ contains(matrix.container, 'fedora') }}
201+
run: |
202+
sudo dnf -y update
203+
sudo dnf -y install cmake gcc gcc-c++
204+
sudo dnf -y install openmpi openmpi-devel yaml-cpp ccache eigen3-devel libtiff-devel cfitsio-devel boost-devel
205+
184206
- name: Install Dependencies on MacOS
185207
if: ${{ contains(matrix.os, 'macos') }}
186208
run: |

0 commit comments

Comments
 (0)