Repository navigation
Make CI scripts more homogeneous #220
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
30848af
Use `fn_params_layout` in `rustfmt`
tnull 139f58f
Make CI script names more homogeneous
tnull 14c0d37
Move VSS integration tests to integration test folder
tnull 3fdd3b0
Move Rust integration tests to `tests` folder..
tnull 4b8220b
Manually download `bitcoind`/`electrs` for CI tests
tnull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/cln.yml → .github/workflows/cln-integration.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: Continuous Integration Checks - CLN | ||
| name: CI Checks - CLN Integration Tests | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: Continuous Integration Checks - Kotlin | ||
| name: CI Checks - Kotlin Tests | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: Continuous Integration Checks - Python | ||
| name: CI Checks - Python Tests | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Our Esplora-based tests require `electrs` and `bitcoind` | ||
| # binaries. Here, we download the binaries, validate them, and export their | ||
| # location via `ELECTRS_EXE`/`BITCOIND_EXE` which will be used by the | ||
| # `electrsd`/`bitcoind` crates in our tests. | ||
|
|
||
| HOST_PLATFORM="$(rustc --version --verbose | grep "host:" | awk '{ print $2 }')" | ||
| ELECTRS_DL_ENDPOINT="https://github.com/RCasatta/electrsd/releases/download/electrs_releases" | ||
| ELECTRS_VERSION="esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254" | ||
| BITCOIND_DL_ENDPOINT="https://bitcoincore.org/bin/" | ||
| BITCOIND_VERSION="25.1" | ||
| if [[ "$HOST_PLATFORM" == *linux* ]]; then | ||
| ELECTRS_DL_FILE_NAME=electrs_linux_"$ELECTRS_VERSION".zip | ||
| ELECTRS_DL_HASH="865e26a96e8df77df01d96f2f569dcf9622fc87a8d99a9b8fe30861a4db9ddf1" | ||
| BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-linux-gnu.tar.gz | ||
| BITCOIND_DL_HASH="a978c407b497a727f0444156e397b50491ce862d1f906fef9b521415b3611c8b" | ||
| elif [[ "$HOST_PLATFORM" == *darwin* ]]; then | ||
| ELECTRS_DL_FILE_NAME=electrs_macos_"$ELECTRS_VERSION".zip | ||
| ELECTRS_DL_HASH="2d5ff149e8a2482d3658e9b386830dfc40c8fbd7c175ca7cbac58240a9505bcd" | ||
| BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-apple-darwin.tar.gz | ||
| BITCOIND_DL_HASH="1acfde0ec3128381b83e3e5f54d1c7907871d324549129592144dd12a821eff1" | ||
| else | ||
| echo "\n\nUnsupported platform: $HOST_PLATFORM Exiting.." | ||
| exit 1 | ||
| fi | ||
|
|
||
| DL_TMP_DIR=$(mktemp -d) | ||
| trap 'rm -rf -- "$DL_TMP_DIR"' EXIT | ||
|
|
||
| pushd "$DL_TMP_DIR" | ||
| ELECTRS_DL_URL="$ELECTRS_DL_ENDPOINT"/"$ELECTRS_DL_FILE_NAME" | ||
| curl -L -o "$ELECTRS_DL_FILE_NAME" "$ELECTRS_DL_URL" | ||
| echo "$ELECTRS_DL_HASH $ELECTRS_DL_FILE_NAME"|shasum -a 256 -c | ||
| unzip "$ELECTRS_DL_FILE_NAME" | ||
| export ELECTRS_EXE="$DL_TMP_DIR"/electrs | ||
| chmod +x "$ELECTRS_EXE" | ||
|
|
||
| BITCOIND_DL_URL="$BITCOIND_DL_ENDPOINT"/bitcoin-core-"$BITCOIND_VERSION"/"$BITCOIND_DL_FILE_NAME" | ||
| curl -L -o "$BITCOIND_DL_FILE_NAME" "$BITCOIND_DL_URL" | ||
| echo "$BITCOIND_DL_HASH $BITCOIND_DL_FILE_NAME"|shasum -a 256 -c | ||
| tar xzf "$BITCOIND_DL_FILE_NAME" | ||
| export BITCOIND_EXE="$DL_TMP_DIR"/bitcoin-"$BITCOIND_VERSION"/bin/bitcoind | ||
| chmod +x "$BITCOIND_EXE" | ||
| popd | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we do this as part of setup_bitcoind_and_electrsd() in test code?
so that our CI and local tests work consistently and in same manner.
This will avoid another flag.
Moreover, the auto-download feature of bitcoind doesn't work on my mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Electrsd and bitcoind already do this in Rust but pull in quite a bit of annoying unnecessary dev dependencies to do so. Rather than constantly pinning new dependencies (and even risking to mask some actual dependency bump requirements), we can just use CI's curl and be done with it.
We leave the auto-download feature as the default behavior, so nothing changes for local testing.
I assume this is due to some local anti-virus software or similar, which we probably can't make work in the build scripts. If manual downloads work for you, you can use the newly added download script, or just point
BITCOIND_EXEandELECTRS_EXEenv. variables to some preinstalled binaries before running with theno_downloadcfg flag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I am fine either ways, feel free to continue with current approach.
I was hoping that if we do it ourselves we will just need zip and reqwest and we can use fixed lower versions of those crates.