CI: Reenable an NVHPC Test (#4764)

Update from CentOS to Ubuntu and to a recent version
of NVHPC (former: PGI).

Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
This commit is contained in:
Axel Huebl 2023-08-04 11:17:33 -07:00 committed by GitHub
parent f8703154ec
commit 824dc27a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,54 +404,55 @@ jobs:
# run: cmake --build build --target test_cmake_build # run: cmake --build build --target test_cmake_build
# Testing on CentOS 7 + PGI compilers, which seems to require more workarounds # Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds
centos-nvhpc7: ubuntu-nvhpc7:
if: ${{ false }} # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4690 runs-on: ubuntu-20.04
runs-on: ubuntu-latest name: "🐍 3 • NVHPC 23.5 • C++17 • x64"
name: "🐍 3 • CentOS7 / PGI 22.9 • x64"
container: centos:7
env:
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
DEBIAN_FRONTEND: 'noninteractive'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Add Python 3 and a few requirements - name: Add NVHPC Repo
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 yum-utils run: |
echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \
sudo tee /etc/apt/sources.list.d/nvhpc.list
- name: Install NVidia HPC SDK - name: Install 🐍 3 & NVHPC
run: yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && yum -y install nvhpc-22.9 run: |
sudo apt-get update -y && \
sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \
sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \
sudo rm -rf /var/lib/apt/lists/*
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest
# On CentOS 7, we have to filter a few tests (compiler internal error) # On some systems, you many need further workarounds:
# and allow deeper template recursion (not needed on CentOS 8 with a newer
# standard library). On some systems, you many need further workarounds:
# https://github.com/pybind/pybind11/pull/2475 # https://github.com/pybind/pybind11/pull/2475
- name: Configure - name: Configure
shell: bash shell: bash
run: | run: |
source /etc/profile.d/modules.sh source /etc/profile.d/modules.sh
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.9 module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ cmake -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD=17 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"
# Building before installing Pip should produce a warning but not an error
- name: Build - name: Build
run: cmake3 --build build -j 2 --verbose run: cmake --build build -j 2 --verbose
- name: Install CMake with pip
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pytest
- name: Python tests - name: Python tests
run: cmake3 --build build --target pytest run: cmake --build build --target pytest
- name: C++ tests - name: C++ tests
run: cmake3 --build build --target cpptest run: cmake --build build --target cpptest
- name: Interface test - name: Interface test
run: cmake3 --build build --target test_cmake_build run: cmake --build build --target test_cmake_build
# Testing on GCC using the GCC docker images (only recent images supported) # Testing on GCC using the GCC docker images (only recent images supported)