-
Notifications
You must be signed in to change notification settings - Fork 21
56 lines (49 loc) · 2.01 KB
/
cuda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: 🐧 CUDA
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-cuda
cancel-in-progress: true
jobs:
# Ref.:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/ubuntu18.04/10.1/base/Dockerfile
# https://github.com/ComputationalRadiationPhysics/picongpu/blob/0.5.0/share/picongpu/dockerfiles/ubuntu-1604/Dockerfile
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
build_nvcc:
name: NVCC 11.3.1 SP
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/nvcc11-openmpi.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-cuda-nvcc-${{ hashFiles('.github/workflows/cuda.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-cuda-nvcc-${{ hashFiles('.github/workflows/cuda.yml') }}-
ccache-cuda-nvcc-
- name: build ImpactX
run: |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_COMPUTE=CUDA \
-DImpactX_FFT=ON \
-DImpactX_PYTHON=ON \
-DAMReX_CUDA_ARCH=6.0 \
-DImpactX_PRECISION=SINGLE \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build -j 4