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

feat: Aztec CI files in Noir #3430

Merged
merged 3 commits into from
Nov 27, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/mirror_noir_subrepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Mirror a special 'aztec' branch on noir any changes that have accumulated in aztec.
# Might fail if we have pushed changes to noir that we don't expect - in which case we need an explicit pull PR.
# See the last example of such a PR for instructions.
name: Mirror to noir repo

# Don't allow multiple of these running at once:
concurrency:
group: ${{ github.workflow }}
on:
push:
branches:
- master
paths:
- 'noir/**'
- '!noir/.gitrepo'

jobs:
mirror_repo:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

# We push using git subrepo (https://github.com/ingydotnet/git-subrepo)
# with some logic to recover from squashed parent commits
# We push to subrepo, commit to master. The commit is needed
# to continue to replay. If we still hit issues such as this
# action failing due to upstream changes, a manual resolution
# PR with ./scripts/git_subrepo.sh pull will be needed.
- name: Push to branch
run: |
SUBREPO_PATH=noir
BRANCH=aztec
# identify ourselves, needed to commit
git config --global user.name AztecBot
git config --global user.email [email protected]
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=$BRANCH; then
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: noir-lang/noir
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Create PR for Aztec Branch
continue-on-error: true
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
pr_title: 'feat: aztec-packages'
pr_body: 'Development from Aztec.'
destination_branch: 'master'
source_branch: 'aztec'
6 changes: 3 additions & 3 deletions noir/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = git@github.com:noir-lang/noir
remote = https://github.com/noir-lang/noir
branch = master
commit = 90a63042d5b5eb2edf03378dff46ce75c9cb33ba
parent = 8f1cb832cd0adeff0da69da293bb45a3748583e7
method = merge
parent = bef260888e9f3799543d5a76f5ba40d9b9e4db89
method = pull
cmdver = 0.4.6
2 changes: 1 addition & 1 deletion scripts/fix_subrepo_edge_case.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ git config --file="$SUBREPO_PATH/.gitrepo" subrepo.parent $new_parent
# Commit this change
git add "$SUBREPO_PATH/.gitrepo"
# This commit should only go into squashed PRs
git commit -m "git_subrepo.sh: Fix parent in .gitrepo file."
git commit -m "git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]"