-
Notifications
You must be signed in to change notification settings - Fork 150
221 lines (206 loc) · 8.99 KB
/
ci_dispatch.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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# These jobs will dispatch test for every tfhe-rs layers and crates.
name: CI Dispatch
on:
pull_request:
push:
branches:
- 'main'
- 'release/*'
schedule:
# Nightly tests @ 1AM after each work day
- cron: "0 1 * * MON-FRI"
jobs:
file-change:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
outputs:
core_crypto_test: ${{ steps.changed-files.outputs.core_crypto_test_any_changed }}
shortint_test: ${{ steps.changed-files.outputs.shortint_test_any_changed }}
integer_test: ${{ steps.changed-files.outputs.integer_test_any_changed }}
boolean_test: ${{ steps.changed-files.outputs.boolean_test_any_changed }}
cuda_test: ${{ steps.changed-files.outputs.cuda_test_any_changed }}
wasm_client_test: ${{ steps.changed-files.outputs.wasm_client_test_any_changed }}
zk_pok_test: ${{ steps.changed-files.outputs.zk_pok_test_any_changed }}
csprng_test: ${{ steps.changed-files.outputs.csprng_test_any_changed }}
trivium_test: ${{ steps.changed-files.outputs.trivium_test_any_changed }}
steps:
- name: Checkout tfhe-rs
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
with:
fetch-depth: 0
- name: Check for file changes
id: changed-files
uses: tj-actions/changed-files@5e85e31a0187e8df23b438284aa04f21b55f1510
with:
files_yaml: |
core_crypto_test:
- tfhe/src/core_crypto/**
boolean_test:
- tfhe/src/boolean/**
shortint_test:
- tfhe/src/shortint/**
integer_test:
- tfhe/src/integer/**
wasm_client_test:
- tfhe/web_wasm_parallel_tests/**
cuda_test:
- backends/tfhe-cuda-backend/src/**
- backends/tfhe-cuda-backend/cuda/**
- backends/tfhe-cuda-backend/build.rs
- backends/tfhe-cuda-backend/Cargo.toml
zk_pok_test:
- tfhe-zk-pok/src/**
csprng_test:
- concrete-csprng/src/**
trivium_test:
- apps/trivium/src/**
core_cryto_tests:
name: Run core_crypto tests
needs: file-change
if: needs.file-change.outputs.core_crypto_test == 'true'
uses: ./.github/workflows/aws_tfhe_fast_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
boolean_tests:
name: Run boolean tests
needs: file-change
if: (needs.file-change.outputs.boolean_test == 'true' ||
needs.file-change.outputs.core_crypto_test == 'true')
uses: ./.github/workflows/aws_boolean_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
shortint_tests:
name: Run shortint tests
needs: file-change
if: (needs.file-change.outputs.integer_test == 'true' ||
needs.file-change.outputs.shortint_test == 'true')
uses: ./.github/workflows/aws_shortint_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
integer_tests:
name: Run integer tests (unsigned)
needs: file-change
if: (needs.file-change.outputs.integer_test == 'true' ||
needs.file-change.outputs.shortint_test == 'true' ||
needs.file-change.outputs.core_crypto_test == 'true')
uses: ./.github/workflows/aws_tfhe_integer_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
signed_integer_tests: # TODO utiliser une variable (type choice) de workflow pour choisir entre unsigned et signed et ainsi éviter d'avoir deux fichiers.
name: Run integer tests (signed)
needs: file-change
if: (needs.file-change.outputs.integer_test == 'true' ||
needs.file-change.outputs.shortint_test == 'true' ||
needs.file-change.outputs.core_crypto_test == 'true')
uses: ./.github/workflows/aws_tfhe_gpu_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
cuda_integer_tests:
name: Run CUDA integer tests (unsigned)
needs: file-change
if: (needs.file-change.outputs.cuda_test == 'true' ||
needs.file-change.outputs.integer_test == 'true' ||
needs.file-change.outputs.core_crypto_test == 'true')
uses: ./.github/workflows/aws_tfhe_gpu_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
cuda_signed_integer_tests: # TODO utiliser une variable (type choice) de workflow pour choisir entre unsigned et signed et ainsi éviter d'avoir deux fichiers.
name: Run CUDA integer tests (signed)
needs: file-change
if: (needs.file-change.outputs.cuda_test == 'true' ||
needs.file-change.outputs.integer_test == 'true' ||
needs.file-change.outputs.core_crypto_test == 'true')
uses: ./.github/workflows/aws_tfhe_signed_integer_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
wasm_client_tests:
name: Run WASM client tests
needs: file-change
if: needs.file-change.outputs.wasm_client_test == 'true' # FIXME Define dependency tree
uses: ./.github/workflows/aws_tfhe_wasm_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
zk_pok_tests:
name: Run zk-pok tests
needs: file-change
if: needs.file-change.outputs.zk_pok_test == 'true' # FIXME Define dependency tree
uses: ./.github/workflows/aws_tfhe_zk_pok_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
csprng_tests:
name: Run concrete-csprng tests
needs: file-change
if: needs.file-change.outputs.csprng_test == 'true' # FIXME Define dependency tree
uses: ./.github/workflows/csprng_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
trivium_tests:
name: Run trivium app tests
needs: file-change
if: needs.file-change.outputs.trivium_test == 'true' # FIXME Define dependency tree
uses: ./.github/workflows/aws_trivium_tests.yml
secrets:
SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}
SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }}
JOB_SECRET: ${{ secrets.JOB_SECRET }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# TODO: Ajouter les différents cargo.toml ?
# Faire les tests avec la chaine de dépendance:
# exemple si changement dans core_crypto: on run core, shortint et integer
# TODO: réfléchir à comment lancer les différents workflows afin de ne pas démarrer trop de machines
# Comment gérer les petits workflows ? Une machine pour plusieurs workflows ?
# Comment gérer les gros worflows (integer, signed_integers, ...) ? Faire comme actuellement ?