From 4fbef69772ab88e3c58fae1722900ada45b53274 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 20:31:07 +0200 Subject: [PATCH 1/6] Create cmake-nvcc.yml first test of nvcc action --- .github/workflows/cmake-nvcc.yml | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/cmake-nvcc.yml diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml new file mode 100644 index 0000000..6f53a29 --- /dev/null +++ b/.github/workflows/cmake-nvcc.yml @@ -0,0 +1,62 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # 3. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-latest] + build_type: [Release] + c_compiler: [gcc] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + + steps: + - uses: actions/checkout@v4 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }} + + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + + # - name: Test + # working-directory: ${{ steps.strings.outputs.build-output-dir }} + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + # run: ctest --build-config ${{ matrix.build_type }} From 1d983c0d2a08cefc8ad7ce51bcc54f0bce645312 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 20:36:44 +0200 Subject: [PATCH 2/6] Update cmake-nvcc.yml trying nvidia-smi --- .github/workflows/cmake-nvcc.yml | 39 +++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml index 6f53a29..5e353b4 100644 --- a/.github/workflows/cmake-nvcc.yml +++ b/.github/workflows/cmake-nvcc.yml @@ -1,6 +1,6 @@ # This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml -name: CMake on multiple platforms +name: CMake on gpu runner on: push: @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: [self-hosted, gpu] strategy: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. @@ -21,19 +21,16 @@ jobs: # 2. # 3. # - # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. - matrix: - os: [ubuntu-latest] - build_type: [Release] - c_compiler: [gcc] - include: - - os: ubuntu-latest - c_compiler: gcc - cpp_compiler: g++ + steps: - uses: actions/checkout@v4 + - name: Verify GPU availability + run: | + echo "Checking GPU devices..." + nvidia-smi + - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings @@ -41,19 +38,19 @@ jobs: run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - name: Configure CMake + # - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }} - - - name: Build + # run: > + # cmake -B ${{ steps.strings.outputs.build-output-dir }} + # -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + # -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + # -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + # -S ${{ github.workspace }} + + # - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + # run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} # - name: Test # working-directory: ${{ steps.strings.outputs.build-output-dir }} From 06c06118899ec3e4e626ddc9ec7b9d3fe3121a98 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 20:44:53 +0200 Subject: [PATCH 3/6] Update cmake-nvcc.yml check nvcc compiler --- .github/workflows/cmake-nvcc.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml index 5e353b4..a2429a9 100644 --- a/.github/workflows/cmake-nvcc.yml +++ b/.github/workflows/cmake-nvcc.yml @@ -31,6 +31,11 @@ jobs: echo "Checking GPU devices..." nvidia-smi + - name: Verify nvcc availability + run: | + echo "Checking nvcc compiler..." + nvcc --version + - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings From 368e66be70e16f9d5a05ed95f113b5dd562753c5 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 22:03:21 +0200 Subject: [PATCH 4/6] Update cmake-nvcc.yml check cmake build --- .github/workflows/cmake-nvcc.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml index a2429a9..d483e77 100644 --- a/.github/workflows/cmake-nvcc.yml +++ b/.github/workflows/cmake-nvcc.yml @@ -43,15 +43,13 @@ jobs: run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - # - name: Configure CMake + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - # run: > - # cmake -B ${{ steps.strings.outputs.build-output-dir }} - # -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - # -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - # -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - # -S ${{ github.workspace }} + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-O3 -std=c++2a" + -S ${{ github.workspace }} # - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). From 371492079ac2999d0f400a8e2bbceb6190b9f4a0 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 23:12:29 +0200 Subject: [PATCH 5/6] Update cmake-nvcc.yml cmake build check --- .github/workflows/cmake-nvcc.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml index d483e77..664a25f 100644 --- a/.github/workflows/cmake-nvcc.yml +++ b/.github/workflows/cmake-nvcc.yml @@ -15,12 +15,6 @@ jobs: strategy: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. fail-fast: false - - # Set up a matrix to run the following 3 configurations: - # 1. - # 2. - # 3. - # steps: @@ -51,9 +45,9 @@ jobs: -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-O3 -std=c++2a" -S ${{ github.workspace }} - # - name: Build + - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} # - name: Test # working-directory: ${{ steps.strings.outputs.build-output-dir }} From bcfae450df89ee6b3e752a3b151f4310ac537c79 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Perrone" Date: Sun, 10 May 2026 23:28:02 +0200 Subject: [PATCH 6/6] Update cmake-nvcc.yml add test fft --- .github/workflows/cmake-nvcc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-nvcc.yml b/.github/workflows/cmake-nvcc.yml index 664a25f..8928f53 100644 --- a/.github/workflows/cmake-nvcc.yml +++ b/.github/workflows/cmake-nvcc.yml @@ -49,8 +49,8 @@ jobs: # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). run: cmake --build ${{ steps.strings.outputs.build-output-dir }} - # - name: Test - # working-directory: ${{ steps.strings.outputs.build-output-dir }} + - name: Test + working-directory: ${{ steps.strings.outputs.build-output-dir }} # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - # run: ctest --build-config ${{ matrix.build_type }} + run: ctest -V -R "fft-forward-inverse"