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: Initial clone of noir to subrepo #3409

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions noir/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Based on https://github.com/direnv/direnv-vscode/blob/158e8302c2594cc0eaa5f8b4f0cafedd4e1c0315/.envrc

# You can define your system-specific logic (like Git settings or GH tokens) in .envrc.local
# If that logic is usable by other people and might improve development environment, consider
# contributing it to this file!

source_env_if_exists .envrc.local

if [[ -z "${SKIP_NIX:-}" ]] && has nix; then

if nix flake metadata &>/dev/null && has use_flake; then
# use flakes if possible
use flake

else
# Otherwise fall back to pure nix
use nix
fi

fi
19 changes: 19 additions & 0 deletions noir/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
'comma-spacing': ['error', { before: false, after: true }],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'prettier/prettier': 'error',
},
};
1 change: 1 addition & 0 deletions noir/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.nr linguist-language=rust
9 changes: 9 additions & 0 deletions noir/.github/Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build.env]
passthrough = [
"HOME",
"RUST_BACKTRACE",
"BARRETENBERG_BIN_DIR"
]
volumes = [
"HOME",
]
99 changes: 99 additions & 0 deletions noir/.github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Bug Report
description: Report an unexpected behavior.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
# Description
Thanks for taking the time to create the Issue, and welcome to the Noirot family!
- type: textarea
id: aim
attributes:
label: Aim
description: Describe what you tried to achieve.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: Describe what you expected to happen.
validations:
required: true
- type: textarea
id: bug
attributes:
label: Bug
description: Describe the bug. Supply error codes / terminal logs if applicable.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: To Reproduce
description: Describe the steps to reproduce the behavior.
value: |
1.
2.
3.
4.
- type: markdown
attributes:
value: |
# Environment
Specify your versions of Noir releases used.
- type: markdown
attributes:
value: |
## Using Nargo?
- type: dropdown
id: nargo-install
attributes:
label: Installation Method
description: How did you install Nargo?
multiple: false
options:
- Binary
- Compiled from source
- type: input
id: nargo-version
attributes:
label: Nargo Version
description: What is the output of the `nargo --version` command?
placeholder: "nargo 0.6.0 (git version hash: 0181813203a9e3e46c6d8c3169ad5d25971d4282, is dirty: false)"
- type: markdown
attributes:
value: |
## Using TypeScript?
Please await for our new set of packages.
You can find our target release timeframe on the [Noir Roadmap](https://github.com/orgs/noir-lang/projects/1/views/16).
- type: markdown
attributes:
value: |
# Misc
- type: textarea
id: additional
attributes:
label: Additional Context
description: Supplement further information if applicable.
- type: markdown
attributes:
value: |
# Pull Request
- type: dropdown
id: pr_preference
attributes:
label: Would you like to submit a PR for this Issue?
description: Fellow contributors are happy to provide support where applicable.
options:
- "No"
- "Maybe"
- "Yes"
validations:
required: true
- type: textarea
id: pr_support
attributes:
label: Support Needs
description: Support from other contributors you are looking for to create a PR for this Issue.
4 changes: 4 additions & 0 deletions noir/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Ideas
url: https://github.com/orgs/noir-lang/discussions/new?category=ideas
about: Share ideas for new features
54 changes: 54 additions & 0 deletions noir/.github/ISSUE_TEMPLATE/idea_action_plan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Idea Action Plan
description: Outline the scope and steps for implementing an enhancement. Start with "Ideas" instead to request and discuss new features.
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
## Description
Thanks for taking the time to create the Issue, and welcome to the Noirot family!
- type: textarea
id: problem
attributes:
label: Problem
description: Describe what you feel lacking. Supply code / step-by-step examples if applicable.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Happy Case
description: Describe how you think it should work. Supply pseudocode / step-by-step examples if applicable.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe less-happy cases you have considered, if any.
- type: textarea
id: additional
attributes:
label: Additional Context
description: Supplement further information if applicable.
- type: markdown
attributes:
value: |
## Pull Request
- type: dropdown
id: pr-preference
attributes:
label: Would you like to submit a PR for this Issue?
description: Fellow contributors are happy to provide support where applicable.
multiple: false
options:
- "No"
- "Maybe"
- "Yes"
validations:
required: true
- type: textarea
id: pr-support
attributes:
label: Support Needs
description: Support from other contributors you are looking for to create a PR for this Issue.
11 changes: 11 additions & 0 deletions noir/.github/NIGHTLY_TEST_FAILURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "nightly test-integration failed"
assignees: kobyhallx, tomafrench, jonybur
labels: bug
---

Something broke our nightly integration test.

Check the [test]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
22 changes: 22 additions & 0 deletions noir/.github/actions/docs/build-status/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Get build status'
description: 'Gets the build status of a Netlify site'
inputs:
branch-name:
description: 'Branch name'
required: true
site-id:
description: Netlify site id
required: true
outputs:
deploy_status:
description: "The deploy status"
value: ${{ steps.check_deploy_status.outputs.deploy_status }}
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/script.sh
shell: bash
id: check_deploy_status
env:
BRANCH_NAME: ${{ inputs.branch-name }}
SITE_ID: ${{ inputs.site-id }}
28 changes: 28 additions & 0 deletions noir/.github/actions/docs/build-status/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

BRANCH_NAME=$(echo "$BRANCH_NAME" | sed -e "s#refs/[^/]*/##")
DEPLOY_STATUS=$(curl -X GET "https://api.netlify.com/api/v1/sites/$SITE_ID/deploys?branch=$BRANCH_NAME" | jq -r '.[] | select(.created_at != null) | .state' | head -1)

echo "$SITE_ID"
MAX_RETRIES=10
COUNT=0
while [[ "$DEPLOY_STATUS" != "ready" && $COUNT -lt $MAX_RETRIES ]]; do
sleep 20
DEPLOY_STATUS=$(curl -X GET "https://api.netlify.com/api/v1/sites/$SITE_ID/deploys?branch=$BRANCH_NAME" | jq -r '.[] | select(.created_at != null) | .state' | head -1)
COUNT=$((COUNT+1))

echo "Deploy status: $DEPLOY_STATUS"
# If deploy status is ready, set the output and exit successfully
if [[ "$DEPLOY_STATUS" == "ready" ]]; then
echo "deploy_status=success" >> $GITHUB_OUTPUT
exit 0
elif [[ "$DEPLOY_STATUS" == "error" ]]; then
echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 1
fi

echo "Deploy still running. Retrying..."
done

echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 1
24 changes: 24 additions & 0 deletions noir/.github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Install Playwright
description: Installs Playwright and its dependencies and caches them.

runs:
using: composite
steps:
- name: Query playwright version
shell: bash
run: echo "PLAYWRIGHT_VERSION=$(yarn workspace @noir-lang/noirc_abi info @web/test-runner-playwright --json | jq .children.Version | tr -d '"')" >> $GITHUB_ENV

- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Install playwright deps
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: |
npx playwright install
npx playwright install-deps
27 changes: 27 additions & 0 deletions noir/.github/actions/nix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Setup Nix
description: Installs and setups Nix components

inputs:
github-token:
description: 'Github Access Token'
required: true
nix-cache-name:
description: 'Name of the Cachix cache to use'
required: true
cachix-auth-token:
description: 'Cachix Auth Token'
required: true


runs:
using: composite
steps:
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ inputs.github-token }}

- uses: cachix/cachix-action@v12
with:
name: ${{ inputs.nix-cache-name }}
authToken: ${{ inputs.cachix-auth-token }}
16 changes: 16 additions & 0 deletions noir/.github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Install Yarn dependencies
description: Installs the workspace's yarn dependencies and caches them

runs:
using: composite
steps:
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: "**/node_modules"
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
25 changes: 25 additions & 0 deletions noir/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*



## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Loading