-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from starkware-libs/dori/merge-main-v0.13.2-i…
…nto-main-1722440900 Merge main-v0.13.2 into main
- Loading branch information
Showing
6 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ tmp_venv/* | |
/.vscode | ||
# Git hooks | ||
/.husky | ||
|
||
# Python artifacts. | ||
scripts/__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/env bash | ||
set -e | ||
|
||
function clean() { | ||
echo "Cleaning up..." | ||
deactivate || true | ||
rm -rf venv || true | ||
} | ||
|
||
|
||
function build() { | ||
echo "Building..." | ||
pushd crates/native_blockifier | ||
pypy3.9 -m venv venv | ||
source venv/bin/activate | ||
cargo build --release -p native_blockifier --features "testing" || clean | ||
clean | ||
popd | ||
} | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set -e | ||
|
||
if [ "$GITHUB_ACTIONS" = true ]; then | ||
echo "This script is not meant to be run in GitHub Actions." | ||
exit 1 | ||
fi | ||
|
||
# Restore security level in perf_event_paranoid at the end. | ||
ORIGINAL_PARANOID=$(echo $(sysctl kernel.perf_event_paranoid) | grep -o '[0-9]$') | ||
trap 'sudo sysctl kernel.perf_event_paranoid=$ORIGINAL_PARANOID' EXIT SIGINT SIGTERM | ||
|
||
if ! command -v jq; then | ||
cargo install jq | ||
fi | ||
if ! command -v flamegraph; then | ||
cargo install flamegraph | ||
fi | ||
if ! command -v perf; then | ||
sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r` | ||
fi | ||
|
||
ROOT_DIR=$(git rev-parse --show-toplevel) | ||
BENCH_INPUT_FILES_PREFIX=$(cat ${ROOT_DIR}/crates/committer_cli/src/tests/flow_test_files_prefix) | ||
# Lower security level in perf_event_paranoid to 2 to allow cargo to use perf without running on root. | ||
sudo sysctl kernel.perf_event_paranoid=2 | ||
|
||
gcloud storage cat gs://committer-testing-artifacts/${BENCH_INPUT_FILES_PREFIX}/committer_flow_inputs.json | jq -r .committer_input | CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -p committer_cli -- commit |