name: Self-hosted runner tests (push to "main") on: workflow_call: workflow_dispatch: env: TESTING_MOCKED_DATALOADERS: "1" IS_GITHUB_CI: "1" jobs: run_all_tests_single_gpu: runs-on: [self-hosted, docker-gpu, multi-gpu] env: CUDA_VISIBLE_DEVICES: "0" container: image: huggingface/accelerate-gpu:latest options: --gpus all --shm-size "16gb" defaults: run: working-directory: accelerate/ shell: bash steps: - name: Update clone & pip install run: | source activate accelerate git config --global --add safe.directory '*' git fetch && git checkout ${{ github.sha }} pip install -e .[testing,test_trackers] pip install pytest-reportlog - name: Run CLI tests run: | source activate accelerate make test_cli - name: Run test on GPUs run: | source activate accelerate make test - name: Run examples on GPUs run: | source activate accelerate pip uninstall comet_ml -y make test_examples - name: Generate Report if: always() run: | python utils/log_reports.py >> $GITHUB_STEP_SUMMARY run_all_tests_multi_gpu: runs-on: [self-hosted, docker-gpu, multi-gpu] container: image: huggingface/accelerate-gpu:latest options: --gpus all --shm-size "16gb" defaults: run: working-directory: accelerate/ shell: bash steps: - name: Update clone run: | source activate accelerate git config --global --add safe.directory '*' git fetch && git checkout ${{ github.sha }} pip install -e .[testing,test_trackers] pip install pytest-reportlog - name: Run CLI tests run: | source activate accelerate make test_cli - name: Run test on GPUs run: | source activate accelerate make test - name: Run examples on GPUs run: | source activate accelerate pip uninstall comet_ml -y make test_examples - name: Generate Report if: always() run: | python utils/log_reports.py >> $GITHUB_STEP_SUMMARY