Skip to content

Commit

Permalink
ci: added rocm gha build
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jun 25, 2024
1 parent 0e85021 commit 248f8e4
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ jobs:
compiler: gcc8
shared: static
parallel: serial
- os: ubuntu20.04
compiler: rocm
parallel: serial
constrains: build_only
steps:
- uses: actions/checkout@v4
with:
Expand Down
39 changes: 39 additions & 0 deletions scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)

execute_process(
COMMAND "python3-config" "--prefix"
OUTPUT_VARIABLE PY_ROOT
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
ADIOS2_USE_ZeroMQ:STRING=ON
ADIOS2_USE_ZFP:BOOL=ON
ADIOS2_USE_Kokkos:BOOL=ON
Python_ROOT_DIR:PATH=${PY_ROOT}
Python_FIND_STRATEGY:STRING=LOCATION
Python_FIND_FRAMEWORK:STRING=FIRST
CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
CMAKE_C_FLAGS:STRING=-Wall
CMAKE_CXX_FLAGS:STRING=-Wall
CMAKE_Fortran_FLAGS:STRING=-Wall
")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
7 changes: 4 additions & 3 deletions scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01

ARG E4S_VERSION=23.08
ARG EXTRA_VARIANTS

# Clone and patch spack
RUN cd / && \
Expand All @@ -16,9 +17,9 @@ RUN cd spack && \
git apply 0001-mpich-support-ch3-sock.patch && \
. /spack/share/spack/setup-env.sh && \
spack mirror add E4S "https://cache.e4s.io/${E4S_VERSION}" && \
export ADIOS_SPEC_NO_MPI="adios2~mpi" && \
export ADIOS_SPEC_OPENMPI="adios2+mpi^openmpi" && \
export ADIOS_SPEC_MPICH="adios2+mpi^mpich" && \
export ADIOS_SPEC_NO_MPI="adios2~mpi${EXTRA_VARIANTS}" && \
export ADIOS_SPEC_OPENMPI="adios2+mpi${EXTRA_VARIANTS}^openmpi" && \
export ADIOS_SPEC_MPICH="adios2+mpi${EXTRA_VARIANTS}^mpich" && \
spack config add "config:checksum:false" && \
spack config add "config:build_jobs:$(nproc)" && \
spack config add "concretizer:unify:true" && \
Expand Down
9 changes: 9 additions & 0 deletions scripts/ci/images/build-rocm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -ex

# Build the base image
docker build --rm --build-arg EXTRA_VARIANT="+rocm+kokkos^rocm@6.1^kokkos@4.3" -f ./Dockerfile.ci-spack-ubuntu20.04-base -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm .

# Push images to github container registry
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm

0 comments on commit 248f8e4

Please sign in to comment.