Skip to content

Commit d9508c1

Browse files
committed
Add CI test for nvidia_gpu_available to tests_link_nvidia_host_libraries.yml
Signed-off-by: laraPPr <[email protected]>
1 parent f400e47 commit d9508c1

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/tests_link_nvidia_host_libraries.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ jobs:
1919

2020
- name: Initialize EESSI
2121
uses: eessi/github-action-eessi@v3
22-
22+
23+
- name: Test function nvidia_gpu_available before setup of libraries
24+
run: |
25+
source scripts/utils.sh
26+
if nvidia_gpu_available; then
27+
echo "Error: Found NVIDIA libraries before the mock libraries were set up."
28+
exit 1
29+
else
30+
echo "NVIDIA libraries were not found."
31+
echo "Proceeding to setting up the mock NVIDIA libraries."
32+
fi
33+
2334
- name: Setup mock NVIDIA libraries
2435
run: |
2536
# Run the script to create mock libraries
@@ -48,6 +59,16 @@ jobs:
4859
echo "Updating PATH"
4960
echo "PATH=/tmp/nvidia-bin:$PATH" >> $GITHUB_ENV
5061
62+
- name: Test nvidia_gpu_available after setup of mock libraries
63+
run: |
64+
source scripts/utils.sh
65+
if nvidia_gpu_available; then
66+
echo "mock NVIDIA libraries and nvidia-smi were set up"
67+
else
68+
echo "Error: mock nvidia-smi is not available."
69+
exit 1
70+
fi
71+
5172
- name: Test LD_PRELOAD mode
5273
run: |
5374
echo ">>> Testing LD_PRELOAD mode"

0 commit comments

Comments
 (0)