Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
9722270
Do not strip entitlements when capabilities are assigned to AnyStruct
SupunS May 13, 2026
1a4bb70
Merge branch 'v1.10.3-rc' of https://github.com/onflow/cadence-intern…
SupunS May 13, 2026
6bf9c47
Update version
SupunS May 13, 2026
6c3d934
forbid mapping access modifier on non-field members
turbolent May 14, 2026
1eebf4d
Implicitly unbox values in switch-statement similar to == operator
SupunS May 14, 2026
fb8879a
fix incorrect definite return when potential jump
turbolent May 15, 2026
2cd55de
add a defensive panic after all unreachable statements
turbolent May 15, 2026
82798bb
consider break and continue for definitely exited
turbolent May 15, 2026
ff79f14
use MaybeJumpedLoop and MaybeJumpedSwitch
turbolent May 15, 2026
c9de61d
fix lint
turbolent May 15, 2026
99ca467
add more tests for improved return info analysis
turbolent May 15, 2026
3b44bf4
Merge branch 'v1.10.4-rc' of https://github.com/dapperlabs/cadence-in…
SupunS May 18, 2026
b017a6d
Add reproducer
SupunS May 18, 2026
e614756
Merge pull request #489 from onflow/supun/fix-capability-entitlement-…
SupunS May 18, 2026
a4d86a4
Clear git module cache
SupunS May 19, 2026
cc7da07
Merge branch 'v1.10.4-rc' of https://github.com/onflow/cadence-intern…
SupunS May 18, 2026
ed40d1c
Merge branch 'v1.10.4-rc' of https://github.com/dapperlabs/cadence-in…
SupunS May 19, 2026
2f17e2b
Turn off go caching in CI
SupunS May 19, 2026
fb11649
Merge pull request #496 from onflow/supun/clean-git-clone-cache
SupunS May 19, 2026
18a4b5c
Merge branch 'v1.10.4-rc' of https://github.com/onflow/cadence-intern…
SupunS May 19, 2026
7859198
Merge pull request #490 from onflow/bastian/forbid-mapping-access-non…
SupunS May 19, 2026
6a1980e
Merge branch 'v1.10.4-rc' of https://github.com/dapperlabs/cadence-in…
SupunS May 19, 2026
376ad24
Merge pull request #491 from onflow/supun/fix-switch-statement
SupunS May 19, 2026
6b7adea
update version
turbolent May 19, 2026
c230dd9
Merge branch 'v1.10.4-rc' into bastian/defensive-panic-after-unreacha…
turbolent May 19, 2026
6e363d6
Skip resource loss check only if definitely-exited, but not jumped
SupunS May 19, 2026
29ceb1f
Merge pull request #494 from onflow/bastian/defensive-panic-after-unr…
turbolent May 19, 2026
1a33874
Add more tests
SupunS May 19, 2026
6e1b719
Merge jump offsets when merging return info
SupunS May 19, 2026
bd00d5d
align comments
turbolent May 20, 2026
77084e2
improve IsUnreachable and comments for DefinitelyExited
turbolent May 20, 2026
f73ebbf
remove unnecessary DefinitelyJumpedLoop and DefinitelyJumpedSwitch
turbolent May 20, 2026
57a37c8
Merge branch 'supun/fix-resource-loss-analysis-2' into bastian/fix-de…
turbolent May 20, 2026
b45da13
improve comments
turbolent May 20, 2026
d0e808b
document that checking resource loss at return is important for anoth…
turbolent May 20, 2026
6e3f942
add MaybeJumped
turbolent May 20, 2026
10718db
consolidated case-body clearing
turbolent May 21, 2026
e071b49
Add more tests
SupunS May 21, 2026
263c854
handle division by zero in [U]Fix128 saturatingDivide
turbolent May 21, 2026
7059c4d
Merge pull request #501 from onflow/supun/fix-resource-loss-analysis-2
SupunS May 21, 2026
c5c3525
Merge branch 'v1.10.4-rc' into bastian/fix-definite-return-exit-analysis
turbolent May 21, 2026
0dda878
track composite value ID at creation time
turbolent May 21, 2026
0e326ba
move test
turbolent May 21, 2026
cd0600a
Merge pull request #502 from onflow/bastian/fix-saturating-divison-by…
turbolent May 21, 2026
cfd26c8
Revert "Skip resource loss check only if the block definitely-exited,…
SupunS May 21, 2026
4672c84
assert live value IDs change (atree slab split) after inflation opera…
turbolent May 21, 2026
fc1e1e0
Merge branch 'v1.10.4-rc' into bastian/fix-compoite-value-tracking
turbolent May 21, 2026
2ae75ee
Merge pull request #507 from onflow/revert-501-supun/fix-resource-los…
SupunS May 21, 2026
4305d76
Revert "Revert "Skip resource loss check only if the block definitely…
SupunS May 21, 2026
556e307
track dictionary value ID at creation time
turbolent May 21, 2026
103a366
track array value ID at creation time
turbolent May 21, 2026
38b03d8
Merge branch 'v1.10.4-rc' into bastian/fix-compoite-value-tracking
turbolent May 21, 2026
515d72e
Merge pull request #506 from onflow/bastian/fix-compoite-value-tracking
turbolent May 21, 2026
bfd35e2
Produce only what can be guranteed for entitlement set intersection
SupunS May 21, 2026
89b12c3
Add complete reproducer
SupunS May 21, 2026
55be9b1
apply cascading intersection to container method return types
turbolent May 21, 2026
0ba7e55
update version
turbolent May 21, 2026
c0a251b
Update version
SupunS May 21, 2026
ddf4060
Merge branch 'v1.10.4-rc' into bastian/fix-container-method-element-e…
turbolent May 21, 2026
e1e026b
Merge pull request #510 from onflow/supun/fix-entitlement-intersection
turbolent May 21, 2026
5c30dde
Merge branch 'v1.10.4-rc' into bastian/fix-container-method-element-e…
turbolent May 21, 2026
328fb83
Merge pull request #508 from onflow/revert-507-revert-501-supun/fix-r…
SupunS May 22, 2026
62a76b9
Merge branch 'v1.10.4-rc' into bastian/fix-container-method-element-e…
turbolent May 22, 2026
8e43501
Merge pull request #493 from onflow/bastian/fix-definite-return-exit-…
turbolent May 22, 2026
e591617
rename function, as it used for arrays and dictionaries
turbolent May 22, 2026
353a23d
refactor ShouldReturnReference/MaybeReferenceType/GetDescendantRefere…
turbolent May 22, 2026
9e1fdef
concat is only defined for variable-sized arrays
turbolent May 22, 2026
df8c4b1
add unreachable panics
turbolent May 22, 2026
66de21a
adjust container function implementations to new behaviour
turbolent May 23, 2026
fb1780a
fix getting element type from array
turbolent May 23, 2026
ff329fa
fix dictionary insert/remove functions
turbolent May 23, 2026
0be8382
fix array remove functions
turbolent May 23, 2026
91f1cd6
clean up array function registration in VM
turbolent May 23, 2026
4fd7218
test auth recovery via downcast is prevented for container functions
turbolent May 23, 2026
dc724d5
Merge branch 'v1.10.4-rc' into bastian/fix-container-method-element-e…
turbolent May 26, 2026
2aa87dd
fix auth of self in attachment: only provide called function's access
turbolent May 26, 2026
64d0ab1
improve failure assertion
turbolent May 26, 2026
d98d17c
avoid (code) duplication for ShouldReturnReference/MaybeReferenceType…
turbolent May 26, 2026
d4d51d6
Merge pull request #512 from onflow/bastian/fix-attachment-self-autho…
turbolent May 27, 2026
49564fb
Merge pull request #511 from onflow/bastian/fix-container-method-elem…
turbolent May 27, 2026
ab1ca9b
defensively check container indexing in for-loops
turbolent May 27, 2026
fc09c16
add more type confusion tests for container indexing and container me…
turbolent May 27, 2026
d5a7630
update version
turbolent May 27, 2026
e9b819b
Merge pull request #513 from onflow/bastian/defensively-check-for-loo…
turbolent May 27, 2026
8419c6d
Fix references to stale atree slabs
SupunS May 28, 2026
6119c07
also test constant-sized arrays
turbolent May 28, 2026
fe84fec
Move the staleness check to a cenctralized locaiton
SupunS May 28, 2026
c111536
Simplify tests
SupunS May 28, 2026
6d90db8
Update version
SupunS May 28, 2026
cd827b5
Merge pull request #514 from onflow/supun/stale-slab-references
SupunS May 28, 2026
38b7c2c
Merge branch 'v1.10.4-rc' of https://github.com/dapperlabs/cadence-in…
SupunS May 28, 2026
cced37c
test liveValueID
turbolent May 28, 2026
541b41d
look up variables by name, assert line number
turbolent May 28, 2026
dc9d753
Merge pull request #516 from onflow/bastian/test-stale-atree-live-id
turbolent May 28, 2026
18b34fe
Merge pull request #515 from onflow/bastian/test-constant-sized-array…
turbolent May 28, 2026
99759c6
canonicalize atree values
turbolent May 28, 2026
c2a8167
Add reproducer for iterator corruption
SupunS May 29, 2026
964c992
Add reproducer for attachment self reference corruption
SupunS May 29, 2026
2e9afb5
Revert attachment test
SupunS May 29, 2026
fa1e153
use WithContainerMutationPrevention to prevent mutations during itera…
turbolent May 29, 2026
464a2b0
Update version
SupunS May 29, 2026
e73e3a0
Add more tests
SupunS May 29, 2026
932172f
Merge pull request #518 from onflow/supun/access-stale-slab-references
turbolent May 29, 2026
da7561d
fix gaps in stale atree slab detection by also taking into account sl…
turbolent May 29, 2026
a222cae
Add more tests
SupunS May 29, 2026
6997409
Merge branch 'v1.10.4-rc' of https://github.com/dapperlabs/cadence-in…
SupunS May 29, 2026
02935de
adjust swap in VM to match interpreter
turbolent May 29, 2026
5cb172c
Merge branch 'v1.10.4-rc' into bastian/fix-stale-atree-slab-detection…
turbolent May 29, 2026
7479f3b
check invalidated value or value reference in swap like VM used to
turbolent May 29, 2026
63ec811
improve swapping
turbolent May 30, 2026
719c364
add support for using internal atree
turbolent Jun 1, 2026
a4f8bf7
switch to internal atree
turbolent Jun 1, 2026
310afba
fix backward compatibility check: pass atree deploy key
turbolent Jun 1, 2026
a3a17dd
fix GOPRIVATE
turbolent Jun 1, 2026
4999072
try to fix compatibility check
turbolent Jun 1, 2026
aef6c92
Merge pull request #522 from onflow/bastian/internal-atree
turbolent Jun 1, 2026
82c09dd
Merge branch 'v1.10.4-rc' into bastian/fix-stale-atree-slab-detection…
turbolent Jun 1, 2026
853317a
also use internal atree in compatibility check tool
turbolent Jun 1, 2026
d7d5ba8
update to internal atree with shared state refactor
turbolent Jun 1, 2026
851cd91
add more tests
turbolent Jun 1, 2026
e16792c
revert
turbolent Jun 2, 2026
06f1ba9
update atree, fix incorrect tests creating multiple storages
turbolent Jun 2, 2026
0a0e37c
remove update of atree value pointers of containers, fix canonicaliza…
turbolent Jun 2, 2026
5c984f8
fix 06f1ba9c1
turbolent Jun 2, 2026
85b6998
remove cached value ID from containers
turbolent Jun 2, 2026
ba53008
fix iteration: references resulting from container methods may get mu…
turbolent Jun 2, 2026
e2eae2f
Merge branch 'v1.10.4-rc' into bastian/atree-value-canonicalization
turbolent Jun 2, 2026
2eda5a5
adjust staleness tests, they are working now; remove InvalidatedConta…
turbolent Jun 2, 2026
bee5b40
fix value smoke tests: clear canonoical atree containers
turbolent Jun 2, 2026
c4e54d3
update atree
turbolent Jun 2, 2026
59ceb63
reduce code duplication in canonicalizeContainerElement
turbolent Jun 3, 2026
d600722
introduce ContainerElementContext, add atree container cache to VM
turbolent Jun 3, 2026
7348c62
run tests also with VM
turbolent Jun 3, 2026
30e8aaa
update atree
turbolent Jun 3, 2026
c569220
fix lint
turbolent Jun 3, 2026
30d8ada
Merge pull request #520 from onflow/supun/access-stale-slab-references-2
turbolent Jun 3, 2026
1718c83
Merge branch 'v1.10.4-rc' into bastian/fix-stale-atree-slab-detection…
turbolent Jun 3, 2026
9d1e1a1
update atree
turbolent Jun 3, 2026
3fe1e3f
bring back value ID defensive check
turbolent Jun 3, 2026
465109b
Merge pull request #519 from onflow/bastian/fix-stale-atree-slab-dete…
turbolent Jun 3, 2026
3330cc0
Merge branch 'v1.10.4-rc' into bastian/fix-stale-atree-slab-detection…
turbolent Jun 3, 2026
8dfeabf
Merge branch 'v1.10.4-rc' into bastian/atree-value-canonicalization
turbolent Jun 3, 2026
1488c3d
use LiveValueID(), ValueID() is now returneing cached/initial value I…
turbolent Jun 3, 2026
7640724
always clear canonical atree container
turbolent Jun 3, 2026
10af796
also always clear canonical atree container for dictionaries
turbolent Jun 3, 2026
6d3b0d5
add convenience methods for getting correct iterator depending on asR…
turbolent Jun 3, 2026
a918eae
also clear canonical atree container from cache on non-resource remove
turbolent Jun 3, 2026
3fd19e5
also clear cache on storage map set/remove
turbolent Jun 3, 2026
3fdd6bd
also clear cache in deep remove. recursion then also clears cache ent…
turbolent Jun 3, 2026
bc25a43
add tests and comments
turbolent Jun 4, 2026
f80ad38
require ContainerElementContext to be non-nil
turbolent Jun 4, 2026
ce56b44
clear atree container pointer when removing
turbolent Jun 4, 2026
984e7c0
improve comments
turbolent Jun 4, 2026
55d533e
assert container is invalidated
turbolent Jun 4, 2026
e760fa6
move and add test
turbolent Jun 4, 2026
0c14486
also mark all member expressions as nested resource moves
turbolent Jun 5, 2026
09606ba
adjust test expectation
turbolent Jun 5, 2026
1c3664a
add accessed type check to RemoveField instruction
turbolent Jun 5, 2026
dcf1c6f
Merge pull request #523 from onflow/bastian/remove-field-accessed-typ…
turbolent Jun 5, 2026
15657a4
Merge branch 'v1.10.4-rc' into bastian/fix-stale-atree-slab-detection…
turbolent Jun 5, 2026
157d2fc
Merge branch 'v1.10.4-rc' into bastian/atree-value-canonicalization
turbolent Jun 5, 2026
1c432b7
Merge pull request #521 from onflow/bastian/fix-stale-atree-slab-dete…
turbolent Jun 6, 2026
4a6b351
Merge branch 'v1.10.4-rc' into bastian/atree-value-canonicalization
turbolent Jun 10, 2026
c6e9178
add tests for entitled capability preservation in nested AnyStruct up…
turbolent Jun 10, 2026
39d152e
forbid mapping access modifier on initializers
turbolent Jun 10, 2026
4070a97
add tests for switch-statement unboxing of nested optional nils
turbolent Jun 10, 2026
ff6961d
fix return-info doc comments, remove duplicate test, add guard-else-c…
turbolent Jun 10, 2026
b48c2ed
improve comments
turbolent Jun 10, 2026
99cc84a
fix elaboration used for defensive unreachable emission after inherit…
turbolent Jun 10, 2026
25a3f5f
clarify conservative behavior of entitlement set intersection and add…
turbolent Jun 10, 2026
b746ced
fix misleading receiver-dereference comments on container extract met…
turbolent Jun 10, 2026
882305e
add positive and primitive-access tests for attachment self authoriza…
turbolent Jun 10, 2026
16ba976
fix stale comment on for-in type-confusion test, add reference-contai…
turbolent Jun 10, 2026
f2fe57b
scope jump offsets by jump target, so `continue` survives switch boun…
turbolent Jun 11, 2026
90cc860
update version
turbolent Jun 11, 2026
0914b07
match atree version
turbolent Jun 11, 2026
7fa937c
update version
turbolent Jun 11, 2026
4bb08eb
match atree version
turbolent Jun 11, 2026
2a38f3c
Merge pull request #525 from onflow/bastian/fix-continue-jump-offset-…
turbolent Jun 11, 2026
254286d
improve comments
turbolent Jun 11, 2026
7985617
avoid code duplication when reading enum's raw value field
turbolent Jun 11, 2026
8b6f458
Merge pull request #524 from onflow/bastian/v1.10.4-rc-pr-follow-ups
turbolent Jun 12, 2026
bf7d94c
Merge branch 'v1.10.4-rc' into bastian/atree-value-canonicalization
turbolent Jun 12, 2026
8b29b40
emit unreachable instruction after invocation of function with never …
turbolent Jun 12, 2026
903d292
validate void returns
turbolent Jun 12, 2026
e2e67dd
validate invocations of functions with never return type
turbolent Jun 12, 2026
c61b300
Merge pull request #517 from onflow/bastian/atree-value-canonicalization
turbolent Jun 12, 2026
7703ee2
update to internal atree v0.16.1-rc.2
turbolent Jun 12, 2026
653f24b
pass invocation context to CreateAccount so a contract function can b…
turbolent Jun 15, 2026
ff9d179
Merge pull request #527 from onflow/bastian/update-atree-internal-v0.…
turbolent Jun 15, 2026
b641501
Merge pull request #526 from onflow/bastian/add-more-defensive-checks
turbolent Jun 15, 2026
6268347
Merge branch 'v1.10.4-rc' into bastian/create-account-pass-invocation…
turbolent Jun 15, 2026
dc8af96
Merge pull request #528 from onflow/bastian/create-account-pass-invoc…
turbolent Jun 16, 2026
054163a
Canonicalize optional container elements
turbolent Jun 26, 2026
f276386
Merge pull request #529 from onflow/bastian/canonicalize-some-contain…
turbolent Jun 29, 2026
d98f827
update to internal atree v0.16.1-rc.3
turbolent Jun 29, 2026
8b71a06
update version
turbolent Jun 29, 2026
a827de1
Merge pull request #530 from onflow/bastian/update-atree-internal-v0.…
turbolent Jun 29, 2026
c157cbe
update to atree v0.16.1
turbolent Jul 2, 2026
d01300f
Merge pull request #4512 from onflow/bastian/update-atree-v0.16.1
turbolent Jul 2, 2026
470390c
Merge branch 'v1.10' into bastian/merge-v1.10
turbolent Jul 2, 2026
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/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
with:
fetch-depth: 0

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Detect changed components
uses: dorny/paths-filter@v3
id: changes
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand All @@ -43,6 +49,12 @@ jobs:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand All @@ -62,6 +74,12 @@ jobs:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand All @@ -84,6 +102,12 @@ jobs:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand All @@ -104,6 +128,12 @@ jobs:
# required to update the embedded version during code generation
fetch-depth: 0

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand Down Expand Up @@ -145,5 +175,11 @@ jobs:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: semgrep ci
run: semgrep ci --config semgrep.yaml
6 changes: 6 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Set up Go
uses: actions/setup-go@v6
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,23 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v6

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
working-directory: compat
run: pip3 install -r requirements.txt

- name: Run
working-directory: compat
run: "python3 main.py"
13 changes: 10 additions & 3 deletions .github/workflows/compatibility-check-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
secrets:
FIND_API_AUTH:
required: true
ATREE_DEPLOY_KEY:

concurrency:
group: ${{ github.workflow }}-${{ inputs.base-branch || github.run_id }}-${{ inputs.chain }}
Expand All @@ -33,10 +34,16 @@ jobs:
with:
fetch-depth: 0

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- uses: actions/setup-go@v6
with:
go-version-file: ./tools/compatibility-check/go.mod
cache: true
cache: false

- name: Make output dirs
run: |
Expand Down Expand Up @@ -75,8 +82,8 @@ jobs:
- name: Configure permissions
if: github.repository != 'onflow/cadence'
run: |
echo "GOPRIVATE=github.com/${{ inputs.repo }}" >> "$GITHUB_ENV"
git config --global url."https://${{ github.actor }}:${{ github.token }}@github.com".insteadOf "https://github.com"
echo "GOPRIVATE=github.com/${{ inputs.repo }},github.com/onflow/*-internal" >> "$GITHUB_ENV"
git config --global url."https://${{ github.actor }}:${{ github.token }}@github.com/${{ inputs.repo }}".insteadOf "https://github.com/${{ inputs.repo }}"

# Check contracts using current branch

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/compatibility-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
chain: mainnet
secrets:
FIND_API_AUTH: ${{ secrets.FIND_API_AUTH }}
ATREE_DEPLOY_KEY: ${{ secrets.ATREE_DEPLOY_KEY }}

testnet:
needs: setup
Expand All @@ -77,3 +78,4 @@ jobs:
chain: testnet
secrets:
FIND_API_AUTH: ${{ secrets.FIND_API_AUTH }}
ATREE_DEPLOY_KEY: ${{ secrets.ATREE_DEPLOY_KEY }}
12 changes: 12 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
with:
repository: 'onflow/flow-go'

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand All @@ -50,6 +56,12 @@ jobs:
with:
repository: 'onflow/flow-emulator'

- name: Setup private build environment
if: ${{ vars.PRIVATE_BUILDS_SUPPORTED == 'true' }}
uses: ./actions/private-setup
with:
atree_deploy_key: ${{ secrets.ATREE_DEPLOY_KEY }}

- name: Setup Go
uses: actions/setup-go@v6
with:
Expand Down
27 changes: 27 additions & 0 deletions actions/private-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Private Build Setup"
description: "Checks and configures the environment for building private dependencies"
inputs:
atree_deploy_key:
description: "Deploy Key for Private Atree Repo"
required: true
go_private_value:
description: "The value for GOPRIVATE"
required: false
default: "github.com/onflow/*-internal"
runs:
using: "composite"
steps:
- name: Load atree deploy key
uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: "${{ inputs.atree_deploy_key }}"

- name: Configure git for SSH
shell: bash
run: |
git config --global url."git@github.com:".insteadOf "https://github.com/"

- name: Configure GOPRIVATE env
shell: bash
run: |
echo "GOPRIVATE=${{ inputs.go_private_value }}" >> $GITHUB_ENV
Loading
Loading