Nightly tests #17
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: Nightly tests | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| env: | |
| ROCM_VERSION: "6.3.4" | |
| TEST_THREADS: 24 | |
| jobs: | |
| run_tests: | |
| runs-on: gpu_large | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'vosen/ZLUDA' | |
| path: zluda-src | |
| sparse-checkout: | | |
| .github/workflows/rocm_setup_run.sh | |
| - name: Install ROCm | |
| run: sudo bash zluda-src/.github/workflows/rocm_setup_run.sh ${{ env.ROCM_VERSION }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'vosen/ptx_tests' | |
| - uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: 'vosen/ZLUDA' | |
| latest: true | |
| preRelease: true | |
| extract: true | |
| fileName: 'zluda-linux-*.tar.gz' | |
| - name: Build and run | |
| run: | | |
| DEBIAN_FRONTEND=noninteractive sudo apt install -y --no-install-recommends curl | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly --profile minimal -y | |
| source ~/.cargo/env | |
| pids=() | |
| exit_codes=() | |
| for i in $(seq 0 $((${{ env.TEST_THREADS }} - 1))); do | |
| cargo run -r -- zluda/libcuda.so.1 --shard-index $i --shard-count ${{ env.TEST_THREADS }} > output_$i.log 2>&1 & | |
| pids+=($!) | |
| done | |
| for pid in "${pids[@]}"; do | |
| wait $pid | |
| exit_codes+=($?) | |
| done | |
| error_occurred=0 | |
| for i in "${!exit_codes[@]}"; do | |
| if [ ${exit_codes[$i]} -ne 0 ]; then | |
| error_occurred=1 | |
| fi | |
| done | |
| exit $error_occurred | |
| - name: Upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output_logs | |
| path: output_*.log |