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: Move tooling related items into their own directory #2644

Merged
merged 6 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm

- name: Run node tests
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm
run: yarn test

noirc-abi-wasm-test-browser:
Expand All @@ -110,7 +110,7 @@ jobs:
path: ./result

- name: Query playwright version
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm
run: echo "PLAYWRIGHT_VERSION=$(yarn info @web/test-runner-playwright --json | jq .children.Version)" >> $GITHUB_ENV

- name: Cache playwright binaries
Expand All @@ -124,15 +124,15 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm

- name: Install playwright deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm
run: |
npx playwright install
npx playwright install-deps

- name: Run browser tests
working-directory: ./crates/noirc_abi_wasm
working-directory: ./compiler/noirc_abi_wasm
run: yarn test:browser
12 changes: 6 additions & 6 deletions .github/workflows/release-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Bump version
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
id: bump_version
run: |
if [ -z "${{ github.event.inputs.version }}" ]; then
Expand All @@ -27,15 +27,15 @@ jobs:
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV

- name: Install dependencies
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm install

- name: Build noir-source-resolver
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run build

- name: Publish to NPM
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand All @@ -47,7 +47,7 @@ jobs:

- name: Commit updates
run: |
git add crates/source-resolver/package-lock.json
git add crates/source-resolver/package.json
git add compiler/source-resolver/package-lock.json
git add compiler/source-resolver/package.json
git commit -m "chore: Update source-resolver to ${{ env.NEW_VERSION }}"
git push
4 changes: 2 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ jobs:
retention-days: 3

- name: Install `integration-tests` dependencies
working-directory: ./crates/integration-tests
working-directory: ./compiler/integration-tests
run: yarn install

- name: Run `integration-tests`
working-directory: ./crates/integration-tests
working-directory: ./compiler/integration-tests
run: |
yarn test:browser

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Test Source Resolver
on:
push:
paths:
- "crates/source-resolver/**"
- "compiler/source-resolver/**"
pull_request:
paths:
- "crates/source-resolver/**"
- "compiler/source-resolver/**"

jobs:
test:
Expand All @@ -17,13 +17,13 @@ jobs:
uses: actions/checkout@v3

- name: Install dependencies
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm install

- name: Build noir-source-resolver
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run build

- name: Run tests
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run test
12 changes: 6 additions & 6 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: noir_wasm
path: ./crates/wasm/result
path: ./compiler/wasm/result

- name: Download nargo binary
uses: actions/download-artifact@v3
Expand All @@ -140,7 +140,7 @@ jobs:
path: ./nargo

- name: Compile test program with Nargo CLI
working-directory: ./crates/wasm/noir-script
working-directory: ./compiler/wasm/noir-script
run: |
nargo_binary=${{ github.workspace }}/nargo/nargo
chmod +x $nargo_binary
Expand All @@ -149,20 +149,20 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/wasm
working-directory: ./compiler/wasm

- name: Install dependencies
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: yarn install

- name: Install playwright deps
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: |
npx playwright install
npx playwright install-deps

- name: Run tests
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: |
yarn test:browser
yarn test:node
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ node_modules
pkg/

# Source resolver
crates/source-resolver/node_modules
crates/source-resolver/lib
crates/source-resolver/lib-node
compiler/source-resolver/node_modules
compiler/source-resolver/lib
compiler/source-resolver/lib-node

# Nix stuff
**/outputs
Expand All @@ -25,8 +25,8 @@ result
*.vk
**/Verifier.toml
**/target
!crates/nargo_cli/tests/acir_artifacts/*/target
!crates/nargo_cli/tests/acir_artifacts/*/target/witness.gz
!tooling/nargo_cli/tests/acir_artifacts/*/target
!tooling/nargo_cli/tests/acir_artifacts/*/target/witness.gz

# Github Actions scratch space
# This gives a location to download artifacts into the repository in CI without making git dirty.
Expand Down
65 changes: 34 additions & 31 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[workspace]

members = [
"crates/acvm_backend_barretenberg",
"crates/noirc_evaluator",
"crates/noirc_frontend",
"crates/noirc_errors",
"crates/noirc_driver",
"crates/noirc_printable_type",
"crates/nargo",
"crates/nargo_cli",
"crates/nargo_toml",
"crates/fm",
"crates/arena",
"crates/noirc_abi",
"crates/noirc_abi_wasm",
"crates/iter-extended",
"crates/wasm",
"compiler/noirc_evaluator",
"compiler/noirc_frontend",
"compiler/noirc_errors",
"compiler/noirc_driver",
"compiler/noirc_printable_type",
"tooling/acvm_backend_barretenberg",
"tooling/nargo",
"tooling/nargo_cli",
"tooling/nargo_toml",
"compiler/fm",
"compiler/arena",
"compiler/noirc_abi",
"compiler/noirc_abi_wasm",
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
"compiler/iter-extended",
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
"compiler/wasm",
]
default-members = ["crates/nargo_cli"]
default-members = ["tooling/nargo_cli"]
resolver = "2"

[workspace.package]
Expand All @@ -30,26 +30,29 @@ rust-version = "1.66"

[workspace.dependencies]
acvm = "0.26.0"
arena = { path = "crates/arena" }
fm = { path = "crates/fm" }
iter-extended = { path = "crates/iter-extended" }
nargo = { path = "crates/nargo" }
nargo_cli = { path = "crates/nargo_cli" }
nargo_toml = { path = "crates/nargo_toml" }
noir_lsp = { path = "crates/lsp" }
noirc_abi = { path = "crates/noirc_abi" }
noirc_driver = { path = "crates/noirc_driver" }
noirc_errors = { path = "crates/noirc_errors" }
noirc_evaluator = { path = "crates/noirc_evaluator" }
noirc_frontend = { path = "crates/noirc_frontend" }
noirc_printable_type = { path = "crates/noirc_printable_type" }
noir_wasm = { path = "crates/wasm" }
arena = { path = "compiler/arena" }
fm = { path = "compiler/fm" }
iter-extended = { path = "compiler/iter-extended" }
nargo = { path = "tooling/nargo" }
nargo_cli = { path = "tooling/nargo_cli" }
nargo_toml = { path = "tooling/nargo_toml" }
noir_lsp = { path = "tooling/lsp" }
noirc_abi = { path = "compiler/noirc_abi" }
noirc_driver = { path = "compiler/noirc_driver" }
noirc_errors = { path = "compiler/noirc_errors" }
noirc_evaluator = { path = "compiler/noirc_evaluator" }
noirc_frontend = { path = "compiler/noirc_frontend" }
noirc_printable_type = { path = "compiler/noirc_printable_type" }
noir_wasm = { path = "compiler/wasm" }
cfg-if = "1.0.0"
clap = { version = "4.3.19", features = ["derive"] }
codespan = { version = "0.11.1", features = ["serialization"] }
codespan-lsp = "0.11.1"
codespan-reporting = "0.11.1"
chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312", default-features = false, features = ["ahash", "std"] }
chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312", default-features = false, features = [
"ahash",
"std",
] }
dirs = "4"
lsp-types = "0.94"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const CIRCUIT_SIZE = 2 ** 19;

const test_cases = [
{
case: "crates/nargo_cli/tests/execution_success/1_mul"
case: "tooling/nargo_cli/tests/execution_success/1_mul"
},
{
case: "crates/nargo_cli/tests/execution_success/double_verify_proof"
case: "tooling/nargo_cli/tests/execution_success/double_verify_proof"
}
];

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@
];

buildPhaseCargoCommand = ''
bash crates/wasm/buildPhaseCargoCommand.sh release
bash compiler/wasm/buildPhaseCargoCommand.sh release
'';

installPhase = ''
bash crates/wasm/installPhase.sh
bash compiler/wasm/installPhase.sh
'';

});
Expand Down Expand Up @@ -412,11 +412,11 @@
];

buildPhaseCargoCommand = ''
bash crates/noirc_abi_wasm/buildPhaseCargoCommand.sh release
bash compiler/noirc_abi_wasm/buildPhaseCargoCommand.sh release
'';

installPhase = ''
bash crates/noirc_abi_wasm/installPhase.sh
bash compiler/noirc_abi_wasm/installPhase.sh
'';

});
Expand Down
2 changes: 1 addition & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"flake.nix",
{
"type": "json",
"path": "crates/wasm/package.json",
"path": "compiler/wasm/package.json",
"jsonpath": "$.version"
}
]
Expand Down
12 changes: 6 additions & 6 deletions release-tests/test/6_array.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ test("promise resolved", async () => {
promiseResolved = true;
});

test("nargo builds ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
test("nargo builds ../tooling/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
await within(async () => {
cd("../crates/nargo_cli/tests/execution_success/6_array");
cd("../tooling/nargo_cli/tests/execution_success/6_array");
const command = `${NARGO_BIN} check`;

await $`${command}`.nothrow();
});
});

test("nargo creates proof ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
test("nargo creates proof ../tooling/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
await within(async () => {
cd("../crates/nargo_cli/tests/execution_success/6_array");
cd("../tooling/nargo_cli/tests/execution_success/6_array");
const command = `${NARGO_BIN} prove 6_array`;

await $`${command}`.nothrow();
});
});

test("nargo verifies proof ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
test("nargo verifies proof ../tooling/nargo_cli/tests/execution_success/6_array sucessfully", async () => {
await within(async () => {
cd("../crates/nargo_cli/tests/execution_success/6_array");
cd("../tooling/nargo_cli/tests/execution_success/6_array");
const command = `${NARGO_BIN} verify 6_array`;

await $`${command}`.nothrow();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading