diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0ae576..a594327 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,59 @@ jobs: - name: Check for changes run: git diff --exit-code + nvhpc: + runs-on: ubuntu-latest + strategy: + matrix: + version: + # For available versions, see + # https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64/Packages + # + # Note that version prior to 21.11 don't support passing + # arguments to the __malloc__ attribute, which glibc >= 2.34, + # which is used in CI, does unconditionally. That causes + # breaks several of the tests for versions prior to 21.11. + # - "20.11" + # - "21.1" ## BROKEN. File size mismatch. + # - "21.2" + # - "21.3" + # - "21.5" + # - "21.7" + # - "21.9" + - "21.11" + # - "22.1" + # - "22.2" + # - "22.3" + # - "22.5" + # - "22.7" + # - "22.9" + - "22.11" + # - "23.1" + # - "23.3" + # - "23.5" + # - "23.7" + # - "23.9" + - "23.11" + # - "24.1" + # - "24.3" + # - "24.7" + steps: + - uses: actions/checkout@v4 + - name: Free some disk space + run: sudo rm -rf /usr/local/lib/android /usr/local/.ghcup/ghc + - name: Install NVidia HPC SDK + 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-$(echo "${{ matrix.version }}" | tr '.' '-') + - name: Compile + env: + CC: /opt/nvidia/hpc_sdk/Linux_x86_64/"${{ matrix.version }}"/compilers/bin/nvc + CXX: /opt/nvidia/hpc_sdk/Linux_x86_64/"${{ matrix.version }}"/compilers/bin/nvc++ + working-directory: test + run: make + pelles-c: runs-on: windows-latest strategy: diff --git a/test/Makefile b/test/Makefile index 0439dee..205be6b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -9,12 +9,12 @@ else ifeq ($(notdir $(CC)), suncc) else ifeq ($(notdir $(CC)),$(filter $(notdir $(CC)),armcl cl2000 cl430 cl6x cl7x clpru)) CFLAGS ?= --display_error_number --emit_warnings_as_errors --issue_remarks -i $(dir $(shell readlink -f $(shell which $(CC))))../include C_OUTPUT_FILE := --output_file= -else ifeq ($(notdir $(CC)), pgcc) +else ifeq ($(notdir $(CC)),$(filter $(notdir $(CC)),pgcc nvc)) CFLAGS ?= -Minform=inform -c11 C_OUTPUT_FILE := -o -else ifeq ($(notdir $(CC)), pgc++) - CFLAGS ?= --display_error_number -Minform=inform -Werror - C_OUTPUT_FILE := -o +else ifeq ($(notdir $(CC)), nvcc) + CFLAGS ?= --Werror all-warnings + C_OUTPUT_FILE := --output-file= else ifeq ($(notdir $(CC)), xlc) CFLAGS ?= $(CLANG_C_FLAGS) C_OUTPUT_FILE := -o @@ -48,6 +48,9 @@ else ifeq ($(notdir $(CXX)), sunCC) else ifeq ($(notdir $(CXX)), pgc++) CXXFLAGS ?= --display_error_number -Minform=inform -Werror CXX_OUTPUT_FILE := -o +else ifeq ($(notdir $(CXX)), nvc++) + CXXFLAGS ?= --display_error_number -Minform=inform -Werror + CXX_OUTPUT_FILE := -o else ifeq ($(notdir $(CXX)),$(filter $(notdir $(CC)),armcl cl2000 cl430 cl6x cl7x clpru)) CXXFLAGS ?= --display_error_number --emit_warnings_as_errors --issue_remarks -i $(dir $(shell readlink -f $(shell which $(CC))))../include CXX_OUTPUT_FILE := --output_file= diff --git a/test/non-null.c b/test/non-null.c index abafc80..46eeb9a 100644 --- a/test/non-null.c +++ b/test/non-null.c @@ -1,14 +1,5 @@ #include "../hedley.h" -#if defined(_MSC_VER) - HEDLEY_DIAGNOSTIC_PUSH - #pragma warning(disable:4255 4668) - #include - HEDLEY_DIAGNOSTIC_POP -#else - #include -#endif - #if HEDLEY_PGI_VERSION_CHECK(20,7,0) # pragma diag_remark 1622,1623 #elif defined(HEDLEY_PGI_VERSION)