Skip to content

additional throw away code for ref #163

additional throw away code for ref

additional throw away code for ref #163

Workflow file for this run

name: ci-linux
on:
push:
tags-ignore:
- v*.*
branches:
- '*'
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
setup:
runs-on: ubuntu-22.04
outputs:
cache-hit: ${{ steps.cache-compilers.outputs.cache-hit }}
strategy:
fail-fast: false
matrix:
nvhpc: [ 23.9 ]
steps:
- name: Cache Compilers
id: cache-compilers
uses: actions/cache@v4
with:
path: /opt/intel
key: ${{ runner.os }}-compiler-intel
- name: Install Intel Compiler if Necessary
if: steps.cache-compilers.outputs.cache-hit != 'true'
run: |
wget --progress=dot:giga https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ac92f2bb-4818-4e53-a432-f8b34d502f23/intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh
sudo bash intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh -s --action install --eula accept
- name: Pre-Cache NVIDIA HPC
run: |
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
sudo apt-get update -y
sudo apt-get install -y nvhpc-${{ matrix.nvhpc }}
build-and-test:
runs-on: ubuntu-22.04
needs: setup
strategy:
fail-fast: false
matrix:
nvhpc: [ 23.9 ]
compiler: [ ninja-gcc, ninja-clang, ninja-clang-libcpp, ninja-intel, ninja-nvidia-hpc ]
cxx_version: [ 17, 20 ]
target: [ Debug, Release ]
steps:
- name: Harden Runner
uses: step-security/[email protected]
with:
egress-policy: audit
- uses: actions/checkout@v4
- name: Cache Build Files
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-cmake-${{ matrix.compiler }}-${{ matrix.cxx_version }}-${{ matrix.target }}
restore-keys: |
${{ runner.os }}-cmake-${{ matrix.compiler }}-
- name: Set Compiler Environment
run: |
if [[ "${{ matrix.compiler }}" == "ninja-intel" ]]; then
source /opt/intel/oneapi/setvars.sh
elif [[ "${{ matrix.compiler }}" == "ninja-nvidia-hpc" ]]; then
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/${{ matrix.nvhpc }}/compilers/bin:$PATH
fi
- name: Configure CMake
run: cmake -S . --preset=${{ matrix.compiler }} -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_version }}
- name: Build
run: cmake --build build --config=${{ matrix.target }}
- name: Test
run: cd build && ctest -C ${{ matrix.target }} --output-on-failure