Skip to content

Commit

Permalink
Add HIP build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Aug 14, 2023
1 parent 53fdc32 commit fd92ca3
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 1 deletion.
102 changes: 102 additions & 0 deletions .github/workflows/CI-e4s-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
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/[email protected]
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"
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 fd92ca3

Please sign in to comment.