From 7ac69733b8dc32c981f22a2ec68808b65a304402 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 3 Oct 2021 12:20:08 +0100 Subject: [PATCH] Update CI scripts for testing with CUDA device compile. Fix inspection report issues. --- .github/workflows/ci.yml | 18 ++++++++++++------ test/cuda/boost-no-inspect | 1 + test/{ => cuda}/cuda_tests.txt | 0 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 test/cuda/boost-no-inspect rename test/{ => cuda}/cuda_tests.txt (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcacc00..07ca659 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -476,20 +476,26 @@ jobs: run: nvcc --version working-directory: ../boost-root/libs/config/test - name: Testing nvcc - run: for file in $(cat cuda_tests.txt); do echo "testing $file.cpp" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done working-directory: ../boost-root/libs/type_traits/test - name: Testing nvcc+clang - run: for file in $(cat cuda_tests.txt); do echo "testing $file.cpp" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done working-directory: ../boost-root/libs/type_traits/test - name: Create .cu files - run: for file in $(cat cuda_tests.txt); do cp $file.cpp $file.cu; done + run: for file in $(cat cuda/cuda_tests.txt); do cp $file.cpp $file.cu; done working-directory: ../boost-root/libs/type_traits/test - name: Testing nvcc on .cu files - run: for file in $(cat cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done working-directory: ../boost-root/libs/type_traits/test - name: Testing nvcc+clang on .cu files - run: for file in $(cat cuda_tests.txt); do echo "testing $file.cu" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done working-directory: ../boost-root/libs/type_traits/test - name: Testing clang on .cu files - run: for file in $(cat cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing nvcc on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing clang on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done working-directory: ../boost-root/libs/type_traits/test diff --git a/test/cuda/boost-no-inspect b/test/cuda/boost-no-inspect new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test/cuda/boost-no-inspect @@ -0,0 +1 @@ + diff --git a/test/cuda_tests.txt b/test/cuda/cuda_tests.txt similarity index 100% rename from test/cuda_tests.txt rename to test/cuda/cuda_tests.txt