Skip to content

Commit c1ec356

Browse files
yasahi-hpcyasahi-hpc
andauthored
Add spack installation CI for CUDA backend (#312)
* Add spack installation CI * check python is available or not * disable spack AMD build * spack load kokkos and kokkos-fft * remove dependency to fortran * update spack CI workflow based on the review * Add dependency to gfortran for the moment * remove rocm recipe in spack-test * Compile kokkos-fft tests with spack --------- Co-authored-by: yasahi-hpc <[email protected]>
1 parent 01078d0 commit c1ec356

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/spack-test.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file
2+
#
3+
# SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
4+
5+
name: CI (spack)
6+
7+
on:
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
backend:
17+
- name: nvcc
18+
image: gcc
19+
kokkos: +cuda +wrapper cuda_arch=90
20+
21+
steps:
22+
- name: Free Disk Space (Ubuntu)
23+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
24+
with:
25+
tool-cache: true
26+
large-packages: false
27+
28+
- name: Checkout built branch
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
31+
- name: Clone and install spack
32+
run: |
33+
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
34+
bash -c "git clone --depth=2 --branch=v1.0.1 https://github.com/spack/spack.git"
35+
36+
- name: Configure and build with CMake
37+
run: |
38+
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
39+
bash -c "source spack/share/spack/setup-env.sh && \
40+
spack install kokkos-fft +tests ^kokkos ${{ matrix.backend.kokkos }} && \
41+
spack load kokkos kokkos-fft && \
42+
cmake -B install_test/as_library/build && \
43+
cmake --build install_test/as_library/build -j 4"
44+

docker/gcc/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y \
1313
bc \
1414
ccache \
1515
libfftw3-dev \
16+
python3 \
17+
gfortran \
1618
&& \
1719
apt-get clean && \
1820
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)