Skip to content

Commit

Permalink
ci/test: improve CI jobs and tests (#2189)
Browse files Browse the repository at this point in the history
* ci: move to scripts directory

* nits

* ci: improve main CI jobs

* fix: install script

* fix

* fix: use curl for windows installation

* fix: wasm typo

* tests: move to single binary

* chore: clippy

* chore: clippy

* chore: clippy

* fix: test command

* fix: quote tests

* update script

* fix: action exclude

* fix: dev deps

* fix: only run wasm in own job

* ci: add aarch64 targets

* test: rm useless test

* ci: update security audit

* ci: add deny CI

* chore: rm unused audit.toml

* chore: update geth.rs

* ci: remove unusable targets

* fix: install script path

* fix: wasm

* improve script

* fix: failing ci

* fix: contract tests

* ci: improve install script

* update middleware tests

* move integration etherscan tests to tests/ dir

* fix: eip2930 access_list field name

* add pendingtransaction must_use

* add random anvil comment

* ci: add miri job

* ci: simplify

* fixci

* Revert "add pendingtransaction must_use"

This reverts commit 770b21b.

* fix: macos script

* fix: use curl in script

* unused ci

* update script

* fix wasm

* rm_miri

* fix: signer test

* fix: wasm ci

* fix: ipc test

* fix: live celo tests

* fix: abi online source test

* fix: windows paths in test

* chore: update serial_test

* ci: run live tests separately

* fix: provider tests

* fix: unused var

* fix: feature

* fix merge

* fix: etherscan key tests

* ci: rm duplicate audit

* fix: split etherscan test ci

* fix: etherscan test

* fix: generate multiple unused ports

* fix: source test

* fix: udeps

* rm unused
  • Loading branch information
DaniPopes committed Mar 1, 2023
1 parent 3477517 commit da743fc
Show file tree
Hide file tree
Showing 83 changed files with 2,447 additions and 3,138 deletions.
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
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
File renamed without changes.
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

0 comments on commit da743fc

Please sign in to comment.