Skip to content

Commit

Permalink
Npm release (#989)
Browse files Browse the repository at this point in the history
* WIP deploy packages to public NPM

* add deploy-npm to workflow

* revert package name

* update all versions, remove deploy_ecr step

* bump VERSION

* return of the deploy_ecr

* update build system

* formatting json changes

* deploy l1-artifacts

* build all necessary projects

* add jobs to workflow

* add binary, remove node warnings

* add main to package.json

* copy wasm in circuits.js package

* update build-system

* only deploy tagged commits on master
  • Loading branch information
spypsy authored Jul 10, 2023
1 parent 5942e43 commit d239ce9
Show file tree
Hide file tree
Showing 24 changed files with 1,564 additions and 1,262 deletions.
176 changes: 173 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ jobs:
name: "Build and test"
command: build aztec.js

aztec-cli:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build aztec-cli

types:
machine:
image: ubuntu-2004:202010-01
Expand All @@ -220,6 +231,39 @@ jobs:
name: "Build and test"
command: build types

l1-artifacts:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build l1-artifacts

aztec-node:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build aztec-node

key-store:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build key-store

noir-contracts:
machine:
image: ubuntu-2004:202010-01
Expand Down Expand Up @@ -546,7 +590,117 @@ jobs:
name: "Noop"
command: echo Noop

deploy:
deploy-npm:
machine:
image: ubuntu-2004:202010-01
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "foundation"
working_directory: foundation
command: |
deploy_ecr foundation
deploy_npm foundation
- run:
name: "circuits.js"
working_directory: circuits.js
command: |
deploy_ecr circuits.js
deploy_npm circuits.js
- run:
name: "merkle-tree"
working_directory: merkle-tree
command: |
deploy_ecr merkle-tree
deploy_npm merkle-tree
- run:
name: "noir-contracts"
working_directory: noir-contracts
command: |
deploy_ecr noir-contracts
deploy_npm noir-contracts
- run:
name: "l1-artifacts"
working_directory: l1-artifacts
command: |
deploy_ecr l1-artifacts
deploy_npm l1-artifacts
- run:
name: "aztec-ethereum"
working_directory: ethereum
command: |
deploy_ecr ethereum
deploy_npm ethereum
- run:
name: "types"
working_directory: types
command: |
deploy_ecr types
deploy_npm types
- run:
name: "acir-simulator"
working_directory: acir-simulator
command: |
deploy_ecr acir-simulator
deploy_npm acir-simulator
- run:
name: "archiver"
working_directory: archiver
command: |
deploy_ecr archiver
deploy_npm archiver
- run:
name: "p2p"
working_directory: p2p
command: |
deploy_ecr p2p
deploy_npm p2p
- run:
name: "world-state"
working_directory: world-state
command: |
deploy_ecr world-state
deploy_npm world-state
- run:
name: "sequencer-client"
working_directory: sequencer-client
command: |
deploy_ecr sequencer-client
deploy_npm sequencer-client
- run:
name: "aztec-node"
working_directory: aztec-node
command: |
deploy_ecr aztec-node
deploy_npm aztec-node
- run:
name: "key-store"
working_directory: key-store
command: |
deploy_ecr key-store
deploy_npm key-store
- run:
name: "aztec-rpc"
working_directory: aztec-rpc
command: |
deploy_ecr aztec-rpc
deploy_npm aztec-rpc
- run:
name: "aztec.js"
working_directory: aztec.js
command: |
deploy_ecr aztec.js
deploy_npm aztec.js
- run:
name: "aztec-cli"
working_directory: aztec-cli
command: |
deploy_ecr aztec-cli
deploy_npm aztec-cli
deploy-dockerhub:
machine:
image: ubuntu-2004:202010-01
resource_class: medium
Expand All @@ -560,8 +714,9 @@ jobs:
deploy_ecr aztec-sandbox
deploy_dockerhub aztec-sandbox master
# Repeatable config for defining the workflow below.
tag_regex: &tag_regex /v[0-9]+(\.[0-9]+)*(-[a-zA-Z-]+\.[0-9]+)?/
tag_regex: &tag_regex /^v.*/
defaults: &defaults
filters:
tags:
Expand Down Expand Up @@ -631,9 +786,13 @@ workflows:
- acir-simulator: *yarn_project
- archiver: *yarn_project
- aztec-rpc: *yarn_project
- aztec-node: *yarn_project
- aztec-cli: *yarn_project
- key-store: *yarn_project
- merkle-tree: *yarn_project
- p2p: *yarn_project
- p2p-bootstrap: *yarn_project
- l1-artifacts: *yarn_project
- noir-contracts: *yarn_project
- noir-compiler: *yarn_project
- sequencer-client: *yarn_project
Expand All @@ -652,9 +811,13 @@ workflows:
- acir-simulator
- archiver
- aztec-rpc
- aztec-node
- aztec-cli
- key-store
- merkle-tree
- p2p
- p2p-bootstrap
- l1-artifacts
- noir-contracts
- noir-compiler
- sequencer-client
Expand Down Expand Up @@ -694,11 +857,18 @@ workflows:
- e2e-p2p
<<: *defaults

- deploy:
- deploy-dockerhub:
requires:
- e2e-end
- aztec-sandbox
filters:
branches:
only: master
<<: *defaults
- deploy-npm:
requires:
- e2e-end
filters:
branches:
only: master
<<: *defaults
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0
v0.1
2 changes: 1 addition & 1 deletion build-system
3 changes: 1 addition & 2 deletions build_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@
"^yarn-project/circuits.js/"
],
"dependencies": [
"foundation",
"yarn-project-base"
"foundation"
]
},
"end-to-end": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/acir-simulator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/acir-simulator",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/archiver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/archiver",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/aztec-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@aztec/cli",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"main": "./dest/index.js",
"bin": {
"azti": "./dest/index.js"
},
"typedoc": {
"entryPoint": "./src/index.ts",
"displayName": "Aztec CLI",
"tsconfig": "./tsconfig.json"
},
"bin": {
"aztec_cli": "index.js"
},
"scripts": {
"prepare": "node ../yarn-project-base/scripts/update_build_manifest.mjs package.json",
"prepare:check": "node ../yarn-project-base/scripts/update_build_manifest.mjs package.json --check",
Expand All @@ -20,7 +20,7 @@
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
"formatting:fix": "run -T prettier -w ./src",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests",
"start": "node ./dest/index.js"
"start": "node --no-warnings ./dest/index.js"
},
"inherits": [
"../package.common.json"
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env -S node --no-warnings
import { Command } from 'commander';
import { createLogger } from '@aztec/foundation/log';
import { createDebugLogger } from '@aztec/foundation/log';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/aztec-node",
"version": "0.0.0",
"version": "0.1.0",
"main": "dest/index.js",
"type": "module",
"exports": "./dest/index.js",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/aztec-rpc",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/aztec.js",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
3 changes: 3 additions & 0 deletions yarn-project/circuits.js/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder
# (1) project
COPY . .


# (2) build
WORKDIR /usr/src/yarn-project/circuits.js
RUN yarn build && yarn formatting
Expand All @@ -17,5 +18,7 @@ RUN yarn workspaces focus --production > /dev/null
# (5) set up entry point
FROM node:18-alpine
COPY --from=builder /usr/src/yarn-project /usr/src/yarn-project
RUN rm /usr/src/yarn-project/circuits.js/resources/aztec3-circuits.wasm
COPY --from=builder /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/yarn-project/circuits.js/resources/aztec3-circuits.wasm
WORKDIR /usr/src/yarn-project/circuits.js
ENTRYPOINT ["yarn", "test"]
3 changes: 1 addition & 2 deletions yarn-project/circuits.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/circuits.js",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": {
".": "./dest/index.js",
Expand Down Expand Up @@ -53,7 +53,6 @@
"tslib": "^2.4.0"
},
"devDependencies": {
"@aztec/yarn-project-base": "workspace:^",
"@jest/globals": "^29.5.0",
"@types/detect-node": "^2.0.0",
"@types/jest": "^29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/ethereum/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/ethereum",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/foundation",
"version": "0.0.0",
"version": "0.1.0",
"packageManager": "[email protected]",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/key-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/key-store",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"typedoc": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/l1-artifacts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/l1-artifacts",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": {
".": "./dest/index.js"
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/merkle-tree/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/merkle-tree",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"exports": "./dest/index.js",
"scripts": {
Expand Down
Loading

0 comments on commit d239ce9

Please sign in to comment.