diff --git a/.github/workflows/publish-x86_64-pc-windows-wasm.yml b/.github/workflows/publish-x86_64-pc-windows-wasm.yml new file mode 100644 index 00000000000..5684333bd91 --- /dev/null +++ b/.github/workflows/publish-x86_64-pc-windows-wasm.yml @@ -0,0 +1,75 @@ +# such target does not exist, name choosen for convention only +name: build-x86_64-pc-windows-wasm +# --- + +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 + + - 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