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

ci/test: improve CI jobs and tests #2189

Merged
merged 69 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
70f3b83
ci: move to scripts directory
DaniPopes Feb 24, 2023
f7963d0
nits
DaniPopes Feb 24, 2023
50a4b2a
ci: improve main CI jobs
DaniPopes Feb 24, 2023
f805e8a
fix: install script
DaniPopes Feb 24, 2023
362de60
fix
DaniPopes Feb 24, 2023
8ae67b4
fix: use curl for windows installation
DaniPopes Feb 24, 2023
0d14b4c
fix: wasm typo
DaniPopes Feb 24, 2023
5f2de7b
tests: move to single binary
DaniPopes Feb 24, 2023
376b8ce
chore: clippy
DaniPopes Feb 24, 2023
9e33478
chore: clippy
DaniPopes Feb 24, 2023
f8696c2
chore: clippy
DaniPopes Feb 24, 2023
dcd1ef2
fix: test command
DaniPopes Feb 24, 2023
e06fcd4
fix: quote tests
DaniPopes Feb 24, 2023
7a88c65
update script
DaniPopes Feb 24, 2023
49c7b24
fix: action exclude
DaniPopes Feb 24, 2023
017db8b
fix: dev deps
DaniPopes Feb 24, 2023
8c0cb71
fix: only run wasm in own job
DaniPopes Feb 24, 2023
75f63f9
ci: add aarch64 targets
DaniPopes Feb 24, 2023
5f32e98
test: rm useless test
DaniPopes Feb 24, 2023
2187353
ci: update security audit
DaniPopes Feb 24, 2023
4cee892
ci: add deny CI
DaniPopes Feb 24, 2023
5ca9864
chore: rm unused audit.toml
DaniPopes Feb 24, 2023
e0e7876
chore: update geth.rs
DaniPopes Feb 24, 2023
504b77c
ci: remove unusable targets
DaniPopes Feb 24, 2023
f7e02ba
fix: install script path
DaniPopes Feb 24, 2023
5a1d97a
fix: wasm
DaniPopes Feb 24, 2023
3d4820d
improve script
DaniPopes Feb 24, 2023
c3748e9
Merge branch 'master' into ci/improve
DaniPopes Feb 25, 2023
58ce0e1
fix: failing ci
DaniPopes Feb 25, 2023
ec0cf0e
fix: contract tests
DaniPopes Feb 25, 2023
e0a46a3
ci: improve install script
DaniPopes Feb 25, 2023
3eb7430
update middleware tests
DaniPopes Feb 25, 2023
260559a
move integration etherscan tests to tests/ dir
DaniPopes Feb 25, 2023
2840b73
fix: eip2930 access_list field name
DaniPopes Feb 25, 2023
770b21b
add pendingtransaction must_use
DaniPopes Feb 25, 2023
902d697
add random anvil comment
DaniPopes Feb 25, 2023
6d1723c
ci: add miri job
DaniPopes Feb 25, 2023
8b8d723
ci: simplify
DaniPopes Feb 25, 2023
cc8a1d9
fixci
DaniPopes Feb 25, 2023
e985770
Revert "add pendingtransaction must_use"
DaniPopes Feb 25, 2023
f79afc7
fix: macos script
DaniPopes Feb 25, 2023
0299987
fix: use curl in script
DaniPopes Feb 25, 2023
14804a5
unused ci
DaniPopes Feb 25, 2023
5e36c18
update script
DaniPopes Feb 26, 2023
5ef4ecb
fix wasm
DaniPopes Feb 27, 2023
197c541
rm_miri
DaniPopes Feb 27, 2023
48a931d
fix: signer test
DaniPopes Feb 27, 2023
44c4285
fix: wasm ci
DaniPopes Feb 27, 2023
9433618
fix: ipc test
DaniPopes Feb 27, 2023
fd3c25f
fix: live celo tests
DaniPopes Feb 27, 2023
399b7ef
fix: abi online source test
DaniPopes Feb 27, 2023
314bbef
fix: windows paths in test
DaniPopes Feb 27, 2023
1729001
chore: update serial_test
DaniPopes Feb 27, 2023
cdd9d84
ci: run live tests separately
DaniPopes Feb 27, 2023
7595146
fix: provider tests
DaniPopes Feb 27, 2023
5d319d5
Merge branch 'master' into ci/improve
DaniPopes Feb 27, 2023
d934e16
fix: unused var
DaniPopes Feb 27, 2023
2b07891
fix: feature
DaniPopes Feb 27, 2023
ee30fda
fix merge
DaniPopes Feb 27, 2023
b55423c
fix: etherscan key tests
DaniPopes Feb 27, 2023
0714817
ci: rm duplicate audit
DaniPopes Feb 27, 2023
d78c2f1
fix: split etherscan test ci
DaniPopes Feb 27, 2023
8536eae
Merge branch 'master' into ci/improve
DaniPopes Feb 27, 2023
b1d7c47
fix: etherscan test
DaniPopes Feb 27, 2023
8c06409
fix: generate multiple unused ports
DaniPopes Feb 28, 2023
5aea513
Merge branch 'master' into ci/improve
DaniPopes Feb 28, 2023
70a8aa7
fix: source test
DaniPopes Feb 28, 2023
990c178
fix: udeps
DaniPopes Feb 28, 2023
afbb71e
rm unused
DaniPopes Mar 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .cargo/audit.toml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/scripts/install_test_binaries.sh
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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

14 changes: 0 additions & 14 deletions .github/workflows/audit-on-push.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: book

on:
push:
branches: [master]
paths:
- 'book/**'
- 'book.toml'
- "book/**"
- "book.toml"

pull_request:
branches: [master]
paths:
- 'book/**'
- 'book.toml'
- "book/**"
- "book.toml"

jobs:
build:
Expand Down