Get block hash const libfunc #521
Workflow file for this run
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
name: Bench | |
on: | |
pull_request: | |
branches: [main] | |
merge_group: | |
types: [checks_requested] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
bench-hyperfine: | |
name: Hyperfine | |
runs-on: ubuntu-latest | |
env: | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
MLIR_SYS_170_PREFIX: /usr/lib/llvm-17/ | |
TABLEGEN_170_PREFIX: /usr/lib/llvm-17/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: check and free hdd space left | |
run: | | |
echo "Listing 20 largest packages" | |
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20 | |
df -h | |
sudo apt-get update | |
sudo apt-get remove -y '^llvm-.*' | |
sudo apt-get remove -y 'php.*' | |
sudo apt-get remove -y '^dotnet-.*' | |
sudo apt-get remove -y '^temurin-.*' | |
sudo apt-get remove -y azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel | |
sudo apt-get autoremove -y | |
sudo apt-get clean | |
df -h | |
echo "Removing large directories" | |
# deleting 15GB | |
sudo rm -rf /usr/share/dotnet/ | |
sudo rm -rf /usr/local/lib/android | |
df -h | |
- uses: dtolnay/[email protected] | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: add llvm deb repository | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main | |
repo-name: llvm-repo | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: Install LLVM | |
run: sudo apt-get install llvm-17 llvm-17-dev llvm-17-runtime clang-17 clang-tools-17 lld-17 libpolly-17-dev libmlir-17-dev mlir-17-tools | |
- name: Install hyperfine | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: Install deps | |
run: make deps | |
- name: Build project | |
run: make build | |
- name: Run benchmarks | |
run: ./scripts/bench-hyperfine.sh programs/benches/*.cairo | |
- name: Create markdown file | |
run: bash .github/scripts/merge-benches.sh | |
- name: Find Bench Comment | |
uses: peter-evans/find-comment@v2 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Benchmarking | |
- name: Create or update bench comment | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: bench-hyperfine.md | |
edit-mode: replace |