Skip to content

Commit cf91324

Browse files
committed
Add a job to build dependencies and benchmarks
1 parent 6c0fd2d commit cf91324

File tree

1 file changed

+70
-4
lines changed

1 file changed

+70
-4
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ env:
1919
OMP_NUM_THREADS: 2
2020

2121
jobs:
22-
build:
22+
dependencies:
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: dependencies (${{matrix.os}}-${{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.
@@ -161,7 +161,7 @@ jobs:
161161

162162
test:
163163
needs:
164-
build
164+
dependencies
165165
name: test (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
166166
runs-on: ${{matrix.os}}
167167
env:
@@ -239,9 +239,75 @@ jobs:
239239
export DYLD_LIBRARY_PATH=$(brew --prefix)/lib:${DYLD_LIBRARY_PATH}
240240
ctest -C ${{env.BUILD_TYPE}} --output-on-failure
241241
242+
examples_benchmarks:
243+
needs:
244+
dependencies
245+
name: examples_benchmarks (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
246+
runs-on: ${{matrix.os}}
247+
env:
248+
CC: ${{ matrix.cc }}
249+
CXX: ${{ matrix.cxx }}
250+
strategy:
251+
fail-fast: false
252+
matrix:
253+
os:
254+
- ubuntu-22.04
255+
- macos-14
256+
cc:
257+
- gcc-12
258+
- clang
259+
cxx:
260+
- g++-12
261+
- clang++
262+
mpi:
263+
- "ON"
264+
omp:
265+
- "ON"
266+
exclude:
267+
- os: ubuntu-22.04
268+
cc: clang
269+
- os: ubuntu-22.04
270+
cxx: clang++
271+
- os: macos-14
272+
cc: gcc-12
273+
- os: macos-14
274+
cxx: g++-12
275+
276+
- uses: actions/checkout@v4
277+
278+
- uses: actions/download-artifact@v4
279+
with:
280+
name: dependencies-${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.mpi }}-${{ matrix.omp }}
281+
282+
- name: Unpack dependencies
283+
run: tar xfv dependencies.tar
284+
- name: Install Dependencies on Ubunutu
285+
if: ${{ contains(matrix.os, 'ubuntu') }}
286+
run: |
287+
sudo apt update
288+
sudo apt install openmpi-bin libopenmpi-dev ccache graphviz libeigen3-dev libtiff-dev libcfitsio-dev libboost-all-dev libyaml-cpp-dev
289+
290+
- name: Install Dependencies on MacOS
291+
if: ${{ contains(matrix.os, 'macos') }}
292+
run: |
293+
brew install open-mpi libomp eigen ccache cfitsio boost yaml-cpp onnxruntime
294+
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
295+
echo "/opt/homebrew/opt/ccache/libexec" >> $GITHUB_PATH
296+
297+
- name: Build examples
298+
# Build your program with the given configuration
299+
run: |
300+
export CMAKE_PREFIX_PATH=${{github.workspace}}/local:$CMAKE_PREFIX_PATH
301+
#export PATH=${{github.workspace}}/local:$PATH
302+
mkdir -p ${{github.workspace}}/build
303+
cd ${{github.workspace}}/build
304+
cmake .. --fresh -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/local -Donnxrt=ON -Dhdf5=ON -Ddocasa=OFF -Ddompi=${{matrix.mpi}} -Dopenmp=${{matrix.omp}} -Dtests=OFF -Dexamples=ON -Dbenchmarks=ON
305+
make -j$(nproc --ignore 1) install
306+
307+
242308
doc:
243309
needs:
244-
build
310+
dependencies
245311
name: doc (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
246312
runs-on: ${{matrix.os}}
247313
env:

0 commit comments

Comments
 (0)