Skip to content

Commit

Permalink
Updated the GitLab CI builds to the latest Docker images.
Browse files Browse the repository at this point in the history
At the same time introduced SYCL builds/tests with an NVIDIA backend
as well.
  • Loading branch information
krasznaa committed Jun 18, 2024
1 parent 5e8af79 commit c9a4dbe
Showing 1 changed file with 53 additions and 20 deletions.
73 changes: 53 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,72 @@
# TRACCC library, part of the ACTS project (R&D line)
#
# (c) 2022-2023 CERN for the benefit of the ACTS project
# (c) 2022-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# The list of build satages.
stages:
- build
- test

# Base job template.
.base_template: &base_job
before_script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- source ./src/.github/ci_setup.sh ${TRACCC_BUILD_TYPE}

build_cuda:
# Build job template.
.build_template: &build_job
<<: *base_job
tags: [docker]
stage: build
image: ghcr.io/acts-project/ubuntu2004_cuda:v30
artifacts:
paths:
- build
script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- cmake --preset cuda -DCMAKE_BUILD_TYPE=Release -S src -B build -G Ninja
- cmake --build build --parallel 2
- cmake --preset ${TRACCC_BUILD_PRESET} -DCMAKE_BUILD_TYPE=Release -S src -B build -G Ninja
- cmake --build build --parallel 2

test_cuda:
stage: test
# Test job template.
.test_template: &test_job
<<: *base_job
tags: [docker-gpu-nvidia]
image: ghcr.io/acts-project/ubuntu2004_cuda:v30
needs:
- build_cuda
stage: test
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- data/traccc_data_get_files.sh
- cd ..
- cd build
- nvidia-smi
- ctest --output-on-failure -E "^SeedingValidation/CompareWithActsSeedingTests.*"
- ./src/data/traccc_data_get_files.sh
- ctest --output-on-failure --test-dir build/

# CUDA build job.
build:cuda:
<<: *build_job
image: ghcr.io/acts-project/ubuntu2004_cuda:47
variables:
TRACCC_BUILD_TYPE: CUDA
TRACCC_BUILD_PRESET: cuda

# CUDA test job.
test:cuda:
<<: *test_job
image: ghcr.io/acts-project/ubuntu2004_cuda:47
variables:
TRACCC_BUILD_TYPE: CUDA
dependencies:
- build:cuda

# SYCL build job (with an NVIDIA backend).
build:sycl_nvidia:
<<: *build_job
image: ghcr.io/acts-project/ubuntu2004_cuda_oneapi:47
variables:
TRACCC_BUILD_TYPE: SYCL
TRACCC_BUILD_PRESET: sycl

# SYCL test job (with an NVIDIA backend).
test:sycl_nvidia:
<<: *test_job
image: ghcr.io/acts-project/ubuntu2004_cuda_oneapi:47
variables:
TRACCC_BUILD_TYPE: SYCL
dependencies:
- build:sycl_nvidia

0 comments on commit c9a4dbe

Please sign in to comment.