Skip to content
Closed
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
75 changes: 75 additions & 0 deletions .github/workflows/publish-x86_64-pc-windows-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# such target does not exist, name choosen for convention only
name: build-x86_64-pc-windows-wasm
# <arch>-<vendor>-<os>-<env>

on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC
push:

jobs:
build-x86_64-pc-windows-msvc:
runs-on: windows-2022
strategy:
max-parallel: 1
matrix:
target: [x86_64-pc-windows-msvc]

steps:
- name: Checkout
uses: actions/checkout@v1

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Rust toolchain Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
default: true
override: true

- name: Patch backend in crates/nargo/Cargo.toml
run: |
(Get-Content crates/nargo/Cargo.toml) -replace 'aztec_backend = { optional = true, git = "https://github.com/noir-lang/aztec_backend", rev = "01b922adcb5a9d70b2d12304e1cb7487d9f28188" }', 'aztec_backend = { optional = true, git = "https://github.com/noir-lang/aztec_backend", features = ["wasm-base"], default-features = false }' | Out-File -encoding ASCII crates/nargo/Cargo.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to add a wildcard to the rev here so that we don't need to update this file each time we change the aztec_backend rev in our Cargo.toml?


- name: Build environment and Compile
run: |
cargo build --release --target ${{ matrix.target }}

- name: Package artifacts
run: |
mkdir dist
ls target
ls target/release
cp ./target/${{ matrix.target }}/release/nargo.exe ./dist/nargo.exe
mkdir -p ./dist/noir-lang/std
cp crates/std_lib/src/*.nr ./dist/noir-lang/std
7z a -tzip nargo-${{ matrix.target }}.zip ./dist/*

- name: Upload binaries to nightly
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip
overwrite: true
tag: nightly

- name: Upload binaries to Version
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip