-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
config.yml
1003 lines (916 loc) · 35.6 KB
/
config.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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: 2.1
parameters:
small:
type: string
default: small
medium:
type: string
default: medium
large:
type: string
default: large
xlarge:
type: string
default: xlarge
twoxlarge:
type: string
default: aleonet/2xlarge
orbs:
windows: circleci/windows@5.0
commands:
check_windows:
description: "Runs cargo check on Windows"
parameters:
workspace_member:
type: string
steps:
- checkout
- restore_cache:
key: cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: "Install Rust and run cargo check"
command: |
$ProgressPreference = "SilentlyContinue"
# Remove the circleci installed rustc.
choco uninstall rust
# Install rust with rustup.
Invoke-WebRequest -Uri "https://win.rustup.rs/" -OutFile "C:\rustup-init.exe"
& C:\rustup-init.exe -y --default-toolchain "stable-x86_64-pc-windows-msvc" --no-modify-path --profile minimal
$Env:Path += ";$Env:USERPROFILE\.cargo\bin"
# Verify the installation.
cargo --version --verbose
rustc --version | Out-File -FilePath "rust-version"
if (!(Test-Path "Cargo.lock" -PathType Leaf)) {
cargo generate-lockfile
}
cd << parameters.workspace_member >>
cargo check --examples --benches --tests
- save_cache:
paths:
- C:\Users\circleci\.cargo\registry
- C:\Users\circleci\.cargo\git
- target
key: cargo-cache-{{ arch }}-{{ checksum "rust-version" }}-{{ checksum "Cargo.lock" }}
setup_environment:
description: "Setup testing environment"
parameters:
cache_key:
type: string
default: v1.0.0-rust-1.81.0-snarkvm-stable-cache
steps:
- run: set -e
- run:
name: Prepare environment and install dependencies
command: |
echo 'export "RUSTC_WRAPPER"="sccache"' >> $BASH_ENV
echo 'export "SCCACHE_CACHE_SIZE"="200M"' >> $BASH_ENV
export WORK_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache"
export SCCACHE_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache"
mkdir -p "$CIRCLE_WORKING_DIRECTORY/.bin"
wget https://github.com/mozilla/sccache/releases/download/v0.3.0/sccache-v0.3.0-x86_64-unknown-linux-musl.tar.gz
tar -C "$CIRCLE_WORKING_DIRECTORY/.bin" -xvf sccache-v0.3.0-x86_64-unknown-linux-musl.tar.gz
chmod +x $CIRCLE_WORKING_DIRECTORY/.bin/sccache-v0.3.0-x86_64-unknown-linux-musl/sccache
mv $CIRCLE_WORKING_DIRECTORY/.bin/sccache-v0.3.0-x86_64-unknown-linux-musl/sccache /home/circleci/bin/sccache
rm -rf "/home/circleci/.cargo/registry"
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get dist-upgrade -y -o DPkg::Options::=--force-confold
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends clang llvm-dev llvm pkg-config xz-utils make libssl-dev libssl-dev
- restore_cache:
keys:
- << parameters.cache_key >>
clear_environment:
description: "Clear environment"
parameters:
cache_key:
type: string
default: v1.0.0-rust-1.81.0-snarkvm-stable-cache
steps:
- run: (sccache -s || true)
- run: set +e
- save_cache:
key: << parameters.cache_key >>
paths:
- /home/circleci/.cache/sccache
- /home/circleci/.cargo
- /home/circleci/.aleo/resources
run_serial:
description: "Build and run tests"
parameters:
workspace_member:
type: string
cache_key:
type: string
flags:
type: string
default: ""
steps:
- checkout
- setup_environment:
cache_key: << parameters.cache_key >>
- run:
no_output_timeout: 60m
command: cd << parameters.workspace_member >> && RUST_MIN_STACK=67108864 cargo test << parameters.flags >>
- clear_environment:
cache_key: << parameters.cache_key >>
run_parallel:
description: "Build and run tests (in parallel)"
parameters:
workspace_member:
type: string
cache_key:
type: string
flags:
type: string
default: ""
steps:
- checkout
- setup_environment:
cache_key: << parameters.cache_key >>
- run:
no_output_timeout: 60m
command: |
cd << parameters.workspace_member >>
cargo test -- --list --format terse | sed 's/: test//' > test_names.txt
TEST_NAMES=$(circleci tests split test_names.txt)
for i in $(echo $TEST_NAMES | sed "s/ / /g")
do
RUST_MIN_STACK=67108864 cargo test $i << parameters.flags >>
done
- clear_environment:
cache_key: << parameters.cache_key >>
install_rust_nightly:
description: "Install Rust nightly toolchain"
steps:
- run: rustup toolchain install nightly-x86_64-unknown-linux-gnu
jobs:
snarkvm:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.large >>
steps:
- checkout
- run:
no_output_timeout: 30m
command: RUST_MIN_STACK=67108864 cargo test
algorithms:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.large >>
steps:
- run_serial:
workspace_member: algorithms
cache_key: v1.0.0-rust-1.81.0-snarkvm-algorithms-cache
algorithms-profiler:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial: # This runs a single test with profiler enabled
workspace_member: algorithms
cache_key: v1.0.0-rust-1.81.0-snarkvm-algorithms-cache
flags: varuna::prove_and_verify_with_square_matrix --features profiler
circuit:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-cache
circuit-account:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/account
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-account-cache
# This checks that no `console` structs are used in core circuit logic.
circuit-account-noconsole:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/account
flags: --no-default-features
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-account-noconsole-cache
circuit-algorithms:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: circuit/algorithms
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-algorithms-cache
circuit-collections:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
workspace_member: circuit/collections
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-collections-cache
# This checks that no `console` structs are used in core circuit logic.
circuit-collections-noconsole:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
workspace_member: circuit/collections
flags: --no-default-features
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-collections-noconsole-cache
circuit-environment:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/environment
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-environment-cache
circuit-network:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/network
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-network-cache
circuit-program:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: circuit/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-program-cache
circuit-types:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-cache
circuit-types-address:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/address
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-address-cache
circuit-types-boolean:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/boolean
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-boolean-cache
circuit-types-field:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/field
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-field-cache
circuit-types-group:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/group
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-group-cache
circuit-types-integers:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
workspace_member: circuit/types/integers
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-integers-cache
flags: -- --ignored
circuit-types-scalar:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/scalar
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-scalar-cache
circuit-types-string:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: circuit/types/string
cache_key: v1.0.0-rust-1.81.0-snarkvm-circuit-types-string-cache
console:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-cache
console-account:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: console/account
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-account-cache
console-algorithms:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/algorithms
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-algorithms-cache
console-collections:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
workspace_member: console/collections
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-collections-cache
console-network:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/network
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-network-cache
console-network-environment:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/network/environment
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-network-environment-cache
console-program:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-program-cache
console-types:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-cache
console-types-address:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/address
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-address-cache
console-types-boolean:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/boolean
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-boolean-cache
console-types-field:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/field
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-field-cache
console-types-group:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/group
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-group-cache
console-types-integers:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/integers
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-integers-cache
console-types-scalar:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/scalar
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-scalar-cache
console-types-string:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: console/types/string
cache_key: v1.0.0-rust-1.81.0-snarkvm-console-types-string-cache
curves:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: curves
cache_key: v1.0.0-rust-1.81.0-snarkvm-curves-cache
fields:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: fields
cache_key: v1.0.0-rust-1.81.0-snarkvm-fields-cache
ledger:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
workspace_member: ledger
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-cache
ledger-with-rocksdb:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
flags: --features=rocks
workspace_member: ledger
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-with-rocksdb-cache
ledger-with-valid-solutions:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: valid_solutions --features=test
workspace_member: ledger
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-with-valid-solutions-cache
ledger-authority:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/authority
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-authority-cache
ledger-block:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
workspace_member: ledger/block
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-block-cache
ledger-committee:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/committee
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-committee-cache
ledger-narwhal:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/narwhal
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-cache
ledger-narwhal-batch-certificate:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/narwhal/batch-certificate
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-batch-certificate-cache
ledger-narwhal-batch-header:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/narwhal/batch-header
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-batch-header-cache
ledger-narwhal-data:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/narwhal/data
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-data-cache
ledger-narwhal-subdag:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/narwhal/subdag
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-subdag-cache
ledger-narwhal-transmission:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/narwhal/transmission
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-transmission-cache
ledger-narwhal-transmission-id:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/narwhal/transmission-id
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-narwhal-transmission-id-cache
ledger-puzzle:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/puzzle
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-puzzle-cache
ledger-puzzle-epoch:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/puzzle/epoch
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-puzzle-epoch-cache
ledger-query:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: ledger/query
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-query-cache
ledger-store:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: --features=rocks
workspace_member: ledger/store
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-store-cache
ledger-test-helpers:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
workspace_member: ledger/test-helpers
cache_key: v1.0.0-rust-1.81.0-snarkvm-ledger-test-helpers-cache
parameters:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: -- --test-threads=2
workspace_member: parameters
cache_key: v1.0.0-rust-1.81.0-snarkvm-parameters-cache
parameters-uncached:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.large >>
steps:
- run_serial:
flags: -- --test-threads=2 --ignored test_load_bytes_mini
workspace_member: parameters
cache_key: v-{{ epoch }}-snarkvm-parameters-cache
synthesizer:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: --lib --bins -- --test-threads=2
workspace_member: synthesizer
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-cache
synthesizer-integration:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: --test '*' -- --test-threads=8
workspace_member: synthesizer
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-integration-cache
synthesizer-process:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: -- --test-threads=8
workspace_member: synthesizer/process
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-process-cache
synthesizer-process-with-rocksdb:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: --features=rocks
workspace_member: synthesizer/process
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-process-cache
synthesizer-program:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: --lib --bins
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-cache
synthesizer-program-integration:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: --test '*' -- --skip keccak --skip psd --skip sha --skip instruction::is --skip instruction::equal --skip instruction::commit
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-integration-cache
synthesizer-program-integration-keccak:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: keccak --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-keccak-cache
synthesizer-program-integration-psd:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: psd --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-psd-cache
synthesizer-program-integration-sha:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: sha --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-sha-cache
synthesizer-program-integration-instruction-is:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.twoxlarge >>
steps:
- run_serial:
flags: instruction::is --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-is-cache
synthesizer-program-integration-instruction-equal:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- run_serial:
flags: instruction::equal --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-equal-cache
synthesizer-program-integration-instruction-commit:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- run_serial:
flags: instruction::commit --test '*'
workspace_member: synthesizer/program
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-program-commit-cache
synthesizer-snark:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: synthesizer/snark
cache_key: v1.0.0-rust-1.81.0-snarkvm-synthesizer-snark-cache
utilities:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.large >>
steps:
- run_serial:
workspace_member: utilities
cache_key: v1.0.0-rust-1.81.0-snarkvm-utilities-cache
utilities-derives:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- run_serial:
workspace_member: utilities/derives
cache_key: v1.0.0-rust-1.81.0-snarkvm-utilities-derives-cache
wasm:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- setup_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-wasm-cache
- run:
no_output_timeout: 30m
command: |
sudo apt-get install nodejs
(cargo install wasm-pack || true)
cd wasm && wasm-pack test --node
# cargo test --target wasm32-unknown-unknown
- clear_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-wasm-cache
check-fmt:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- install_rust_nightly
- setup_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-fmt-cache
- run:
name: Check style
no_output_timeout: 35m
command: cargo +nightly fmt --all -- --check
- clear_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-fmt-cache
check-clippy:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.xlarge >>
steps:
- checkout
- setup_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-clippy-cache
- run:
name: Check Clippy
no_output_timeout: 35m
command: |
cargo clippy --workspace --all-targets -- -D warnings
cargo clippy --workspace --all-targets --all-features -- -D warnings
- clear_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-clippy-cache
check-all-targets:
docker:
- image: cimg/rust:1.81.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
resource_class: << pipeline.parameters.small >>
steps:
- checkout
- setup_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-all-targets-cache
- run:
name: Check all targets
no_output_timeout: 35m
command: cargo check --release --workspace --all-targets
- clear_environment:
cache_key: v1.0.0-rust-1.81.0-snarkvm-all-targets-cache
verify-windows:
executor:
name: windows/default
size: xlarge
environment:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
parameters:
workspace_member:
type: string
steps:
- check_windows:
workspace_member: << parameters.workspace_member >>
workflows:
version: 2
main-workflow:
jobs:
- snarkvm
- algorithms
- algorithms-profiler
- circuit
- circuit-account
- circuit-account-noconsole
- circuit-algorithms
- circuit-collections
- circuit-collections-noconsole
- circuit-environment
- circuit-network
- circuit-program
- circuit-types
- circuit-types-address
- circuit-types-boolean
- circuit-types-field
- circuit-types-group
- circuit-types-integers
- circuit-types-scalar
- circuit-types-string
- console
- console-account
- console-algorithms
- console-collections
- console-network
- console-network-environment
- console-program
- console-types
- console-types-address
- console-types-boolean
- console-types-field
- console-types-group
- console-types-integers
- console-types-scalar
- console-types-string
- curves
- fields
- ledger
# TODO (howardwu) - Implement `open_testing` on all storage, update to `CurrentConsensusStore::open_testing`, then re-enable.
# - ledger-with-rocksdb
- ledger-with-valid-solutions
- ledger-authority
- ledger-block
- ledger-committee
- ledger-narwhal
- ledger-narwhal-batch-certificate
- ledger-narwhal-batch-header
- ledger-narwhal-data
- ledger-narwhal-subdag
- ledger-narwhal-transmission
- ledger-narwhal-transmission-id
- ledger-puzzle
- ledger-puzzle-epoch
- ledger-query
- ledger-store
- ledger-test-helpers
- parameters
- parameters-uncached
- synthesizer
- synthesizer-integration
- synthesizer-process
- synthesizer-process-with-rocksdb
- synthesizer-program
- synthesizer-program-integration
- synthesizer-program-integration-keccak
- synthesizer-program-integration-psd
- synthesizer-program-integration-sha
- synthesizer-program-integration-instruction-is
- synthesizer-program-integration-instruction-equal
- synthesizer-program-integration-instruction-commit
- synthesizer-snark
- utilities
- utilities-derives
- wasm
- check-fmt
- check-clippy
- check-all-targets
windows-workflow:
jobs:
- verify-windows:
matrix:
parameters:
workspace_member: [
algorithms,
circuit,
console,
curves,
fields,
ledger,
parameters,