Skip to content

feat(traits): Improve support for traits static method resolution #425

feat(traits): Improve support for traits static method resolution

feat(traits): Improve support for traits static method resolution #425

Workflow file for this run

name: Wasm
on:
pull_request:
merge_group:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-nargo:
runs-on: ubuntu-22.04
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]
steps:
- name: Checkout Noir repo
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.66.0
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- name: Build Nargo
run: cargo build --package nargo_cli --release
- name: Package artifacts
run: |
mkdir dist
cp ./target/release/nargo ./dist/nargo
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-x86_64-unknown-linux-gnu.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: nargo
path: ./dist/*
retention-days: 3
build-wasm:
runs-on: ubuntu-latest
env:
CACHED_PATH: /tmp/nix-cache
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: barretenberg
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build wasm package
run: |
nix build -L .#noir_wasm
- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: noir_wasm
path: ${{ env.UPLOAD_PATH }}
retention-days: 3
test:
needs: [build-wasm, build-nargo]
name: Test noir_wasm
runs-on: ubuntu-latest
steps:
- name: Checkout noir-lang/noir
uses: actions/checkout@v4
- name: Download wasm package artifact
uses: actions/download-artifact@v3
with:
name: noir_wasm
path: ./compiler/wasm/downloaded
- name: Download nargo binary
uses: actions/download-artifact@v3
with:
name: nargo
path: ./nargo
- name: Compile test program with Nargo CLI
working-directory: ./compiler/wasm/noir-script
run: |
nargo_binary=${{ github.workspace }}/nargo/nargo
chmod +x $nargo_binary
$nargo_binary compile
- name: Install Yarn dependencies
uses: ./.github/actions/setup
- name: Install Playwright
uses: ./.github/actions/install-playwright
- name: Install dependencies
run: |
cp -r ./compiler/wasm/downloaded/nodejs ./compiler/wasm
cp -r ./compiler/wasm/downloaded/web ./compiler/wasm
yarn workspace @noir-lang/source-resolver build
- name: Run node tests
run: yarn workspace @noir-lang/noir_wasm test:node
- name: Run browser tests
run: yarn workspace @noir-lang/noir_wasm test:browser