Skip to content

Commit 2cf7c10

Browse files
committed
Adding temporary workflow for testing.
1 parent e23fb0c commit 2cf7c10

1 file changed

Lines changed: 106 additions & 0 deletions

File tree

.github/workflows/build_tmp.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: "Build (temporary)"
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
#issue_comment:
7+
# types: [created]
8+
9+
jobs:
10+
#trigger-comment:
11+
# if: github.event.issue.pull_request && contains(github.event.comment.body, '/build')
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - name: "Post trigger comment"
15+
# uses: actions/github-script@v7
16+
# with:
17+
# script: |
18+
# const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`;
19+
# github.rest.issues.createComment({
20+
# issue_number: context.issue.number,
21+
# owner: context.repo.owner,
22+
# repo: context.repo.repo,
23+
# body: `🚀 Build workflow triggered! [View run](${workflowUrl})`
24+
# });
25+
26+
build:
27+
#needs: trigger-comment
28+
#if: github.event.issue.pull_request && contains(github.event.comment.body, '/build')
29+
strategy:
30+
matrix:
31+
include:
32+
- name: "NVHPC SDK 25.7, CUDA 12.9, Ubuntu 24.04"
33+
image: "nvcr.io/nvidia/nvhpc:25.7-devel-cuda12.9-ubuntu24.04"
34+
- name: "NVHPC SDK 25.5, CUDA 12.9, Ubuntu 22.04"
35+
image: "nvcr.io/nvidia/nvhpc:25.5-devel-cuda12.9-ubuntu22.04"
36+
- name: "NVHPC SDK 22.11, CUDA 11.8, Ubuntu 20.04"
37+
image: "nvcr.io/nvidia/nvhpc:22.11-devel-cuda11.8-ubuntu20.04"
38+
39+
name: ${{ matrix.name }}
40+
runs-on: ubuntu-latest
41+
#container:
42+
# image: ${{ matrix.image }}
43+
44+
steps:
45+
- name: "Free disk space"
46+
run: |
47+
sudo rm -rf /usr/local/lib/android || true
48+
sudo rm -rf /usr/share/dotnet || true
49+
50+
- name: "Retrieve PR info"
51+
uses: actions/github-script@v7
52+
id: pr-info
53+
with:
54+
script: |
55+
const pr = await github.rest.pulls.get({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
pull_number: context.issue.number
59+
});
60+
core.setOutput('sha', pr.data.head.sha);
61+
62+
- name: "Checkout PR code"
63+
uses: actions/checkout@v4
64+
with:
65+
ref: ${{ steps.pr-info.outputs.sha }}
66+
67+
- name: "Full build with NVSHMEM"
68+
run: |
69+
docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c "
70+
mkdir -p build-nvshmem
71+
cd build-nvshmem
72+
cmake -DCUDECOMP_ENABLE_NVSHMEM=1 -DCUDECOMP_BUILD_EXTRAS=1 ..
73+
make -j\$(nproc)
74+
"
75+
76+
- name: "Library only build without NVSHMEM"
77+
run: |
78+
docker run --rm -v $PWD:/workspace -w /workspace ${{ matrix.image }} bash -c "
79+
mkdir -p build-no-nvshmem
80+
cd build-no-nvshmem
81+
cmake ..
82+
make -j$(nproc)
83+
"
84+
85+
#result-comment:
86+
# needs: build
87+
# if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build')
88+
# runs-on: ubuntu-latest
89+
# steps:
90+
# - name: "Post result comment"
91+
# uses: actions/github-script@v7
92+
# with:
93+
# script: |
94+
# const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`;
95+
# const success = '${{ needs.build.result }}' === 'success';
96+
97+
# const message = success
98+
# ? `✅ Build workflow passed! [View run](${workflowUrl})`
99+
# : `❌ Build workflow failed! [View run](${workflowUrl})`;
100+
101+
# github.rest.issues.createComment({
102+
# issue_number: context.issue.number,
103+
# owner: context.repo.owner,
104+
# repo: context.repo.repo,
105+
# body: message
106+
# });

0 commit comments

Comments
 (0)