-
Notifications
You must be signed in to change notification settings - Fork 8
103 lines (93 loc) · 2.84 KB
/
github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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