Skip to content

Commit

Permalink
CI: Reenable an NVHPC Test
Browse files Browse the repository at this point in the history
Update from CentOS to Ubuntu and to a recent version
of NVHPC (former: PGI).
  • Loading branch information
ax3l committed Jul 26, 2023
1 parent f3e0602 commit 244c1a2
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,33 +401,38 @@ jobs:
# run: cmake --build build --target test_cmake_build


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

env:
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
DEBIAN_FRONTEND: 'noninteractive'
steps:
- uses: actions/checkout@v3

- name: Add Python 3 and a few requirements
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 yum-utils
- name: Add NVHPC Repo
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
run: yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && yum -y install nvhpc-22.9
- name: Install 🐍 3 & NVHPC
run: |
sudo apt-get update -y && \
sudo apt-get install -y cmake environment-modules git python3-dev python3-pytest python3-numpy && \
sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \
sudo rm -rf /var/lib/apt/lists/*
# On CentOS 7, we have to filter a few tests (compiler internal error)
# and allow deeper template recursion (not needed on CentOS 8 with a newer
# standard library). On some systems, you many need further workarounds:
# On some systems, you many need further workarounds:
# https://github.com/pybind/pybind11/pull/2475
- name: Configure
shell: bash
run: |
source /etc/profile.d/modules.sh
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.9
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=11 \
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5
cmake -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=17 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"
Expand Down

0 comments on commit 244c1a2

Please sign in to comment.