From e23fb0c3263ac84a1dfe05df4226167c733b512c Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 16 Sep 2025 14:38:11 -0700 Subject: [PATCH 1/5] Test build CI changes. --- .github/workflows/build.yml | 104 +++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 921d0f6..5e15b77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,29 +1,31 @@ name: "Build" on: - issue_comment: - types: [created] + pull_request: + branches: [ main ] + #issue_comment: + # types: [created] jobs: - trigger-comment: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') - runs-on: ubuntu-latest - steps: - - name: "Post trigger comment" - uses: actions/github-script@v7 - with: - script: | - const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `🚀 Build workflow triggered! [View run](${workflowUrl})` - }); + #trigger-comment: + # if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + # runs-on: ubuntu-latest + # steps: + # - name: "Post trigger comment" + # uses: actions/github-script@v7 + # with: + # script: | + # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: `🚀 Build workflow triggered! [View run](${workflowUrl})` + # }); build: - needs: trigger-comment - if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + #needs: trigger-comment + #if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') strategy: matrix: include: @@ -36,8 +38,8 @@ jobs: name: ${{ matrix.name }} runs-on: ubuntu-latest - container: - image: ${{ matrix.image }} + #container: + # image: ${{ matrix.image }} steps: - name: "Free disk space" @@ -64,37 +66,41 @@ jobs: - name: "Full build with NVSHMEM" run: | - mkdir -p build-nvshmem - cd build-nvshmem - cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 .. - make -j$(nproc) + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + mkdir -p build-nvshmem + cd build-nvshmem + cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 .. + make -j\$(nproc) + " - name: "Library only build without NVSHMEM" run: | - mkdir -p build-no-nvshmem - cd build-no-nvshmem - cmake .. - make -j$(nproc) + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + mkdir -p build-no-nvshmem + cd build-no-nvshmem + cmake .. + make -j$(nproc) + " - result-comment: - needs: build - if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build') - runs-on: ubuntu-latest - steps: - - name: "Post result comment" - uses: actions/github-script@v7 - with: - script: | - const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; - const success = '${{ needs.build.result }}' === 'success'; + #result-comment: + # needs: build + # if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build') + # runs-on: ubuntu-latest + # steps: + # - name: "Post result comment" + # uses: actions/github-script@v7 + # with: + # script: | + # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; + # const success = '${{ needs.build.result }}' === 'success'; - const message = success - ? `✅ Build workflow passed! [View run](${workflowUrl})` - : `❌ Build workflow failed! [View run](${workflowUrl})`; + # const message = success + # ? `✅ Build workflow passed! [View run](${workflowUrl})` + # : `❌ Build workflow failed! [View run](${workflowUrl})`; - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: message - }); + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: message + # }); From 2cf7c1098a31c491dc6ca672e81a072aec76d243 Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 16 Sep 2025 14:45:46 -0700 Subject: [PATCH 2/5] Adding temporary workflow for testing. --- .github/workflows/build_tmp.yml | 106 ++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/build_tmp.yml diff --git a/.github/workflows/build_tmp.yml b/.github/workflows/build_tmp.yml new file mode 100644 index 0000000..01132ff --- /dev/null +++ b/.github/workflows/build_tmp.yml @@ -0,0 +1,106 @@ +name: "Build (temporary)" + +on: + pull_request: + branches: [ main ] + #issue_comment: + # types: [created] + +jobs: + #trigger-comment: + # if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + # runs-on: ubuntu-latest + # steps: + # - name: "Post trigger comment" + # uses: actions/github-script@v7 + # with: + # script: | + # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: `🚀 Build workflow triggered! [View run](${workflowUrl})` + # }); + + build: + #needs: trigger-comment + #if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + strategy: + matrix: + include: + - name: "NVHPC SDK 25.7, CUDA 12.9, Ubuntu 24.04" + image: "nvcr.io/nvidia/nvhpc:25.7-devel-cuda12.9-ubuntu24.04" + - name: "NVHPC SDK 25.5, CUDA 12.9, Ubuntu 22.04" + image: "nvcr.io/nvidia/nvhpc:25.5-devel-cuda12.9-ubuntu22.04" + - name: "NVHPC SDK 22.11, CUDA 11.8, Ubuntu 20.04" + image: "nvcr.io/nvidia/nvhpc:22.11-devel-cuda11.8-ubuntu20.04" + + name: ${{ matrix.name }} + runs-on: ubuntu-latest + #container: + # image: ${{ matrix.image }} + + steps: + - name: "Free disk space" + run: | + sudo rm -rf /usr/local/lib/android || true + sudo rm -rf /usr/share/dotnet || true + + - name: "Retrieve PR info" + uses: actions/github-script@v7 + id: pr-info + with: + script: | + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + core.setOutput('sha', pr.data.head.sha); + + - name: "Checkout PR code" + uses: actions/checkout@v4 + with: + ref: ${{ steps.pr-info.outputs.sha }} + + - name: "Full build with NVSHMEM" + run: | + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + mkdir -p build-nvshmem + cd build-nvshmem + cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 .. + make -j\$(nproc) + " + + - name: "Library only build without NVSHMEM" + run: | + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + mkdir -p build-no-nvshmem + cd build-no-nvshmem + cmake .. + make -j$(nproc) + " + + #result-comment: + # needs: build + # if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build') + # runs-on: ubuntu-latest + # steps: + # - name: "Post result comment" + # uses: actions/github-script@v7 + # with: + # script: | + # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; + # const success = '${{ needs.build.result }}' === 'success'; + + # const message = success + # ? `✅ Build workflow passed! [View run](${workflowUrl})` + # : `❌ Build workflow failed! [View run](${workflowUrl})`; + + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: message + # }); From c54f1f77012fb8c7c876f842c5c3540541789b69 Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 16 Sep 2025 14:51:39 -0700 Subject: [PATCH 3/5] syntax fix. --- .github/workflows/build.yml | 10 +-- .github/workflows/build_tmp.yml | 106 -------------------------------- 2 files changed, 5 insertions(+), 111 deletions(-) delete mode 100644 .github/workflows/build_tmp.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e15b77..57de4bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,21 +66,21 @@ jobs: - name: "Full build with NVSHMEM" run: | - docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c ' mkdir -p build-nvshmem cd build-nvshmem cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 .. - make -j\$(nproc) - " + make -j$(nproc) + ' - name: "Library only build without NVSHMEM" run: | - docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " + docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c ' mkdir -p build-no-nvshmem cd build-no-nvshmem cmake .. make -j$(nproc) - " + ' #result-comment: # needs: build diff --git a/.github/workflows/build_tmp.yml b/.github/workflows/build_tmp.yml deleted file mode 100644 index 01132ff..0000000 --- a/.github/workflows/build_tmp.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: "Build (temporary)" - -on: - pull_request: - branches: [ main ] - #issue_comment: - # types: [created] - -jobs: - #trigger-comment: - # if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') - # runs-on: ubuntu-latest - # steps: - # - name: "Post trigger comment" - # uses: actions/github-script@v7 - # with: - # script: | - # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: `🚀 Build workflow triggered! [View run](${workflowUrl})` - # }); - - build: - #needs: trigger-comment - #if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') - strategy: - matrix: - include: - - name: "NVHPC SDK 25.7, CUDA 12.9, Ubuntu 24.04" - image: "nvcr.io/nvidia/nvhpc:25.7-devel-cuda12.9-ubuntu24.04" - - name: "NVHPC SDK 25.5, CUDA 12.9, Ubuntu 22.04" - image: "nvcr.io/nvidia/nvhpc:25.5-devel-cuda12.9-ubuntu22.04" - - name: "NVHPC SDK 22.11, CUDA 11.8, Ubuntu 20.04" - image: "nvcr.io/nvidia/nvhpc:22.11-devel-cuda11.8-ubuntu20.04" - - name: ${{ matrix.name }} - runs-on: ubuntu-latest - #container: - # image: ${{ matrix.image }} - - steps: - - name: "Free disk space" - run: | - sudo rm -rf /usr/local/lib/android || true - sudo rm -rf /usr/share/dotnet || true - - - name: "Retrieve PR info" - uses: actions/github-script@v7 - id: pr-info - with: - script: | - const pr = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number - }); - core.setOutput('sha', pr.data.head.sha); - - - name: "Checkout PR code" - uses: actions/checkout@v4 - with: - ref: ${{ steps.pr-info.outputs.sha }} - - - name: "Full build with NVSHMEM" - run: | - docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " - mkdir -p build-nvshmem - cd build-nvshmem - cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 .. - make -j\$(nproc) - " - - - name: "Library only build without NVSHMEM" - run: | - docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c " - mkdir -p build-no-nvshmem - cd build-no-nvshmem - cmake .. - make -j$(nproc) - " - - #result-comment: - # needs: build - # if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build') - # runs-on: ubuntu-latest - # steps: - # - name: "Post result comment" - # uses: actions/github-script@v7 - # with: - # script: | - # const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; - # const success = '${{ needs.build.result }}' === 'success'; - - # const message = success - # ? `✅ Build workflow passed! [View run](${workflowUrl})` - # : `❌ Build workflow failed! [View run](${workflowUrl})`; - - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: message - # }); From a7c7ebe486466a7cb8ad5499b8d9da7d1f47ef9d Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 16 Sep 2025 14:55:46 -0700 Subject: [PATCH 4/5] syntax fix. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57de4bd..590b445 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: const pr = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, - pull_number: context.issue.number + pull_number: github.event.number #context.issue.number }); core.setOutput('sha', pr.data.head.sha); @@ -80,7 +80,7 @@ jobs: cd build-no-nvshmem cmake .. make -j$(nproc) - ' + ' #result-comment: # needs: build From 56435cd01270c27f6927f930a7c3675d2668a445 Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 16 Sep 2025 14:57:32 -0700 Subject: [PATCH 5/5] fix checkout. --- .github/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 590b445..611b5dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,22 +47,22 @@ jobs: sudo rm -rf /usr/local/lib/android || true sudo rm -rf /usr/share/dotnet || true - - name: "Retrieve PR info" - uses: actions/github-script@v7 - id: pr-info - with: - script: | - const pr = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: github.event.number #context.issue.number - }); - core.setOutput('sha', pr.data.head.sha); + #- name: "Retrieve PR info" + # uses: actions/github-script@v7 + # id: pr-info + # with: + # script: | + # const pr = await github.rest.pulls.get({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # pull_number: context.issue.number + # }); + # core.setOutput('sha', pr.data.head.sha); - name: "Checkout PR code" uses: actions/checkout@v4 - with: - ref: ${{ steps.pr-info.outputs.sha }} + #with: + # ref: ${{ steps.pr-info.outputs.sha }} - name: "Full build with NVSHMEM" run: |