Skip to content

Commit

Permalink
Merge branch 'main' into fix/get_constant_from_var_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppen authored May 9, 2024
2 parents 6b22b68 + f47f760 commit 97bb7df
Show file tree
Hide file tree
Showing 347 changed files with 11,775 additions and 5,510 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
with:
components: rustfmt, clippy
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cairo_1_programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: pipelines,coverage
skipLabels: pipelines,tests,documentation
2 changes: 1 addition & 1 deletion .github/workflows/fresh_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1

- name: Install Pyenv
uses: "gabrielfalcao/pyenv-action@v13"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hint_accountant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down
110 changes: 110 additions & 0 deletions .github/workflows/hyper_threading_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Benchmark Hyper Threading

on:
pull_request:
branches:
- main

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install Dependencies
run: |
pip install -r requirements.txt
sudo apt update
sudo apt-get install -y hyperfine
- name: Install Rust
uses: dtolnay/[email protected]
with:
components: rustfmt, clippy

- name: Compile PR Version
run: |
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:
name: hyper_threading_pr_binary
path: ${{ github.workspace }}/hyper_threading_pr

- name: Upload Workflow Script
uses: actions/upload-artifact@v4
with:
name: hyper_threading_workflow_script
path: ${{ github.workspace }}/hyper-threading-workflow.sh


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

- name: Compile Main Version
run: |
cargo build --release -p hyper_threading
cp target/release/hyper_threading ${{ github.workspace }}/hyper_threading_main
- name: Download hyper_threading_pr_binary
uses: actions/download-artifact@v4
with:
name: hyper_threading_pr_binary
path: ${{ github.workspace }}/

- name: Download hyper_threading_workflow_script
uses: actions/download-artifact@v4
with:
name: hyper_threading_workflow_script
path: ${{ github.workspace }}/

- name: Compile programs
run: make cairo_bench_programs

- name: Run Benchmarks
run: |
cd ${{ github.workspace }}
chmod +x ./hyper_threading_main
chmod +x ./hyper_threading_pr
chmod +x hyper-threading-workflow.sh
./hyper-threading-workflow.sh
- name: Compare Results
run: |
cat result.md
- name: Find comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "**Hyper Thereading Benchmark results**"

- name: Create comment
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: result.md

- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body-path: result.md
edit-mode: replace
2 changes: 1 addition & 1 deletion .github/workflows/hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Install Rust
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1

- name: Checkout
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iai_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Python3 Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iai_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Install Rust
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up cargo cache
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Python3 Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Publish crate cairo-vm
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
Loading

0 comments on commit 97bb7df

Please sign in to comment.