|
19 | 19 | OMP_NUM_THREADS: 2
|
20 | 20 |
|
21 | 21 | jobs:
|
22 |
| - build: |
| 22 | + dependencies: |
23 | 23 | # Skip CI if PR is a draft
|
24 | 24 | 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}}) |
26 | 26 | # The CMake configure and build commands are platform agnostic and should work equally
|
27 | 27 | # well on Windows or Mac. You can convert this to a matrix build if you need
|
28 | 28 | # cross-platform coverage.
|
@@ -161,7 +161,7 @@ jobs:
|
161 | 161 |
|
162 | 162 | test:
|
163 | 163 | needs:
|
164 |
| - build |
| 164 | + dependencies |
165 | 165 | name: test (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
|
166 | 166 | runs-on: ${{matrix.os}}
|
167 | 167 | env:
|
@@ -239,9 +239,75 @@ jobs:
|
239 | 239 | export DYLD_LIBRARY_PATH=$(brew --prefix)/lib:${DYLD_LIBRARY_PATH}
|
240 | 240 | ctest -C ${{env.BUILD_TYPE}} --output-on-failure
|
241 | 241 |
|
| 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 | + |
242 | 308 | doc:
|
243 | 309 | needs:
|
244 |
| - build |
| 310 | + dependencies |
245 | 311 | name: doc (${{matrix.os}}-${{matrix.cxx}}-mpi:${{matrix.mpi}}-openmp:${{matrix.omp}})
|
246 | 312 | runs-on: ${{matrix.os}}
|
247 | 313 | env:
|
|
0 commit comments