Skip to content

Test CUDA Install Script #1

Test CUDA Install Script

Test CUDA Install Script #1

name: Test CUDA Install Script
on:
push:
paths:
- 'ml_scripts/install_cuda.sh'
- 'ml_scripts/.github/workflows/test_install_cuda.yml'
pull_request:
paths:
- 'ml_scripts/install_cuda.sh'
- 'ml_scripts/.github/workflows/test_install_cuda.yml'
workflow_dispatch:
jobs:
test-install-cuda:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up test install prefix
run: |
mkdir -p /tmp/test-cuda-install
echo "Created /tmp/test-cuda-install"
- name: Make script executable
run: chmod +x ml_scripts/install_cuda.sh
- name: Run install_cuda.sh (simulate, skip actual CUDA install)
env:
CUDA_INSTALL_PREFIX: /tmp/test-cuda-install
SKIP_PRUNE: 1
run: |
# Only test logic, not actual CUDA install (no root, no real GPU)
# Use a supported version, e.g. 12.8
bash ml_scripts/install_cuda.sh 12.8 || (cat /tmp/${USER}/cuda_install/error.log || true; exit 1)
- name: Check summary output
run: |
SUMMARY_FILE="/tmp/${USER}/cuda_install/script_completed_successfully"
if [ ! -f "$SUMMARY_FILE" ]; then
echo "Script did not complete successfully!"
exit 1
fi
echo "Install script ran to completion."
- name: Show install log
if: always()
run: |
cat /tmp/cuda_install_debug.txt || true