Skip to content

Commit 9fe6e32

Browse files
authored
Merge pull request #432 from astro-informatics/cg_fedora_support
Add Fedora image
2 parents 2d7306e + f9d7cba commit 9fe6e32

File tree

2 files changed

+33
-57
lines changed

2 files changed

+33
-57
lines changed

.github/workflows/cmake.yml

Lines changed: 31 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -22,58 +22,50 @@ jobs:
2222
build:
2323
# Skip CI if PR is a draft
2424
if: github.event.pull_request.draft == false
25-
name: ${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}}
26-
# The CMake configure and build commands are platform agnostic and should work equally
27-
# well on Windows or Mac. You can convert this to a matrix build if you need
28-
# cross-platform coverage.
29-
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
25+
name: ${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}}
3026
runs-on: ${{matrix.os}}
27+
container: ${{matrix.container}}
3128
env:
3229
CC: ${{ matrix.cc }}
3330
CXX: ${{ matrix.cxx }}
3431
strategy:
3532
fail-fast: false
3633
matrix:
37-
os:
38-
- ubuntu-20.04
39-
- macos-14
40-
cc:
41-
- gcc-10
42-
- clang
43-
cxx:
44-
- g++-10
45-
- clang++
46-
mpi:
47-
- "ON"
48-
- "OFF"
49-
omp:
50-
- "ON"
51-
- "OFF"
52-
exclude:
53-
- cc: gcc-10
54-
cxx: clang++
55-
- cc: clang
56-
cxx: g++-10
57-
- os: ubuntu-20.04
58-
cc: clang
59-
cxx: clang++
60-
- os: macos-14
61-
mpi: "ON"
62-
# This doesn't seem to work with ONNXrt yet:
63-
- os: macos-14
64-
cxx: g++-10
34+
include:
35+
- { os: ubuntu-20.04, cxx: g++-10, mpi: "ON", omp: "ON" }
36+
- { os: ubuntu-20.04, cxx: g++-10, mpi: "ON", omp: "OFF" }
37+
- { os: ubuntu-20.04, cxx: g++-10, mpi: "OFF", omp: "ON" }
38+
- { os: ubuntu-20.04, cxx: g++-10, mpi: "OFF", omp: "OFF" }
39+
- { os: ubuntu-20.04, container: "fedora:39", cxx: g++, mpi: "OFF", omp: "ON" }
40+
- { os: macos-14, cxx: clang++, mpi: "ON", omp: "ON" }
41+
- { os: macos-14, cxx: clang++, mpi: "OFF", omp: "OFF" }
42+
#- { os: macos-14, cxx: clang++, mpi: "OFF", omp: "ON" }
43+
#- { os: macos-14, cxx: clang++, mpi: "ON", omp: "OFF" }
6544

6645
steps:
6746
- uses: actions/checkout@v3
68-
with:
69-
submodules: recursive
7047

7148
- name: Install Dependencies on Ubunutu
72-
if: ${{ contains(matrix.os, 'ubuntu') }}
49+
if: contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
7350
run: |
7451
sudo apt update
7552
sudo apt install openmpi-bin libopenmpi-dev libyaml-cpp-dev ccache libeigen3-dev libtiff-dev
7653
54+
- name: Install Dependencies on Fedora
55+
if: ${{ contains(matrix.container, 'fedora') }}
56+
run: |
57+
sudo dnf -y update
58+
sudo dnf -y install cmake gcc gcc-c++
59+
sudo dnf -y install openmpi openmpi-devel yaml-cpp doxygen graphviz ccache eigen3-devel libtiff-devel git
60+
61+
- name: Install Dependencies on MacOS
62+
if: ${{ contains(matrix.os, 'macos') }}
63+
run: |
64+
brew install libtiff libomp open-mpi eigen libyaml ccache catch2
65+
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
66+
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
67+
#echo "/opt/homebrew/opt/libomp" >> $GITHUB_PATH
68+
7769
- name: Checkout Catch2
7870
uses: actions/checkout@v4
7971
with:
@@ -88,19 +80,6 @@ jobs:
8880
cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local
8981
make -j$(nproc --ignore 1) install
9082
91-
- name: Install Dependencies on MacOS
92-
if: ${{ contains(matrix.os, 'macos') }}
93-
run: |
94-
brew install libtiff libomp open-mpi eigen libyaml ccache catch2
95-
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
96-
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
97-
#echo "/opt/homebrew/opt/libomp" >> $GITHUB_PATH
98-
99-
#- name: Install gcc on MacOS
100-
# if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++10') }}
101-
# run: |
102-
# brew install gcc@10
103-
10483
# Enable tmate debugging of manually-triggered workflows if the input option was provided
10584
- name: Setup tmate session
10685
uses: mxschmitt/action-tmate@v3
@@ -116,8 +95,9 @@ jobs:
11695
uses: actions/cache@v3
11796
with:
11897
path: ${{runner.workspace}}/.ccache
119-
key: ${{matrix.os}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
98+
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.cxx}}-${{matrix.mpi}}-${{matrix.omp}}-${{ steps.ccache_cache_timestamp.outputs.date_and_time }}
12099
restore-keys: |
100+
${{ matrix.os }}-${{ matrix.container }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
121101
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
122102
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
123103
${{ matrix.os }}-${{ matrix.cxx }}
@@ -128,8 +108,7 @@ jobs:
128108
# The Github Actions machines are dual-core so we can build faster using 2 parallel processes
129109
run: |
130110
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
131-
mkdir ${{github.workspace}}/build
132-
cd ${{github.workspace}}/build
111+
mkdir build && cd build
133112
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}}
134113
make -j$(nproc --ignore 1) install
135114

.github/workflows/documentation.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
steps:
2323
- name: Check out sopt
2424
uses: actions/checkout@v3
25-
with:
26-
submodules: recursive
2725

2826
# Enable tmate debugging of manually-triggered workflows if the input option was provided
2927
- name: Setup tmate session
@@ -52,9 +50,8 @@ jobs:
5250
- name: Build
5351
run: |
5452
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
55-
mkdir ${{github.workspace}}/build
56-
cd ${{github.workspace}}/build
57-
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Donnxrt=ON
53+
mkdir build && cd build
54+
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${PWD}/../local -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Donnxrt=ON
5855
make -j$(nproc --ignore 1)
5956
make -j$(nproc --ignore 1) install
6057

0 commit comments

Comments
 (0)