@@ -22,58 +22,50 @@ jobs:
22
22
build :
23
23
# Skip CI if PR is a draft
24
24
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}}
30
26
runs-on : ${{matrix.os}}
27
+ container : ${{matrix.container}}
31
28
env :
32
29
CC : ${{ matrix.cc }}
33
30
CXX : ${{ matrix.cxx }}
34
31
strategy :
35
32
fail-fast : false
36
33
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" }
65
44
66
45
steps :
67
46
- uses : actions/checkout@v3
68
- with :
69
- submodules : recursive
70
47
71
48
- name : Install Dependencies on Ubunutu
72
- if : ${{ contains(matrix.os, 'ubuntu') }}
49
+ if : contains(matrix.os, 'ubuntu') && !contains(matrix.container, 'fedora')
73
50
run : |
74
51
sudo apt update
75
52
sudo apt install openmpi-bin libopenmpi-dev libyaml-cpp-dev ccache libeigen3-dev libtiff-dev
76
53
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
+
77
69
- name : Checkout Catch2
78
70
uses : actions/checkout@v4
79
71
with :
88
80
cmake .. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local
89
81
make -j$(nproc --ignore 1) install
90
82
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
-
104
83
# Enable tmate debugging of manually-triggered workflows if the input option was provided
105
84
- name : Setup tmate session
106
85
uses : mxschmitt/action-tmate@v3
116
95
uses : actions/cache@v3
117
96
with :
118
97
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 }}
120
99
restore-keys : |
100
+ ${{ matrix.os }}-${{ matrix.container }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
121
101
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
122
102
${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}
123
103
${{ matrix.os }}-${{ matrix.cxx }}
@@ -128,8 +108,7 @@ jobs:
128
108
# The Github Actions machines are dual-core so we can build faster using 2 parallel processes
129
109
run : |
130
110
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
133
112
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}}
134
113
make -j$(nproc --ignore 1) install
135
114
0 commit comments