Skip to content

Commit 86aa514

Browse files
authored
Merge pull request #2945 from ProvableHQ/ci/semver-errors
[Chore] Update baseline revision for semver checks
2 parents 619464c + ad8621c commit 86aa514

2 files changed

Lines changed: 47 additions & 14 deletions

File tree

.circleci/config.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,31 @@ commands:
3737
- restore_cache:
3838
key: cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
3939
- run:
40-
name: "Install Rust and run cargo check"
40+
name: "Install Rust"
4141
command: |
4242
$ProgressPreference = "SilentlyContinue"
43-
# Remove the circleci installed rustc.
44-
choco uninstall -y rust
43+
# Remove the version of rustc that (might be) installed already..
44+
# Use non-interactive mode and force uninstall to prevent the job from getting stuck.
45+
choco uninstall rust -y --force
46+
4547
# Install rust with rustup.
4648
Invoke-WebRequest -Uri "https://win.rustup.rs/" -OutFile "C:\rustup-init.exe"
4749
& C:\rustup-init.exe -y --default-toolchain "1.88.0-x86_64-pc-windows-msvc" --no-modify-path --profile minimal # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
50+
51+
# Add cargo to PATH
4852
$Env:Path += ";$Env:USERPROFILE\.cargo\bin"
4953
# Verify the installation.
5054
cargo --version --verbose
5155
rustc --version | Out-File -FilePath "rust-version"
5256
if (!(Test-Path "Cargo.lock" -PathType Leaf)) {
5357
cargo generate-lockfile
5458
}
59+
- run:
60+
name: "Run cargo check"
61+
command: |
62+
# Add cargo to PATH
63+
$Env:Path += ";$Env:USERPROFILE\.cargo\bin"
64+
# Check that the given package compiles
5565
cd << parameters.workspace_member >>
5666
cargo check --examples --benches --tests
5767
- save_cache:
@@ -130,15 +140,19 @@ commands:
130140
type: string
131141
default: ""
132142
timeout:
133-
type: integer
134-
default: 10
143+
type: string
144+
default: 10m
145+
no_output_timeout:
146+
type: string
147+
default: 10m
135148
steps:
136149
- checkout
137150
- setup_environment:
138151
cache_key: v4.2.0-rust-1.88.0-<< parameters.workspace_member >><< parameters.cache_key_suffix >>-cache
139152
- run:
140153
name: "Run Tests"
141154
timeout: << parameters.timeout >>
155+
no_output_timeout: << parameters.no_output_timeout >>
142156
command: RUST_MIN_STACK=67108864 cargo test --package=<< parameters.workspace_member >> << parameters.flags >>
143157
- clear_environment:
144158
cache_key: v4.2.0-rust-1.88.0-<< parameters.workspace_member >><< parameters.cache_key_suffix >>-cache
@@ -432,7 +446,7 @@ jobs:
432446
- run_test:
433447
workspace_member: snarkvm-ledger
434448
flags: --release --features=rocks -- --test-threads=2
435-
timeout: 20
449+
timeout: 20m
436450

437451
ledger-with-valid-solutions:
438452
executor: rust-docker
@@ -555,7 +569,7 @@ jobs:
555569
resource_class: << pipeline.parameters.twoxlarge >>
556570
steps:
557571
- run_test:
558-
timeout: 20
572+
timeout: 20m
559573
workspace_member: snarkvm-parameters
560574
flags: -- --test-threads=2
561575

@@ -567,6 +581,9 @@ jobs:
567581
workspace_member: snarkvm-parameters
568582
flags: --no-run --features large_params
569583
cache_key_suffix: -large
584+
# Compilation can take very long and produce no output for a while.
585+
no_output_timeout: 20m
586+
timeout: 30m
570587

571588
parameters-uncached:
572589
executor: rust-docker
@@ -584,7 +601,7 @@ jobs:
584601
- run_test:
585602
workspace_member: snarkvm-synthesizer
586603
flags: --lib --bins
587-
timeout: 20
604+
timeout: 20m
588605

589606
synthesizer-test:
590607
executor: rust-docker
@@ -594,7 +611,7 @@ jobs:
594611
workspace_member: snarkvm-synthesizer
595612
flags: --lib --bins --features test
596613
cache_key_suffix: -test
597-
timeout: 25
614+
timeout: 25m
598615

599616
# synthesizer-mem-heavy:
600617
# executor: rust-docker
@@ -610,8 +627,11 @@ jobs:
610627
resource_class: << pipeline.parameters.twoxlarge >>
611628
steps:
612629
- run_test:
630+
timeout: 30m
631+
# test_vm_execute_and_finalize can take over 10 minutes in the current setup
632+
no_output_timeout: 20m
613633
workspace_member: snarkvm-synthesizer
614-
flags: --test '*' --features test -- --test-threads=4
634+
flags: --test '*' --features test -- --test-threads=4
615635
cache_key_suffix: -integration
616636

617637
synthesizer-process:
@@ -655,6 +675,8 @@ jobs:
655675
- run_test:
656676
workspace_member: snarkvm-synthesizer-program
657677
flags: keccak
678+
timeout: 30m
679+
no_output_timeout: 20m
658680
cache_key_suffix: -integration-keccak
659681

660682
synthesizer-program-integration-psd:
@@ -673,6 +695,8 @@ jobs:
673695
- run_test:
674696
workspace_member: snarkvm-synthesizer-program
675697
flags: sha
698+
timeout: 30m
699+
no_output_timeout: 20m
676700
cache_key_suffix: -integration-sha
677701

678702
synthesizer-program-integration-instruction-is:
@@ -797,7 +821,7 @@ jobs:
797821

798822
check-cargo-semver-checks:
799823
executor: rust-docker
800-
resource_class: << pipeline.parameters.large >>
824+
resource_class: << pipeline.parameters.twoxlarge >>
801825
steps:
802826
- checkout
803827
- setup_environment:
@@ -806,9 +830,8 @@ jobs:
806830
name: Check for semver violations
807831
no_output_timeout: 15m
808832
command: |
809-
cargo install cargo-semver-checks@0.43.0 --locked
810-
BASELINE_REV=eff84712b # UPDATE ME ON NECESSARY BREAKING CHANGES
811-
cargo semver-checks --workspace --default-features --baseline-rev $BASELINE_REV
833+
bash ./.circleci/semver-checks.sh
834+
812835
- clear_environment:
813836
cache_key: v4.2.0-rust-1.88.0-cargo-semver-checks-cache
814837

.circleci/semver-checks.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /bin/bash
2+
3+
# Ensure that the command is installed.
4+
cargo install cargo-semver-checks@0.43.0 --locked
5+
6+
BASELINE_REV=eff84712b # UPDATE ME ON NECESSARY BREAKING CHANGES
7+
8+
# Exclude CLI as it has been removed
9+
cargo semver-checks --workspace --default-features \
10+
--exclude=snarkvm-cli --baseline-rev $BASELINE_REV

0 commit comments

Comments
 (0)