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: automate necessary changes to outward sync into noir-lang/noir #7049

Merged
merged 5 commits into from
Jun 17, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/mirror-noir-subrepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ jobs:
git config --file="$SUBREPO_PATH/.gitrepo" subrepo.commit "$BASE_NOIR_COMMIT"
# make a new commit with our previous message
git commit -am "$COMMIT_MESSAGE"

# There's various changes which we need to make to account for CI differences so we run this script to apply them.
git checkout origin/master -- noir/scripts/sync-out-fixup.sh
noir/scripts/sync-out-fixup.sh
git commit -am "chore: apply sync fixes"

# Now push to it with subrepo with computed commit messages
if ./scripts/git-subrepo/lib/git-subrepo push $SUBREPO_PATH --squash --branch=$STAGING_BRANCH; then
# We don't push a commit to aztec anymore so that we can maintain the 'commit' as our last pull branch
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-noir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ jobs:
git commit -am "[$LINES changes] $COMMIT_MESSAGE"

# There's various changes which we need to make to account for CI differences so we run this script to apply them.
git checkout origin/master -- noir/scripts/sync-fixup.sh
noir/scripts/sync-fixup.sh
git checkout origin/master -- noir/scripts/sync-in-fixup.sh
noir/scripts/sync-in-fixup.sh
git commit -am "chore: apply sync fixes"

git push origin $STAGING_BRANCH --force
Expand Down
1 change: 1 addition & 0 deletions noir/bb-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.41.0
2 changes: 2 additions & 0 deletions noir/scripts/sync-fixup.sh → noir/scripts/sync-in-fixup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ cd $(dirname $0)/../noir-repo

tmp=$(mktemp)
BACKEND_BARRETENBERG_PACKAGE_JSON=./tooling/noir_js_backend_barretenberg/package.json

jq -r '.dependencies."@aztec/bb.js"' $BACKEND_BARRETENBERG_PACKAGE_JSON > ../bb-version
jq '.dependencies."@aztec/bb.js" = "portal:../../../../barretenberg/ts"' $BACKEND_BARRETENBERG_PACKAGE_JSON > $tmp && mv $tmp $BACKEND_BARRETENBERG_PACKAGE_JSON

# This script runs in CI which enforces immutable installs by default,
Expand Down
18 changes: 18 additions & 0 deletions noir/scripts/sync-out-fixup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eu

cd $(dirname $0)/../noir-repo

BB_VERSION=$(cat ../bb-version)

tmp=$(mktemp)
BACKEND_BARRETENBERG_PACKAGE_JSON=./tooling/noir_js_backend_barretenberg/package.json
jq --arg v $BB_VERSION '.dependencies."@aztec/bb.js" = $v' $BACKEND_BARRETENBERG_PACKAGE_JSON > $tmp && mv $tmp $BACKEND_BARRETENBERG_PACKAGE_JSON

# This script runs in CI which enforces immutable installs by default,
# we then must turn this off in order to update yarn.lock.
YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install

# Add requirement for `wasm-opt` to be installed
sed -i "s/^#require_command wasm-opt/require_command wasm-opt/" ./tooling/noirc_abi_wasm/build.sh
sed -i "s/^#require_command wasm-opt/require_command wasm-opt/" ./acvm-repo/acvm_js/build.sh
Loading