Skip to content

Commit

Permalink
Add fedora job to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoskela committed Nov 28, 2024
1 parent f28c476 commit 8c80cde
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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 }}
Expand All @@ -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: |
Expand Down Expand Up @@ -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:
Expand All @@ -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: |
Expand Down

0 comments on commit 8c80cde

Please sign in to comment.