Skip to content

Commit

Permalink
add CUDA-12 to CI
Browse files Browse the repository at this point in the history
	modified:   .github/workflows/cuda11-build.yml
	new file:   .github/workflows/cuda12-build.yml
  • Loading branch information
Sajid Ali committed Apr 12, 2024
1 parent 0e06720 commit efb479a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cuda11-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
debug_cmake_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
description: 'tmate before cmake'
required: false
default: false
push:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/cuda12-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI:cuda12-gcc

on:
workflow_dispatch:
inputs:
debug_cmake_enabled:
description: 'tmate before cmake'
required: false
default: false
push:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'
pull_request:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'

env:
BUILD_TYPE: RelWithDebInfo

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/fnalacceleratormodeling/synergia2-containers/cuda-12:main

steps:
- name: Cancel Previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'

# Debug: checkpoint at which to open tmate session
- name: cuda11 pre CMake
uses: mxschmitt/action-tmate@v3
if: ${{github.event_name == 'workflow_dispatch' && github.event.inputs.debug_cmake_enabled }}
with:
sudo: false

- name: CMake
run: |
lscpu
. /opt/spack-environment/activate.sh
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install \
-DBUILD_PYTHON_BINDINGS=on -DPYTHON_EXECUTABLE=$(which python3) \
-DENABLE_KOKKOS_BACKEND=CUDA \
-DKokkos_ARCH_VOLTA70=ON \
-DBUILD_FD_SPACE_CHARGE_SOLVER=ON \
-DUSE_OPENPMD_IO=ON \
-DUSE_EXTERNAL_KOKKOS=OFF -GNinja
- name: build
# build synergia2
run: |
. /opt/spack-environment/activate.sh
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 2
- name: install
# install synergia2
run: |
. /opt/spack-environment/activate.sh
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

0 comments on commit efb479a

Please sign in to comment.