Skip to content

Add spack installation CI for HIP backend #38

Add spack installation CI for HIP backend

Add spack installation CI for HIP backend #38

Workflow file for this run

# SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
name: CI (spack)
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
backend:
- name: nvcc
image: gcc
kokkos: +cuda +wrapper cuda_arch=90
spack_path: ""
- name: rocm
image: rocm
kokkos: +rocm amdgpu_target=gfx90a
spack_path: spack-configs/rocm
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
large-packages: false
- name: Checkout built branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Clone and install spack
run: |
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
bash -c "git clone --depth=2 --branch=v1.0.1 https://github.com/spack/spack.git"
- name: Configure and build with CMake
run: |
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
bash -c "source spack/share/spack/setup-env.sh && \
cp spack-configs/repos.yaml spack/etc/spack/repos.yaml && \
spack repo update && \
export SPACK_USER_CONFIG_PATH=${{ matrix.backend.spack_path }} && \
spack compiler find && \
spack install kokkos-fft +tests ^kokkos ${{ matrix.backend.kokkos }} && \
spack load kokkos kokkos-fft && \
cmake -B install_test/as_library/build && \
cmake --build install_test/as_library/build -j 4"