Skip to content

Commit b3542c6

Browse files
committed
CI: Reenable an NVHPC Test
Update from CentOS to Ubuntu and to a recent version of NVHPC (former: PGI).
1 parent f3e0602 commit b3542c6

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -401,54 +401,55 @@ jobs:
401401
# run: cmake --build build --target test_cmake_build
402402

403403

404-
# Testing on CentOS 7 + PGI compilers, which seems to require more workarounds
405-
centos-nvhpc7:
406-
if: ${{ false }} # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4690
407-
runs-on: ubuntu-latest
408-
name: "🐍 3 • CentOS7 / PGI 22.9 • x64"
409-
container: centos:7
404+
# Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds
405+
ubuntu-nvhpc7:
406+
runs-on: ubuntu-20.04
407+
name: "🐍 3 • NVHPC 23.5 • C++17 • x64"
410408

409+
env:
410+
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
411+
DEBIAN_FRONTEND: 'noninteractive'
411412
steps:
412413
- uses: actions/checkout@v3
413414

414-
- name: Add Python 3 and a few requirements
415-
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 yum-utils
415+
- name: Add NVHPC Repo
416+
run: |
417+
echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \
418+
sudo tee /etc/apt/sources.list.d/nvhpc.list
416419
417-
- name: Install NVidia HPC SDK
418-
run: yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && yum -y install nvhpc-22.9
420+
- name: Install 🐍 3 & NVHPC
421+
run: |
422+
sudo apt-get update -y && \
423+
sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \
424+
sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \
425+
sudo rm -rf /var/lib/apt/lists/*
426+
python3 -m pip install --upgrade pip
427+
python3 -m pip install --upgrade pytest
419428
420-
# On CentOS 7, we have to filter a few tests (compiler internal error)
421-
# and allow deeper template recursion (not needed on CentOS 8 with a newer
422-
# standard library). On some systems, you many need further workarounds:
429+
# On some systems, you many need further workarounds:
423430
# https://github.com/pybind/pybind11/pull/2475
424431
- name: Configure
425432
shell: bash
426433
run: |
427434
source /etc/profile.d/modules.sh
428-
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.9
429-
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
430-
-DCMAKE_CXX_STANDARD=11 \
435+
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5
436+
cmake -S . -B build -DDOWNLOAD_CATCH=ON \
437+
-DCMAKE_CXX_STANDARD=17 \
431438
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
432439
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
433440
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"
434441
435-
# Building before installing Pip should produce a warning but not an error
436442
- name: Build
437-
run: cmake3 --build build -j 2 --verbose
438-
439-
- name: Install CMake with pip
440-
run: |
441-
python3 -m pip install --upgrade pip
442-
python3 -m pip install pytest
443+
run: cmake --build build -j 2 --verbose
443444

444445
- name: Python tests
445-
run: cmake3 --build build --target pytest
446+
run: cmake --build build --target pytest
446447

447448
- name: C++ tests
448-
run: cmake3 --build build --target cpptest
449+
run: cmake --build build --target cpptest
449450

450451
- name: Interface test
451-
run: cmake3 --build build --target test_cmake_build
452+
run: cmake --build build --target test_cmake_build
452453

453454

454455
# Testing on GCC using the GCC docker images (only recent images supported)

0 commit comments

Comments
 (0)