-
Notifications
You must be signed in to change notification settings - Fork 381
feat: Dockerfile to test cargo and JS packages #3684
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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
0f5a7c4
initial
d4b4e61
test
6648bd8
test
e83a8d7
add cache
4cd7907
test cache
8656030
test
0d81dab
add git
4aed6dd
test
ae8a009
test
4d2b7e7
add js test workflow
f6193ab
test
6cde486
fix
a7576a6
script
349104a
+x
85b426e
test
1687a96
test
d68fd2f
add
f4dde4c
test
3204050
test
f0b8c94
asdf
2f7e13b
Merge branch 'master' into feat-test-release
c0d5694
test
ea10638
test
7e44f1f
test
633b5af
test
e71d4ac
abc
1defab5
test
633973f
tst
76b37e1
test
fdcecab
Revert "test"
494f722
Fixing and should work
a0a643f
Merge branch 'master' into feat-test-release
0798f1e
fixed
b0fc82d
test
ad3102c
dockerfile
29c265c
change
97907af
anges
f1d8fba
uncomment
0c81e53
add
f45f90a
Delete tooling/noir_codegen/codegen/index.ts
sklppy88 984f3ba
Update cjs.test.cjs
sklppy88 f704cf7
Merge branch 'master' into feat-test-release
kevaundray b76eb46
fixing
fa9c8a2
Delete docs/versions.json
sklppy88 84724b2
move
4c420fc
Merge remote-tracking branch 'origin/feat-test-release' into feat-tes…
2e7bf3d
Delete Dockerfile
sklppy88 d820e4f
fix
9bde1ed
fix
cdb17ca
Merge branch 'master' into feat-test-release
7e5210e
final test
a86cdcb
remove last
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Test cargo | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Test cargo | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Get current date | ||
| id: date | ||
| run: echo "date=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_STATE | ||
| - name: prepare docker images tags | ||
| id: prep | ||
| run: | | ||
| REGISTRY="ghcr.io" | ||
| IMG="${REGISTRY}/${{ github.repository }}" | ||
| IMAGE=$(echo "$IMG" | tr '[:upper:]' '[:lower:]') | ||
| TAGS="${IMAGE}:${{ github.sha }}" | ||
| TAGS="${TAGS},${IMAGE}:latest,${IMAGE}:v${{ steps.date.outputs.date }}" | ||
| echo ::set-output name=tags::${TAGS} | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Test cargo | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: Dockerfile.ci | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| target: test-cargo | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Test JS packages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Test JS packages | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Get current date | ||
| id: date | ||
| run: echo "date=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_STATE | ||
| - name: prepare docker images tags | ||
| id: prep | ||
| run: | | ||
| REGISTRY="ghcr.io" | ||
| IMG="${REGISTRY}/${{ github.repository }}" | ||
| IMAGE=$(echo "$IMG" | tr '[:upper:]' '[:lower:]') | ||
| TAGS="${IMAGE}:${{ github.sha }}" | ||
| TAGS="${TAGS},${IMAGE}:latest,${IMAGE}:v${{ steps.date.outputs.date }}" | ||
| echo ::set-output name=tags::${TAGS} | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Test JS packages | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: Dockerfile.ci | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| target: test-js | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| FROM rust:1-slim-bookworm as test-base | ||
| RUN apt-get update && apt-get upgrade -y && apt-get install build-essential git -y | ||
| WORKDIR /usr/src/noir | ||
| COPY . . | ||
| RUN ./scripts/bootstrap_native.sh | ||
| ENV PATH="${PATH}:/usr/src/noir/target/release/" | ||
|
|
||
| FROM test-base as test-cargo | ||
| RUN apt-get install -y curl libc++-dev | ||
| RUN ./scripts/test_native.sh | ||
|
|
||
| FROM test-base as test-js | ||
| RUN apt-get install pkg-config libssl-dev -y | ||
| RUN ./scripts/install_wasm-bindgen.sh | ||
| RUN apt-get install -y ca-certificates curl gnupg | ||
| RUN mkdir -p /etc/apt/keyrings | ||
| RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | ||
| RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list | ||
| RUN apt-get update && apt-get install nodejs -y | ||
| RUN corepack enable | ||
| RUN yarn --immutable | ||
| RUN apt-get install -y jq | ||
| RUN yarn build | ||
| RUN yarn workspace @noir-lang/acvm_js test | ||
| RUN npx playwright install && npx playwright install-deps | ||
| RUN yarn workspace @noir-lang/acvm_js test:browser | ||
| RUN yarn workspace @noir-lang/noirc_abi test | ||
| RUN yarn workspace @noir-lang/noirc_abi test:browser | ||
| RUN yarn workspace @noir-lang/backend_barretenberg test | ||
| RUN ./scripts/nargo_compile_noir_js_assert_lt.sh | ||
| RUN rm -rf /usr/src/noir/tooling/noir_js/test/noir_compiled_examples/assert_lt/target/debug_assert_lt.json | ||
| RUN yarn workspace @noir-lang/noir_js test | ||
| RUN yarn workspace @noir-lang/source-resolver test | ||
| RUN ./scripts/nargo_compile_wasm_fixtures.sh | ||
| RUN yarn workspace @noir-lang/noir_wasm test:node | ||
| RUN yarn workspace @noir-lang/noir_wasm test:browser | ||
| RUN ./scripts/nargo_compile_noir_codegen_assert_lt.sh | ||
| RUN rm -rf /usr/src/noir/tooling/noir_codegen/test/assert_lt/target/debug_assert_lt.json | ||
| RUN yarn workspace @noir-lang/noir_codegen test | ||
| RUN apt-get install -y libc++-dev | ||
| RUN yarn test:integration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
|
|
||
| cd ./tooling/noir_codegen/test/assert_lt | ||
| nargo compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
|
|
||
| cd ./tooling/noir_js/test/noir_compiled_examples/assert_lt | ||
| nargo compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| cd ./compiler/wasm/fixtures | ||
| for dir in $(ls -d */); do | ||
| pushd $dir/noir-script | ||
| nargo compile | ||
| popd | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash | ||
| set -eu | ||
|
|
||
| cd $(dirname "$0")/.. | ||
|
|
||
| ./scripts/install_wasm-bindgen.sh | ||
|
|
||
| # If this project has been subrepod into another project, set build data manually. | ||
| export SOURCE_DATE_EPOCH=$(date +%s) | ||
| export GIT_DIRTY=false | ||
| if [ -f ".gitrepo" ]; then | ||
| export GIT_COMMIT=$(awk '/commit =/ {print $3}' .gitrepo) | ||
| else | ||
| export GIT_COMMIT=$(git rev-parse --verify HEAD) | ||
| fi | ||
|
|
||
| export cargoExtraArgs="--features noirc_driver/aztec" | ||
|
|
||
| cargo build --features="noirc_driver/aztec" --release | ||
| export PATH="${PATH}:/usr/src/noir/target/release/" | ||
|
|
||
| yarn | ||
| yarn build | ||
| npx playwright install | ||
| npx playwright install-deps | ||
|
|
||
| ./scripts/test.sh | ||
| yarn test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
| set -eu | ||
|
|
||
| cd $(dirname "$0")/.. | ||
|
|
||
| # If this project has been subrepod into another project, set build data manually. | ||
| export SOURCE_DATE_EPOCH=$(date +%s) | ||
| export GIT_DIRTY=false | ||
| if [ -f ".gitrepo" ]; then | ||
| export GIT_COMMIT=$(awk '/commit =/ {print $3}' .gitrepo) | ||
| else | ||
| export GIT_COMMIT=$(git rev-parse --verify HEAD) | ||
| fi | ||
|
|
||
| cargo test --workspace --locked --release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.