This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 795
ci/test: improve CI jobs and tests #2189
Merged
Merged
Changes from 65 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
70f3b83
ci: move to scripts directory
DaniPopes f7963d0
nits
DaniPopes 50a4b2a
ci: improve main CI jobs
DaniPopes f805e8a
fix: install script
DaniPopes 362de60
fix
DaniPopes 8ae67b4
fix: use curl for windows installation
DaniPopes 0d14b4c
fix: wasm typo
DaniPopes 5f2de7b
tests: move to single binary
DaniPopes 376b8ce
chore: clippy
DaniPopes 9e33478
chore: clippy
DaniPopes f8696c2
chore: clippy
DaniPopes dcd1ef2
fix: test command
DaniPopes e06fcd4
fix: quote tests
DaniPopes 7a88c65
update script
DaniPopes 49c7b24
fix: action exclude
DaniPopes 017db8b
fix: dev deps
DaniPopes 8c0cb71
fix: only run wasm in own job
DaniPopes 75f63f9
ci: add aarch64 targets
DaniPopes 5f32e98
test: rm useless test
DaniPopes 2187353
ci: update security audit
DaniPopes 4cee892
ci: add deny CI
DaniPopes 5ca9864
chore: rm unused audit.toml
DaniPopes e0e7876
chore: update geth.rs
DaniPopes 504b77c
ci: remove unusable targets
DaniPopes f7e02ba
fix: install script path
DaniPopes 5a1d97a
fix: wasm
DaniPopes 3d4820d
improve script
DaniPopes c3748e9
Merge branch 'master' into ci/improve
DaniPopes 58ce0e1
fix: failing ci
DaniPopes ec0cf0e
fix: contract tests
DaniPopes e0a46a3
ci: improve install script
DaniPopes 3eb7430
update middleware tests
DaniPopes 260559a
move integration etherscan tests to tests/ dir
DaniPopes 2840b73
fix: eip2930 access_list field name
DaniPopes 770b21b
add pendingtransaction must_use
DaniPopes 902d697
add random anvil comment
DaniPopes 6d1723c
ci: add miri job
DaniPopes 8b8d723
ci: simplify
DaniPopes cc8a1d9
fixci
DaniPopes e985770
Revert "add pendingtransaction must_use"
DaniPopes f79afc7
fix: macos script
DaniPopes 0299987
fix: use curl in script
DaniPopes 14804a5
unused ci
DaniPopes 5e36c18
update script
DaniPopes 5ef4ecb
fix wasm
DaniPopes 197c541
rm_miri
DaniPopes 48a931d
fix: signer test
DaniPopes 44c4285
fix: wasm ci
DaniPopes 9433618
fix: ipc test
DaniPopes fd3c25f
fix: live celo tests
DaniPopes 399b7ef
fix: abi online source test
DaniPopes 314bbef
fix: windows paths in test
DaniPopes 1729001
chore: update serial_test
DaniPopes cdd9d84
ci: run live tests separately
DaniPopes 7595146
fix: provider tests
DaniPopes 5d319d5
Merge branch 'master' into ci/improve
DaniPopes d934e16
fix: unused var
DaniPopes 2b07891
fix: feature
DaniPopes ee30fda
fix merge
DaniPopes b55423c
fix: etherscan key tests
DaniPopes 0714817
ci: rm duplicate audit
DaniPopes d78c2f1
fix: split etherscan test ci
DaniPopes 8536eae
Merge branch 'master' into ci/improve
DaniPopes b1d7c47
fix: etherscan test
DaniPopes 8c06409
fix: generate multiple unused ports
DaniPopes 5aea513
Merge branch 'master' into ci/improve
DaniPopes 70a8aa7
fix: source test
DaniPopes 990c178
fix: udeps
DaniPopes afbb71e
rm unused
DaniPopes 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
This file was deleted.
Oops, something went wrong.
This file contains 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,89 @@ | ||
#!/usr/bin/env bash | ||
# Installs Solc and Geth binaries | ||
# Note: intended for use only with CI (x86_64 Ubuntu, MacOS or Windows) | ||
set -e | ||
|
||
GETH_BUILD=${GETH_BUILD:-"1.11.2-73b01f40"} | ||
|
||
BIN_DIR=${BIN_DIR:-"$HOME/bin"} | ||
|
||
PLATFORM="$(uname -s | awk '{print tolower($0)}')" | ||
if [ "$PLATFORM" != "linux" ] && [ "$PLATFORM" != "darwin" ]; then | ||
EXT=".exe" | ||
fi | ||
|
||
main() { | ||
mkdir -p "$BIN_DIR" | ||
cd "$BIN_DIR" | ||
export PATH="$BIN_DIR:$PATH" | ||
if [ "$GITHUB_PATH" ]; then | ||
echo "$BIN_DIR" >> "$GITHUB_PATH" | ||
fi | ||
|
||
install_geth & | ||
g=$! | ||
install_solc & | ||
wait $g $! | ||
|
||
echo "" | ||
echo "Installed Geth:" | ||
geth version | ||
echo "" | ||
echo "Installed Solc:" | ||
solc --version | ||
} | ||
|
||
# Installs geth from https://geth.ethereum.org/downloads | ||
install_geth() { | ||
case "$PLATFORM" in | ||
linux|darwin) | ||
name="geth-$PLATFORM-amd64-$GETH_BUILD" | ||
curl -s "https://gethstore.blob.core.windows.net/builds/$name.tar.gz" | tar -xzf - | ||
mv -f "$name/geth" ./ | ||
rm -rf "$name" | ||
chmod +x geth | ||
;; | ||
*) | ||
name="geth-windows-amd64-$GETH_BUILD" | ||
zip="$name.zip" | ||
curl -so "$zip" "https://gethstore.blob.core.windows.net/builds/$zip" | ||
unzip "$zip" | ||
mv -f "$name/geth.exe" ./ | ||
rm -rf "$name" "$zip" | ||
;; | ||
esac | ||
} | ||
|
||
# Installs solc from https://binaries.soliditylang.org (https://github.com/ethereum/solc-bin) | ||
install_solc() { | ||
bins_url="https://binaries.soliditylang.org" | ||
case "$PLATFORM" in | ||
linux) bins_url+="/linux-amd64";; | ||
darwin) bins_url+="/macosx-amd64";; | ||
*) bins_url+="/windows-amd64";; | ||
esac | ||
|
||
list=$(curl -s "$bins_url/list.json") | ||
# use latest version | ||
if [ -z "$SOLC_VERSION" ]; then | ||
SOLC_VERSION="$(echo "$list" | jq -r ".latestRelease")" | ||
fi | ||
bin=$(echo "$list" | jq -r ".releases[\"$SOLC_VERSION\"]") | ||
|
||
if [ "$bin" = "null" ]; then | ||
echo "Invalid Solc version: $SOLC_VERSION" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# windows versions <= 0.7.1 use .zip | ||
if [[ "$bin" = *.zip ]]; then | ||
echo "Cannot install solc <= 0.7.1" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
curl -so "$bin" "$bins_url/$bin" | ||
mv -f "$bin" "solc$EXT" | ||
chmod +x "solc$EXT" | ||
} | ||
|
||
main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains 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.
is it worth caching and then shortcutting if tool is already installed?
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.
hmm, would need to check version in case they differ, but we're only downloading binary so it's not that important imo