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: CI/local S3 build cache #8802

Merged
merged 91 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
512e8ec
iterate on ease of use
ludamad Sep 25, 2024
2662fb3
progress checkpoint: cache-upload.js testing
ludamad Sep 25, 2024
2172e2f
new scripts passing tests
ludamad Sep 25, 2024
d6cf458
new scripts and tests for rebuild patterns already in repo
ludamad Sep 25, 2024
35f369c
progress on rebuild pattern scripts
ludamad Sep 25, 2024
a60b959
progress on rebuild pattern scripts
ludamad Sep 25, 2024
30c15ae
gpt tests passing, exciting\!
ludamad Sep 25, 2024
8603535
add readme
ludamad Sep 25, 2024
49b912d
rename files as I write the readme
ludamad Sep 25, 2024
744b443
tests passing again after file shuffle
ludamad Sep 25, 2024
cce68d1
integrate into CI
ludamad Sep 25, 2024
01b6e59
start of ci test
ludamad Sep 25, 2024
488be9e
tests pass in earthly now~
ludamad Sep 25, 2024
18c027f
tests pass in earthly now~
ludamad Sep 25, 2024
c0a0c43
more graceful if server not up
ludamad Sep 25, 2024
fdbffb5
tests work again
ludamad Sep 25, 2024
fa75d27
verified earthly can contact our runner
ludamad Sep 25, 2024
09d85a7
lets try CI
ludamad Sep 25, 2024
c214347
formatting
ludamad Sep 25, 2024
c8abc04
fix ci
ludamad Sep 25, 2024
23d8481
moment of truth
ludamad Sep 25, 2024
83693aa
no cache key
ludamad Sep 25, 2024
d072b51
tweak
ludamad Sep 25, 2024
97ad069
earthly helpers
ludamad Sep 25, 2024
b35ff9d
Caching working
ludamad Sep 26, 2024
7a6d55c
caching working
ludamad Sep 26, 2024
5b60565
caching working
ludamad Sep 26, 2024
c6ae641
tweak runner for more space
ludamad Sep 26, 2024
795ef19
more caching
ludamad Sep 26, 2024
83f28c3
cachify
ludamad Sep 26, 2024
e2782e9
cachify noir
ludamad Sep 26, 2024
47fa1e3
we try again
ludamad Sep 26, 2024
1990b3a
passes
ludamad Sep 26, 2024
e078727
fix cache-upload-direct.sh
ludamad Sep 26, 2024
f22abae
try fix ci
ludamad Sep 26, 2024
c30e686
more caching
ludamad Sep 26, 2024
e80c939
iterate on start server
ludamad Sep 26, 2024
7bf4192
home dir for CI
ludamad Sep 26, 2024
49dd4e9
fix
ludamad Sep 26, 2024
531e538
update dependency
ludamad Sep 26, 2024
4dce740
kludge
ludamad Sep 26, 2024
faf34f8
kludge
ludamad Sep 26, 2024
911352c
fix
ludamad Sep 26, 2024
cc3bc1a
fix nvm use 18
ludamad Sep 26, 2024
ff81224
add rebuild patterns
ludamad Sep 26, 2024
292b253
update
ludamad Sep 26, 2024
ec6ee51
cache
ludamad Sep 26, 2024
0e46ae6
reduce scary number of lines
ludamad Sep 26, 2024
122aaf2
fix tests
ludamad Sep 26, 2024
34f1c5d
remove yarn lock again
ludamad Sep 26, 2024
b7c5891
fix no *.lock anymore
ludamad Sep 26, 2024
487c85c
fix noir example
ludamad Sep 26, 2024
09bc888
commit for earthly
ludamad Sep 26, 2024
29a1530
earthly
ludamad Sep 26, 2024
0c3d1b1
handling dirty git state
ludamad Sep 26, 2024
e69c819
fix caching in earthly
ludamad Sep 26, 2024
c7b0752
fix caching in earthly
ludamad Sep 26, 2024
82fbdd6
fix dirty git caching
ludamad Sep 26, 2024
6b1bd77
rebuild pattern
ludamad Sep 26, 2024
0988449
add secret for master discrepancy
ludamad Sep 26, 2024
3ce6de7
lets not do a server after all
ludamad Sep 26, 2024
2810ccb
mass simplification
ludamad Sep 26, 2024
62dd1e8
simplify continued
ludamad Sep 26, 2024
b90a7bd
simplify continued
ludamad Sep 26, 2024
0628a67
sync
ludamad Sep 26, 2024
1086123
sync
ludamad Sep 26, 2024
a7122ea
sync
ludamad Sep 26, 2024
bbca237
use mock server
ludamad Sep 26, 2024
8f6f8b1
sync
ludamad Sep 26, 2024
4d79b60
sync
ludamad Sep 26, 2024
a15c9e4
minio working
ludamad Sep 26, 2024
1ea60b7
sync
ludamad Sep 26, 2024
aba9724
sync
ludamad Sep 26, 2024
4d9b9a9
passing tests!
ludamad Sep 27, 2024
29a2ef3
Test in ci
ludamad Sep 27, 2024
af076ea
fix earthly-ci
ludamad Sep 27, 2024
a84ade8
sync
ludamad Sep 27, 2024
c42f618
sync
ludamad Sep 27, 2024
da17954
tests
ludamad Sep 27, 2024
d6b716d
tests
ludamad Sep 27, 2024
12cf536
Merge remote-tracking branch 'origin/ad/build-cache-tool' into ad/bui…
ludamad Sep 27, 2024
508c4d9
.
ludamad Sep 27, 2024
0b20dec
fix benches
ludamad Sep 27, 2024
4b17fbe
try fix packages test browser
ludamad Sep 27, 2024
1d402c4
fix content hash tagging
ludamad Sep 27, 2024
59f7f33
Merge remote-tracking branch 'origin/master' into ad/build-cache-tool
ludamad Sep 27, 2024
e4e0fe0
fix nargo cache, fix more than one file specified in cache
ludamad Sep 27, 2024
9f4b4f7
try fix commit hash in nargo
ludamad Sep 27, 2024
e308348
try fix commit hash in nargo
ludamad Sep 27, 2024
daf8117
Try to make build more sane
ludamad Sep 27, 2024
d2a9af1
try to stabilize bb.js acir tests
ludamad Sep 27, 2024
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
42 changes: 22 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ jobs:

build:
needs: [build-images, changes]
if: (needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true' && needs.changes.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master'
# NOTE: we don't skip this job here instead using if's below so that dependencies are not broken
# we still want build to be at the bottom of the dependency chain
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
outputs:
e2e_list: ${{ steps.e2e_list.outputs.list }}
Expand All @@ -127,11 +128,13 @@ jobs:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
if: (needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true' && needs.changes.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master'
with:
concurrency_key: build-x86
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
if: (needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true' && needs.changes.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master'
run: |
earthly-ci ./yarn-project+export-e2e-test-images
# We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end
Expand Down Expand Up @@ -160,7 +163,7 @@ jobs:
# all the non-bench end-to-end integration tests for aztec
e2e:
needs: [build, changes]
if: needs.changes.outputs.non-barretenberg-cpp == 'true' || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e')
if: (needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true' && needs.changes.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e')
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -190,7 +193,7 @@ jobs:
# all the benchmarking end-to-end integration tests for aztec (not required to merge)
bench-e2e:
needs: [build, changes]
if: needs.changes.outputs.non-barretenberg-cpp == 'true' || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench')
if: (needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true' && needs.changes.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench')
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -221,7 +224,7 @@ jobs:

acir-bench:
runs-on: ubuntu-20.04
needs: [build-images, changes]
needs: [build, changes]
# Note: not fully accurate, but to work with bench-summary needs to be the same as bench-e2e
if: needs.changes.outputs.non-barretenberg-cpp == 'true'
steps:
Expand Down Expand Up @@ -258,7 +261,6 @@ jobs:
ref: "${{ github.event.pull_request.head.sha }}"
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: build-x86
- name: "Build and upload bench aggregate file"
working-directory: ./yarn-project/scripts
Expand Down Expand Up @@ -286,7 +288,7 @@ jobs:
AZTEC_BOT_GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

bb-gcc:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg-cpp == 'true'
steps:
Expand All @@ -306,7 +308,7 @@ jobs:
# barretenberg (prover) native, AVM (public VM) and Merkle tree (world state) tests
# only ran on x86 for resource reasons (memory intensive)
bb-native-tests:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg-cpp == 'true'
steps:
Expand All @@ -324,7 +326,7 @@ jobs:
run: earthly-ci --exec-stats --no-output +test --hardware_concurrency=64

bb-js-test:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg == 'true'
steps:
Expand All @@ -339,7 +341,7 @@ jobs:
run: earthly-ci --no-output ./+test

noir-build-acir-tests:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true'
steps:
Expand Down Expand Up @@ -413,7 +415,7 @@ jobs:
run: earthly-ci --no-output ./+barretenberg-acir-tests-bb.js

noir-format:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.noir == 'true' || needs.changes.outputs.noir-projects == 'true'
steps:
Expand All @@ -433,7 +435,7 @@ jobs:
earthly-ci --no-output ./+format

noir-test:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.noir == 'true'
steps:
Expand All @@ -446,7 +448,7 @@ jobs:
run: earthly-ci --no-output ./noir+test

noir-examples:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true'
steps:
Expand All @@ -459,7 +461,7 @@ jobs:
run: earthly-ci --no-output ./noir+examples

noir-packages-test:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true'
steps:
Expand All @@ -473,7 +475,7 @@ jobs:
run: earthly-ci --no-output ./noir+packages-test

noir-projects:
needs: [build-images, changes, build]
needs: [build, changes, build]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true' || needs.changes.outputs.noir-projects == 'true' || needs.changes.outputs.txe == 'true'
steps:
Expand All @@ -488,7 +490,7 @@ jobs:
earthly-ci --no-output ./noir-projects/+test

avm-format:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.avm-transpiler == 'true' || needs.changes.outputs.noir == 'true'
steps:
Expand Down Expand Up @@ -542,7 +544,7 @@ jobs:
run: earthly-ci --no-output ./yarn-project/+prover-client-test

l1-contracts-test:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.l1-contracts == 'true'
steps:
Expand All @@ -555,7 +557,7 @@ jobs:
run: earthly-ci --no-output ./l1-contracts+test

docs-preview:
needs: [build-images, changes]
needs: [build, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: needs.changes.outputs.non-barretenberg-cpp == 'true'
steps:
Expand All @@ -576,7 +578,7 @@ jobs:

bb-bench:
runs-on: ubuntu-20.04
needs: [build-images, changes]
needs: [build, changes]
if: needs.changes.outputs.barretenberg-cpp == 'true'
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -661,7 +663,7 @@ jobs:
run: earthly-ci -P --no-output +test --box=${{ matrix.box }} --browser=${{ matrix.browser }} --mode=cache

protocol-circuits-gates-report:
needs: [build-images, changes]
needs: [build, changes]
if: needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true'
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
permissions:
Expand Down Expand Up @@ -697,7 +699,7 @@ jobs:
message: ${{ steps.gates_diff.outputs.markdown }}

public-functions-size-report:
needs: [build-images, changes]
needs: [build, changes]
if: needs.changes.outputs.non-docs == 'true' && needs.changes.outputs.non-misc-ci == 'true'
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
permissions:
Expand Down
1 change: 1 addition & 0 deletions avm-transpiler/.rebuild_patterns
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^avm-transpiler/.*$
2 changes: 0 additions & 2 deletions avm-transpiler/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ source:
# we rely on noir source, which this image has
FROM ../noir+nargo

# move noir contents to /usr/src/noir
RUN mv /usr/src /noir && mkdir /usr/src && mv /noir /usr/src
# work in avm-transpiler
WORKDIR /usr/src/avm-transpiler

Expand Down
2 changes: 1 addition & 1 deletion avm-transpiler/scripts/bootstrap_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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)
export GIT_COMMIT=${COMMIT_HASH:-$(git rev-parse --verify HEAD)}
fi

# Build native.
Expand Down
Loading
Loading