Repository navigation
139 lines (112 loc) · 4.48 KB
/
Copy pathci.yml
File metadata and controls
139 lines (112 loc) · 4.48 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
134
135
136
137
138
139
name: ci
on:
push:
branches:
- "main"
- "pull-request/[0-9]+"
jobs:
lint:
runs-on: linux-amd64-cpu4
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
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@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
cache: false
environments: ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }}
- uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
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@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
cache: false
environments: ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }}
- name: Download build artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: build-release-cuda-${{ matrix.cuda }}-${{ matrix.rapids }}
- name: Extract build artifacts
run: tar -xf build-release.tar
- run: pixi run -e ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }} test
benchmark:
needs: build
runs-on: linux-amd64-gpu-t4-latest-1
strategy:
matrix:
cuda: [13]
rapids: [nightly]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
cache: false
environments: ${{ format('cuda-{0}-{1}', matrix.cuda, matrix.rapids) }}
- name: Download build artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: build-release-cuda-${{ matrix.cuda }}-${{ matrix.rapids }}
- name: Extract build artifacts
run: tar -xf build-release.tar
- name: Run benchmarks
working-directory: build/release/benchmark/
run: |
./cucascade_benchmarks \
--benchmark_filter=Convert \
--benchmark_out_format=json \
--benchmark_out=${{ github.workspace }}/benchmark_result.json \
--benchmark_min_time=2.0s
- name: Restore baseline benchmark data
uses: actions/cache/restore@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
id: benchmark-data
with:
key: benchmark_result-linux-amd64-gpu-t4-latest-1-v1
path: .cache/benchmark_result.json
- name: Compare benchmark results
uses: benchmark-action/github-action-benchmark@a60cea5bc7b49e15c1f58f411161f99e0df48372 # v1.22.0
with:
tool: googlecpp
output-file-path: ${{ github.workspace }}/benchmark_result.json
github-token: ${{ github.token }}
external-data-json-path: .cache/benchmark_result.json
summary-always: true
comment-on-alert: true
alert-threshold: "120%"
- name: Save baseline benchmark data
uses: actions/cache/save@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
with:
key: ${{ steps.benchmark-data.outputs.cache-primary-key }}
path: .cache/benchmark_result.json