Skip to content

Commit 58d42d4

Browse files
authored
CUDA CI: Ubuntu 20.04+ (#3496)
Migrate CUDA CI to use Ubuntu 18.04 -> 20.04
1 parent 663e7f6 commit 58d42d4

File tree

3 files changed

+72
-9
lines changed

3 files changed

+72
-9
lines changed

.github/workflows/cuda.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
# https://github.com/ComputationalRadiationPhysics/picongpu/blob/0.5.0/share/picongpu/dockerfiles/ubuntu-1604/Dockerfile
1313
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
1414
build_nvcc:
15-
name: NVCC 11.0.2 SP
16-
runs-on: ubuntu-18.04
15+
name: NVCC 11.0.3 SP
16+
runs-on: ubuntu-20.04
1717
if: github.event.pull_request.draft == false
1818
env:
1919
CXXFLAGS: "-Werror"
@@ -30,7 +30,7 @@ jobs:
3030
python-version: '3.x'
3131
- name: install dependencies
3232
run: |
33-
.github/workflows/dependencies/nvcc11.sh
33+
.github/workflows/dependencies/nvcc11-0.sh
3434
- name: CCache Cache
3535
uses: actions/cache@v2
3636
# - once stored under a key, they become immutable (even if local cache path content changes)
@@ -83,14 +83,14 @@ jobs:
8383
# make sure legacy build system continues to build, i.e., that we don't forget
8484
# to add new .cpp files
8585
build_nvcc_gnumake:
86-
name: NVCC 11.0.2 GNUmake
87-
runs-on: ubuntu-18.04
86+
name: NVCC 11.8.0 GNUmake
87+
runs-on: ubuntu-20.04
8888
if: github.event.pull_request.draft == false
8989
steps:
9090
- uses: actions/checkout@v2
9191
- name: install dependencies
9292
run: |
93-
.github/workflows/dependencies/nvcc11.sh
93+
.github/workflows/dependencies/nvcc11-8.sh
9494
- name: CCache Cache
9595
uses: actions/cache@v2
9696
# - once stored under a key, they become immutable (even if local cache path content changes)

.github/workflows/dependencies/nvcc11.sh renamed to .github/workflows/dependencies/nvcc11-0.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2020 The WarpX Community
3+
# Copyright 2020-2022 The WarpX Community
44
#
55
# License: BSD-3-Clause-LBNL
66
# Authors: Axel Huebl
@@ -21,8 +21,10 @@ sudo apt-get install -y \
2121
pkg-config \
2222
wget
2323

24-
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
25-
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" \
24+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
25+
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
26+
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
27+
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" \
2628
| sudo tee /etc/apt/sources.list.d/cuda.list
2729

2830
sudo apt-get update
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2020-2022 The WarpX Community
4+
#
5+
# License: BSD-3-Clause-LBNL
6+
# Authors: Axel Huebl
7+
8+
set -eu -o pipefail
9+
10+
sudo apt-get -qqq update
11+
sudo apt-get install -y \
12+
build-essential \
13+
ca-certificates \
14+
cmake \
15+
gnupg \
16+
libhiredis-dev \
17+
libopenmpi-dev \
18+
libzstd-dev \
19+
ninja-build \
20+
openmpi-bin \
21+
pkg-config \
22+
wget
23+
24+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
25+
sudo dpkg -i cuda-keyring_1.0-1_all.deb
26+
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
cuda-command-line-tools-11-8 \
30+
cuda-compiler-11-8 \
31+
cuda-cupti-dev-11-8 \
32+
cuda-minimal-build-11-8 \
33+
cuda-nvml-dev-11-8 \
34+
cuda-nvtx-11-8 \
35+
libcufft-dev-11-8 \
36+
libcurand-dev-11-8
37+
sudo ln -s cuda-11.8 /usr/local/cuda
38+
39+
# if we run out of temporary storage in CI:
40+
#du -sh /usr/local/cuda-11.8
41+
#echo "+++ REDUCING CUDA Toolkit install size +++"
42+
#sudo rm -rf /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcu{fft,pti,rand}_static.a
43+
#sudo rm -rf /usr/local/cuda-11.8/targets/x86_64-linux/lib/libnvperf_host_static.a
44+
#du -sh /usr/local/cuda-11.8/
45+
#df -h
46+
47+
# cmake-easyinstall
48+
#
49+
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
50+
sudo chmod a+x /usr/local/bin/cmake-easyinstall
51+
export CEI_SUDO="sudo"
52+
export CEI_TMP="/tmp/cei"
53+
54+
# ccache 4.2+
55+
#
56+
CXXFLAGS="" cmake-easyinstall --prefix=/usr/local \
57+
git+https://github.com/ccache/[email protected] \
58+
-DCMAKE_BUILD_TYPE=Release \
59+
-DENABLE_DOCUMENTATION=OFF \
60+
-DENABLE_TESTING=OFF \
61+
-DWARNINGS_AS_ERRORS=OFF

0 commit comments

Comments
 (0)