Skip to content
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

chore: create a CI action to download nargo and add to path #7281

Merged
merged 5 commits into from
Feb 5, 2025
Merged
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
18 changes: 18 additions & 0 deletions .github/actions/download-nargo/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Download Nargo
description: Downloads the nargo binary from an artifact and adds it to the path

runs:
using: composite
steps:
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
shell: bash
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
13 changes: 1 addition & 12 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,7 @@ jobs:
uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Format stdlib
working-directory: ./noir_stdlib
Expand Down
101 changes: 13 additions & 88 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,7 @@ jobs:
echo "$HOME/.bb/" >> $GITHUB_PATH

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Generate gates report
working-directory: ./test_programs
Expand Down Expand Up @@ -100,18 +89,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Generate Brillig bytecode size report
working-directory: ./test_programs
Expand Down Expand Up @@ -160,18 +138,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Generate Brillig execution report
working-directory: ./test_programs
Expand Down Expand Up @@ -220,18 +187,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Generate Memory report
working-directory: ./test_programs
Expand Down Expand Up @@ -272,18 +228,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
uses: ./.github/actions/download-nargo

- name: Generate Compilation report
working-directory: ./test_programs
Expand Down Expand Up @@ -336,29 +281,19 @@ jobs:

name: External repo compilation and execution reports - ${{ matrix.project.repo }}/${{ matrix.project.path }}
steps:
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V

- uses: actions/checkout@v4
with:
path: scripts
sparse-checkout: |
.github/actions/download-nargo/action.yml
test_programs/compilation_report.sh
test_programs/execution_report.sh
test_programs/parse_time.sh
sparse-checkout-cone-mode: false

- name: Download nargo binary
uses: scripts/.github/actions/download-nargo

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -451,27 +386,17 @@ jobs:

name: External repo memory report - ${{ matrix.project.repo }}/${{ matrix.project.path }}
steps:
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V

- uses: actions/checkout@v4
with:
path: scripts
sparse-checkout: |
./.github/actions/download-nargo/action.yml
test_programs/memory_report.sh
test_programs/parse_memory.sh
sparse-checkout-cone-mode: false

- name: Download nargo binary
uses: ./scripts/.github/actions/download-nargo

- name: Checkout
uses: actions/checkout@v4
Expand Down
Loading