Skip to content

Commit

Permalink
Merge pull request #45 from streeve/hip_ci
Browse files Browse the repository at this point in the history
Add HIP build CI
  • Loading branch information
streeve committed Aug 15, 2023
2 parents 95d04a0 + 04cc47a commit 3b299c4
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 1 deletion.
103 changes: 103 additions & 0 deletions .github/workflows/CI-e4s-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: e4s-build
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
HIP:
defaults:
run:
shell: bash
strategy:
matrix:
cxx: ['hipcc']
cmake_build_type: ['Release']
kokkos_ver: ['3.6.01']
runs-on: ubuntu-20.04
container: docker.io/ecpe4s/e4s-base-rocm:23.05
steps:
- name: Checkout GTest
uses: actions/checkout@v3
with:
repository: google/googletest
ref: release-1.11.0
path: gtest
- name: Build gtest
working-directory: gtest
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/gtest \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout json
uses: actions/checkout@v3
with:
repository: nlohmann/json
ref: v3.11.2
path: json
- name: Build json
working-directory: json
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/json \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DJSON_BuildTests=OFF
cmake --build build --parallel 2
cmake --install build
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DKokkos_ENABLE_HIP=ON \
-DKokkos_ARCH_VEGA908=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v2.2.0
with:
repository: ECP-CoPA/Cabana
# This version is post-release 0.5
ref: 4fdb7eeb3ea32557444766a917fb9252af8540d6
path: cabana
- name: Build Cabana
working-directory: cabana
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DCMAKE_PREFIX_PATH="$HOME/kokkos" \
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout CabanaPD
uses: actions/checkout@v3
- name: Build CabanaPD
run: |
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D CMAKE_INSTALL_PREFIX=$HOME/CabanaPD \
-D CMAKE_PREFIX_PATH="$HOME/Cabana;$HOME/gtest;$HOME/json" \
-D MPIEXEC_MAX_NUMPROCS=2 \
-D MPIEXEC_PREFLAGS="--oversubscribe" \
-D CabanaPD_ENABLE_TESTING=ON
cmake --build build --parallel 2
cmake --install build
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches:
- main

concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
CI:
defaults:
Expand Down

0 comments on commit 3b299c4

Please sign in to comment.