Skip to content

Commit

Permalink
ci: attempt to maintain cacheable clone of SDK
Browse files Browse the repository at this point in the history
I'm not sure if this will be automatically cached or if we will need
another call into the cache action.
  • Loading branch information
mark-rushakoff committed Oct 28, 2024
1 parent 6779f9d commit 08a8009
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ jobs:
steps:
- uses: actions/checkout@v4

# The _cosmosvendor/sync_sdk.bash script (via make deps)
# tries to use an existing SDK checkout to speed up the clone.
# Relying on actions/checkout should make that part of the cache,
# so CI ought to run faster.
- uses: actions/checkout@v4
with:
repository: cosmos/cosmos-sdk
path: ../cosmos-sdk

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ jobs:
steps:
- uses: actions/checkout@v4

# The _cosmosvendor/sync_sdk.bash script (via make deps)
# tries to use an existing SDK checkout to speed up the clone.
# Relying on actions/checkout should make that part of the cache,
# so CI ought to run faster.
- uses: actions/checkout@v4
with:
repository: cosmos/cosmos-sdk
path: ../cosmos-sdk

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions _cosmosvendor/sync_sdk.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ if ! test -d "$SDK_DIR"; then
# where a user may have an existing clone.
# 1. GOPATH style, assuming we are in GOPATH/src/github.com/rollchains/gordian/gcosmos/_cosmosvendor
# and the other repo is GOPATH/src/github.com/cosmos/cosmos-sdk
# 2. Go module style, where we are in $X/gordian/gcosmos
# 2. Go module style, where we are in $X/gcosmos
# and the other repo is in $X/cosmos-sdk
#
# And --dissociate to ensure that our vendored copy works
# even if the referenced repo goes away for whatever reason.
git clone \
--reference-if-able ../../../cosmos/cosmos-sdk \
--reference-if-able ../../cosmos-sdk \
--reference-if-able ../cosmos-sdk \
--dissociate \
https://github.com/cosmos/cosmos-sdk \
"$SDK_DIR"
Expand Down

0 comments on commit 08a8009

Please sign in to comment.