Skip to content

Commit

Permalink
ci: Fix cycle regression checker (#188)
Browse files Browse the repository at this point in the history
* ci: Fix cycle regression checker

* Test workflow

* Prep for review
  • Loading branch information
samuelburnham authored and tchataigner committed Sep 27, 2024
1 parent f92e03a commit 3df2a8a
Show file tree
Hide file tree
Showing 15 changed files with 82 additions and 53 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:
for test_name in ${{ env.TESTS }}; do
cargo nextest run --verbose --release --profile ci ${{ env.FEATURES }} --package ${{ matrix.package }}-lc --no-capture -E "test($test_name)" 2>&1 | tee out.txt
num_cycles=$(cat out.txt | grep -o 'finished execution clk = [0-9]\+' | awk -F'= ' '{ print $2 }')
num_cycles=$(cat out.txt | grep -o 'summary: cycles=[0-9]\+' | awk -F'=' '{ print $2 }')
CYCLE_COUNTS=$(echo $CYCLE_COUNTS | jq -c ". += [{\"${test_name}\": \"$num_cycles\"}]")
done
Expand All @@ -244,10 +244,9 @@ jobs:
REGRESSION="false"
set -o pipefail
# TODO: Remove hardcoded test names
for test_name in ${{ env.TESTS }}; do
cargo nextest run --verbose --release --profile ci ${{ env.FEATURES }} --package ${{ matrix.package }}-lc --no-capture -E "test($test_name)" 2>&1 | tee out.txt
num_cycles_base=$(cat out.txt | grep -o 'finished execution clk = [0-9]\+' | awk -F'= ' '{ print $2 }')
num_cycles_base=$(cat out.txt | grep -o 'summary: cycles=[0-9]\+' | awk -F'=' '{ print $2 }')
num_cycles_pr=$(echo "$CYCLE_COUNTS" | jq ".[$counter] | to_entries | .[0].value")
echo "$test_name summary"
echo "Base = $num_cycles_base cycles, PR = ${num_cycles_pr:1:-1} cycles"
Expand Down
66 changes: 41 additions & 25 deletions aptos/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aptos/aptos-programs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aptos-programs"
version = "1.0.1"
version = "1.1.0"
edition = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
Expand Down
Binary file not shown.
Binary file modified aptos/aptos-programs/artifacts/epoch-change-program
Binary file not shown.
Binary file modified aptos/aptos-programs/artifacts/inclusion-program
Binary file not shown.
2 changes: 1 addition & 1 deletion aptos/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aptos-lc-core"
version = "1.0.1"
version = "1.1.0"
edition = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion aptos/core/src/crypto/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl PublicKey {
/// A `Vec<u8>` representing the public key.
pub fn to_bytes(&self) -> Vec<u8> {
let mut bytes = BytesMut::new();
let pub_key_bytes = self.compressed_pubkey.as_ref();
let pub_key_bytes: &[u8] = self.compressed_pubkey.as_ref();

bytes.put_slice(&write_leb128(pub_key_bytes.len() as u64));
bytes.put_slice(pub_key_bytes);
Expand Down
4 changes: 2 additions & 2 deletions aptos/light-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aptos-lc"
version = "1.0.1"
version = "1.1.0"
edition = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
Expand All @@ -20,7 +20,7 @@ anyhow = { workspace = true }
getset = { workspace = true }
serde = { workspace = true, features = ["derive", "rc"] }
thiserror = { workspace = true }
bcs = { workspace = true, optional = true }
bcs = { workspace = true, optional = true }

[dev-dependencies]
aptos-programs = { path = "../aptos-programs", features = ["bench"] }
Expand Down
Loading

0 comments on commit 3df2a8a

Please sign in to comment.