diff options
| author | Maxandre Ogeret <22786578+MaxandreOgeret@users.noreply.github.com> | 2025-05-18 17:22:48 +0000 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-05-29 14:30:34 -0400 |
| commit | 7d567901de40a6a0e837dc49de9662998df46424 (patch) | |
| tree | 4e74b5a96f8c1b00aafe3ebc32846f4a7cd096ad /ci | |
| parent | 606ccedddc9c0284d0b0c3f3947ea1ee77a972c5 (diff) | |
| download | meson-7d567901de40a6a0e837dc49de9662998df46424.tar.gz | |
cuda: add cross-cuda test
Diffstat (limited to 'ci')
| -rw-r--r-- | ci/ciimage/cuda-cross/image.json | 8 | ||||
| -rwxr-xr-x | ci/ciimage/cuda-cross/install.sh | 38 |
2 files changed, 46 insertions, 0 deletions
diff --git a/ci/ciimage/cuda-cross/image.json b/ci/ciimage/cuda-cross/image.json new file mode 100644 index 000000000..062322ec8 --- /dev/null +++ b/ci/ciimage/cuda-cross/image.json @@ -0,0 +1,8 @@ +{ + "base_image": "ubuntu:22.04", + "args": ["--only", "cuda", "--cross", "cuda-cross.json"], + "env": { + "CI": "1", + "MESON_CI_JOBNAME": "linux-cuda-cross" + } +} diff --git a/ci/ciimage/cuda-cross/install.sh b/ci/ciimage/cuda-cross/install.sh new file mode 100755 index 000000000..6b5fe7f2b --- /dev/null +++ b/ci/ciimage/cuda-cross/install.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e + +source /ci/common.sh + +export DEBIAN_FRONTEND=noninteractive +export LANG='C.UTF-8' + +apt-get -y update +apt-get -y upgrade +apt-get -y install wget + +# Cuda repo + keyring. +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb +apt-get -y install ./cuda-keyring_1.1-1_all.deb + +# Cuda cross repo. +echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/cross-linux-aarch64/ /" \ + > /etc/apt/sources.list.d/cuda-ubuntu2204-cross-linux-aarch64.list +apt-get -y update + +pkgs=( + clang cmake crossbuild-essential-arm64 cuda-cross-aarch64 + cuda-nvcc-12-9 git libglib2.0-dev ninja-build pkg-config python3-pip +) + +apt-get -y install "${pkgs[@]}" + +install_minimal_python_packages + +# Tests need nvcc in PATH in order to run cuda tests. +echo "export PATH=\$PATH:/usr/local/cuda/bin" >> /ci/env_vars.sh + +# cleanup +apt-get -y clean +apt-get -y autoclean +rm cuda-keyring_1.1-1_all.deb |
