Skip to content

Update iai-callgrind from 0.3.1 to 0.14.0 #1992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: benchmark
name: benchmark

on:
push:
Expand All @@ -12,13 +12,13 @@ permissions:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Install Rust
uses: dtolnay/[email protected]
with:
components: rustfmt, clippy
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Python3 Build
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cairo_1_programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
jobs:
run:
name: Execute programs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install Rust toolchain
uses: dtolnay/[email protected]
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: install corelib
run: cd cairo1-run/ && make deps
- name: Run tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fresh_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
deps_suffix: ''
os_name: ubuntu-22.04
- os: macos-latest
deps_suffix: '-macos'
deps_suffix: '-macos'
os_name: macos
runs-on: ${{ matrix.os_name }}
name: "Make deps, build & test on fresh ${{ matrix.os_name }} system"
Expand All @@ -35,7 +35,7 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/[email protected]
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
FAILED_TARGET=deps${{ matrix.deps_suffix }}
elif [ ${{ steps.build.outcome }} = failure ]; then
FAILED_TARGET=build
else
else
FAILED_TARGET=test
fi
echo "FAILED_TARGET=$FAILED_TARGET" >> $GITHUB_ENV
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/fuzzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -22,7 +22,7 @@ jobs:
path: fuzzer/hfuzz_workspace/fuzz_json/input
key: ${{ runner.os }}-inputs


- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -38,12 +38,12 @@ jobs:
run: cargo install honggfuzz

# If has cached inputs starts with them or else starts from 0
- name: Initializing fuzzer with previous inputs
- name: Initializing fuzzer with previous inputs
run: |
cd fuzzer
HFUZZ_RUN_ARGS="--dict=json.dict --run_time 10800 --timeout 60" cargo hfuzz run fuzz_json

# run the fuzzer with minimize to reduce inputs
# run the fuzzer with minimize to reduce inputs
- name: Initializing fuzzer with minimize
run: |
cd fuzzer
Expand All @@ -55,20 +55,20 @@ jobs:
file_pattern: '*/hfuzz_workspace/fuzzer/fuzz_json/HONGGFUZZ* */hfuzz_workspace/fuzzer/fuzz_json/*.fuzz'

# Checkout current and last commit for the diff
- name: Checkout commits
uses: actions/checkout@v3
- name: Checkout commits
uses: actions/checkout@v4
with:
fetch-depth: 2

# Check if any new crashes were added
- name: Check diff
id: check_file_changed
run: echo "report=$(git diff --name-only HEAD^ HEAD -- fuzzer/hfuzz_workspace/fuzz_json/*.fuzz)" >> $GITHUB_OUTPUT
run: echo "report=$(git diff --name-only HEAD^ HEAD -- fuzzer/hfuzz_workspace/fuzz_json/*.fuzz)" >> $GITHUB_OUTPUT

# If a new crash was found, create an issue
- name: Create issue
- name: Create issue
uses: JasonEtco/create-an-issue@v2
if: ${{ steps.check_file_changed.outputs.report != '' }}
if: ${{ steps.check_file_changed.outputs.report != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CRASH_REPORT: ${{ steps.check_file_changed.outputs.report }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hint_accountant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ env:

jobs:
run:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install Rust toolchain
uses: dtolnay/[email protected]
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check Build
run: cargo build -p hint_accountant
- name: Clone cairo-lang repo
run: git clone --depth=1 https://github.com/starkware-libs/cairo-lang
- name: Run the hint accounting script
run: cargo r -p hint_accountant | tee comment.md
- name: Update comment in tracking issue
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: 1031
comment-id: 1518234161
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/hyper_threading_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -35,7 +35,7 @@ jobs:
cargo build --release -p hyper_threading
cp target/release/hyper_threading ${{ github.workspace }}/hyper_threading_pr
cp ./examples/hyper_threading/hyper-threading-workflow.sh ${{ github.workspace }}/hyper-threading-workflow.sh

- name: Upload PR Binary
uses: actions/upload-artifact@v4
with:
Expand All @@ -50,7 +50,7 @@ jobs:


- name: Checkout Main Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: 'main'

Expand All @@ -71,7 +71,7 @@ jobs:
name: hyper_threading_workflow_script
path: ${{ github.workspace }}/

- name: Compile programs
- name: Compile programs
run: make cairo_bench_programs

- name: Run Benchmarks
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
matrix:
branch: [ base, head ]
name: Build Cairo programs for ${{ matrix.branch }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
benchmark-hashes-base: ${{ steps.export-hashes.outputs.benchmark-hashes-base }}
benchmark-hashes-head: ${{ steps.export-hashes.outputs.benchmark-hashes-head }}
steps:
- name: Checkout base commit
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request[matrix.branch].sha }}

- name: Fetch from cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ${{ matrix.branch }}_programs/*.json
Expand Down Expand Up @@ -63,10 +63,10 @@ jobs:
matrix:
branch: [ base, head ]
name: Build cairo-vm-cli for ${{ matrix.branch }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Populate cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: bin/cairo-vm-cli-${{ matrix.branch }}
Expand All @@ -78,7 +78,7 @@ jobs:

- name: Checkout
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request[matrix.branch].sha }}

Expand All @@ -100,33 +100,33 @@ jobs:
program_state: [ modified, unmodified ]
name: Run benchmarks for ${{ matrix.program_state }} programs
needs: [ build-programs, build-binaries ]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install Hyperfine
uses: taiki-e/install-action@v2
with:
tool: hyperfine@1.16
tool: hyperfine@1.19

- name: Fetch base binary
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: bin/cairo-vm-cli-base
key: binary-${{ github.event.pull_request.base.sha }}

- name: Fetch HEAD binary
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: bin/cairo-vm-cli-head
key: binary-${{ github.event.pull_request.head.sha }}

- name: Fetch base programs
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: base_programs/*.json
key: benchmarks-base-${{ needs.build-programs.outputs.benchmark-hashes-base }}

- name: Fetch head programs
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: head_programs/*.json
key: benchmarks-head-${{ needs.build-programs.outputs.benchmark-hashes-head }}
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:

- name: Find comment
if: ${{ steps.run-benchmarks.outputs.benchmark_count != 0 }}
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -184,14 +184,14 @@ jobs:

- name: Create comment
if: steps.fc.outputs.comment-id == '' && steps.run-benchmarks.outputs.benchmark_count != 0
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: comment_body.md

- name: Update comment
if: steps.fc.outputs.comment-id != '' && steps.run-benchmarks.outputs.benchmark_count != 0
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body-path: comment_body.md
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/iai_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:

jobs:
cache-iai-results:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/[email protected]
- name: Set up cargo cache
Expand All @@ -23,7 +23,7 @@ jobs:
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
cargo install --version 0.3.1 iai-callgrind-runner
cargo install --version 0.14.0 iai-callgrind-runner

- name: Run iai benchmarks
run: make iai-benchmark-action
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/iai_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:

jobs:
fetch-iai-results:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Initialize IAI cache for ${{ github.event.pull_request.base.sha }}
Expand Down Expand Up @@ -38,18 +38,18 @@ jobs:
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
cargo install --version 0.3.1 iai-callgrind-runner
cargo install --version 0.14.0 iai-callgrind-runner

- name: Run iai benchmarks
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
run: make iai-benchmark-action

run-iai-benchmark:
needs: fetch-iai-results
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/[email protected]
- name: Set up cargo cache
Expand All @@ -63,7 +63,7 @@ jobs:
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
cargo install --version 0.3.1 iai-callgrind-runner
cargo install --version 0.14.0 iai-callgrind-runner

- name: Restore cache for ${{ github.event.pull_request.base.sha }}
uses: actions/cache/restore@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: publish

on:
push:
tags:
tags:
- '*'

jobs:
Expand All @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/[email protected]
- name: Publish crate cairo-vm
Expand Down
Loading
Loading