Skip to content

Commit

Permalink
Mirror noir
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad0 committed Nov 27, 2023
1 parent 63173c4 commit 0d5fafd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/mirror_noir_subrepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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

on:
push:
branches:
- ad/sync-noir
paths:
- 'noir/**'
- '!noir/.gitrepo'

jobs:
build:
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
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
1 change: 1 addition & 0 deletions noir/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ unsound = "warn"
yanked = "warn"
notice = "warn"


# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
Expand Down
1 change: 0 additions & 1 deletion scripts/git-subrepo/lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ subrepo:branch() {
local gitrepo_commit=$output
o ".gitrepo reference commit: $gitrepo_commit"


# Only include the commit if it's a child of the previous commit
# This way we create a single path between $subrepo_parent..HEAD
if [[ $ancestor ]]; then
Expand Down

0 comments on commit 0d5fafd

Please sign in to comment.