syntax fix. #36
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Build" | ||
| 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 | ||
| # }); | ||