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: add noir-source-resolver #2485

Merged
merged 34 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5721dcc
Add source resolver
jonybur Aug 30, 2023
5fc0d68
Fix types
jonybur Aug 30, 2023
94e7a04
Add build step
jonybur Aug 30, 2023
fbf0e86
Set up working-directory
jonybur Aug 30, 2023
0e4ae5b
Move source-resolver to crates
jonybur Aug 30, 2023
9069b70
Update workflows
jonybur Aug 30, 2023
677420d
Add build phase
jonybur Aug 30, 2023
3a0044d
Set up source-resolver publish with release-please
jonybur Aug 30, 2023
a5d31b3
Add release-please manifest
jonybur Aug 30, 2023
abd764d
Remove publish source resolver from release.yml
jonybur Aug 30, 2023
d2362b6
Add scoped source resolver release workflow
jonybur Aug 30, 2023
dcd239b
Remove NodeJS step
jonybur Aug 30, 2023
afc1c67
Remove update package json
jonybur Aug 30, 2023
75dd2c7
Remove release-source-resolver
jonybur Aug 31, 2023
a221f2b
Fix release issues
jonybur Aug 31, 2023
fb6e2db
Fix manifest
jonybur Aug 31, 2023
06cb9eb
Merge branch 'master' into jb/add-source-resolver
jonybur Sep 1, 2023
2eb0058
Merge branch 'master' into jb/add-source-resolver
jonybur Sep 4, 2023
f6ad6a6
Merge branch 'jb/add-source-resolver' of github.com:noir-lang/noir in…
jonybur Sep 4, 2023
1a585d2
Replace release-please with manual release
jonybur Sep 4, 2023
919062d
Set up dry run for publish
jonybur Sep 4, 2023
9e28537
Add push on current branch
jonybur Sep 4, 2023
88bc295
Update publish to npm
jonybur Sep 4, 2023
42b043e
Roll back
jonybur Sep 4, 2023
3c04896
Use checkout v2 (error with tar file)
jonybur Sep 4, 2023
5c42471
Set up dry run
jonybur Sep 4, 2023
2909857
Rollback to checkout v3
jonybur Sep 4, 2023
c96295a
Un-dry run
jonybur Sep 4, 2023
8318693
Separate workflow task
jonybur Sep 4, 2023
e25b53a
Dry run with correct version number
jonybur Sep 4, 2023
bda6326
Trigger on push to testing branch
jonybur Sep 4, 2023
5019500
Change to single quotes
jonybur Sep 4, 2023
a8911c7
Update echo
jonybur Sep 4, 2023
8f4ee66
Un-dry run
jonybur Sep 4, 2023
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
8 changes: 2 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
with:
path: ${{ env.CACHED_PATHS }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Package artifacts
run: |
mkdir dist
Expand Down Expand Up @@ -120,11 +120,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target:
[
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
]
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]

steps:
- name: Checkout
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/release-source-resolver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release and Publish Source Resolver

on:
workflow_dispatch:
inputs:
version:
description: "Version number"
required: false

jobs:
release-source-resolver:
name: Release and Publish Source Resolver
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Bump version
working-directory: ./crates/source-resolver
id: bump_version
run: |
if [ -z "${{ github.event.inputs.version }}" ]; then
NEW_VERSION=$(npm version patch --no-git-tag-version)
else
NEW_VERSION=$(npm version ${{ github.event.inputs.version }} --no-git-tag-version)
fi
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV

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

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

- name: Publish to NPM
working-directory: ./crates/source-resolver
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Configure git
run: |
git config user.name kevaundray
git config user.email [email protected]

- name: Commit updates
run: |
git add crates/source-resolver/package-lock.json
git add crates/source-resolver/package.json
git commit -m "chore: Update source-resolver to ${{ env.NEW_VERSION }}"
git push
29 changes: 29 additions & 0 deletions .github/workflows/test-source-resolver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Source Resolver

on:
push:
paths:
- "crates/source-resolver/**"
pull_request:
paths:
- "crates/source-resolver/**"

jobs:
test:
runs-on: ubuntu-latest

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

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

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

- name: Run tests
working-directory: ./crates/source-resolver
run: npm run test
2 changes: 1 addition & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# Don't create cache entries for the merge queue.
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
with:
path: ${{ env.CACHED_PATHS }}
path: ${{ env.CACHED_PATHS }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Package artifacts
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ examples/9
node_modules
pkg/

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

# Nix stuff
**/outputs
result
Expand Down
Loading
Loading