Repository navigation
133 lines (110 loc) · 4.36 KB
/
Copy pathci.yml
File metadata and controls
133 lines (110 loc) · 4.36 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: ci
on:
push:
branches:
- "main"
- "pull-request/[0-9]+"
concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'push' &&
startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/pull-request/') }}
jobs:
lint:
runs-on: linux-amd64-cpu4
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.14"
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
build:
needs: lint
runs-on: linux-amd64-cpu4
strategy:
fail-fast: false
matrix:
cuda: [12, 13]
rapids: [nightly, stable]
env:
SCCACHE_GHA_ENABLED: true
CONDA_OVERRIDE_CUDA: ${{ matrix.cuda == 12 && '12.9' || '13' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prefix-dev/setup-pixi@9936258fee697aff89b3fed6ca1f80a382ef694e # v0.11.3
with:
cache: false
environments: ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }}
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- run: pixi run -e ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }} build
- name: Package build artifacts
run: tar -cf build-release.tar build/release/
- name: Upload build artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: build-release-cuda-${{ matrix.cuda }}-${{ matrix.rapids }}
path: build-release.tar
if-no-files-found: error
retention-days: 1
test:
needs: build
runs-on: linux-amd64-gpu-t4-latest-1
strategy:
matrix:
cuda: [12, 13]
rapids: [nightly, stable]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prefix-dev/setup-pixi@9936258fee697aff89b3fed6ca1f80a382ef694e # v0.11.3
with:
cache: false
environments: ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }}
- name: Download build artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: build-release-cuda-${{ matrix.cuda }}-${{ matrix.rapids }}
- name: Extract build artifacts
run: tar -xf build-release.tar
- name: Run tests
id: test
run: pixi run -e ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }} test --output-junit test-results.xml
- name: Upload test diagnostics
id: diagnostics
if: ${{ !cancelled() && steps.test.outcome != 'skipped' }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: test-results-cuda-${{ matrix.cuda }}-${{ matrix.rapids }}
path: |
build/release/test-results.xml
build/release/Testing/Temporary/
retention-days: 14
if-no-files-found: warn
- name: Summarize test results
if: ${{ !cancelled() && steps.diagnostics.outputs.artifact-url != '' }}
env:
CUDA_VERSION: ${{ matrix.cuda }}
RAPIDS_CHANNEL: ${{ matrix.rapids }}
TEST_RESULT: ${{ steps.test.outcome }}
ARTIFACT_URL: ${{ steps.diagnostics.outputs.artifact-url }}
run: |
{
echo "## Tests: CUDA ${CUDA_VERSION}, RAPIDS ${RAPIDS_CHANNEL}"
echo "CTest result: **${TEST_RESULT}**"
echo
echo "[Download JUnit results and CTest logs](${ARTIFACT_URL})"
} >> "$GITHUB_STEP_SUMMARY"
check:
runs-on: ubuntu-slim
needs: [lint, build, test]
if: always()
timeout-minutes: 5
steps:
- name: All checks ok
if: ${{ needs.lint.result == 'success' && needs.build.result == 'success' && needs.test.result == 'success' }}
run: exit 0
- name: Some checks failed
if: ${{ !(needs.lint.result == 'success' && needs.build.result == 'success' && needs.test.result == 'success') }}
run: exit 1