move more testing logic into scripts #625
Workflow file for this run
This file contains 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: legate-boost build/test | |
concurrency: | |
group: ci-on-${{ github.event_name }}-from-${{ github.ref_name }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- "pull-request/[0-9]+" | |
- "branch-*" | |
- "main" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pre-commit/[email protected] | |
build-test: | |
needs: [pre-commit] | |
defaults: | |
run: | |
shell: bash -el {0} | |
runs-on: linux-amd64-gpu-v100-latest-1 | |
env: | |
CONDA_PREFIX: /opt/conda | |
container: | |
image: rapidsai/devcontainers:24.08-cpp-cuda11.8-mambaforge-ubuntu22.04 | |
env: | |
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} # GPU jobs must set this container env variable | |
steps: | |
- name: Checkout legate-boost | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Install legate/cunumeric | |
run: | | |
mamba install --yes -c rapidsai \ | |
'rapids-dependency-file-generator>=1.14.0' | |
rapids-dependency-file-generator \ | |
--output conda \ | |
--file-key all \ | |
--matrix "cuda=${CUDA_VERSION};arch=$(arch)" | tee /tmp/env.yaml | |
# update the current environment (instead of creating a new one), as that | |
# persists across all steps | |
mamba env update \ | |
--name base \ | |
--file /tmp/env.yaml | |
- name: Type check legate-boost | |
run: | | |
ci/run_mypy.sh | |
- name: Build legate-boost | |
env: | |
CUDAARCHS: '70;80' | |
run: | | |
ci/build_wheel.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: legateboost-wheel | |
path: dist/legate_boost*.whl | |
if-no-files-found: error | |
- name: Install legate-boost | |
run: | | |
python -m pip install --no-deps dist/*.whl | |
- name: Run cpu tests | |
run: | | |
ci/run_pytests_cpu.sh | |
- name: Run gpu tests | |
run: | | |
ci/run_pytests_gpu.sh | |
- name: Build legate-boost docs | |
working-directory: docs | |
run: | | |
make html | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/build/html | |
deploy: | |
needs: build-test | |
# only main branch uploads docs | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |