Skip to content

Commit

Permalink
Merge branch 'foundry-rs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
fanligroup authored Sep 28, 2024
2 parents 8d2a535 + 25f24e6 commit 95e9d52
Show file tree
Hide file tree
Showing 284 changed files with 13,555 additions and 5,003 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,target,testdata,Cargo.toml,Cargo.lock
ignore-words-list = crate,ser,ratatui,Caf,froms,strat
11 changes: 1 addition & 10 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
* @danipopes @evalir @mattsse

crates/anvil/ @danipopes @mattsse @evalir
crates/cheatcodes/ @danipopes @mattsse @klkvr @evalir
crates/evm/coverage/ @onbjerg
crates/fmt/ @rkrasiuk
crates/linking/ @klkvr
crates/macros/ @danipopes
crates/script/ @danipopes @mattsse @klkvr
crates/wallets/ @klkvr
* @danipopes @klkvr @mattsse @grandizzy @yash-atreya @zerosnacks
39 changes: 22 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
env:
CARGO_TERM_COLOR: always
IS_NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
PROFILE: maxperf

jobs:
prepare:
Expand Down Expand Up @@ -129,25 +130,30 @@ jobs:
- name: Build binaries
env:
SVM_TARGET_PLATFORM: ${{ matrix.svm_target_platform }}
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }}
shell: bash
run: |
set -eo pipefail
target="${{ matrix.target }}"
flags=(--release --bins --no-default-features --features rustls,aws-kms,cli,asm-keccak)
flags=(--target $TARGET --profile $PROFILE --bins
--no-default-features --features rustls,aws-kms,cli,asm-keccak)
# `jemalloc` is not fully supported on MSVC or aarch64 Linux.
if [[ "$target" != *msvc* && "$target" != "aarch64-unknown-linux-gnu" ]]; then
if [[ "$TARGET" != *msvc* && "$TARGET" != "aarch64-unknown-linux-gnu" ]]; then
flags+=(--features jemalloc)
fi
[[ "$target" == *windows* ]] && exe=".exe"
[[ "$TARGET" == *windows* ]] && ext=".exe"
cargo build --target "$target" "${flags[@]}"
cargo build "${flags[@]}"
bins=(anvil cast chisel forge)
for name in "${bins[@]}"; do
bin=./target/$target/release/$name$exe
bin=$OUT_DIR/$name$ext
echo ""
file "$bin" || true
du -h "$bin" || true
ldd "$bin" || true
$bin --version || true
done
Expand All @@ -156,21 +162,21 @@ jobs:
id: artifacts
env:
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
ARCH: ${{ matrix.arch }}
OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
ARCH: ${{ matrix.arch }}
shell: bash
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast anvil chisel
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C $OUT_DIR forge cast anvil chisel
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
elif [ "$PLATFORM_NAME" == "darwin" ]; then
# We need to use gtar here otherwise the archive is corrupt.
# See: https://github.com/actions/virtual-environments/issues/2619
gtar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast anvil chisel
gtar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C $OUT_DIR forge cast anvil chisel
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
else
cd ./target/${TARGET}/release
cd $OUT_DIR
7z a -tzip "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" forge.exe cast.exe anvil.exe chisel.exe
mv "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" ../../../
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" >> $GITHUB_OUTPUT
Expand All @@ -180,16 +186,15 @@ jobs:
id: man
if: matrix.target == 'x86_64-unknown-linux-gnu'
env:
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
shell: bash
run: |
sudo apt-get -y install help2man
help2man -N ./target/${TARGET}/release/forge > forge.1
help2man -N ./target/${TARGET}/release/cast > cast.1
help2man -N ./target/${TARGET}/release/anvil > anvil.1
help2man -N ./target/${TARGET}/release/chisel > chisel.1
help2man -N $OUT_DIR/forge > forge.1
help2man -N $OUT_DIR/cast > cast.1
help2man -N $OUT_DIR/anvil > anvil.1
help2man -N $OUT_DIR/chisel > chisel.1
gzip forge.1
gzip cast.1
gzip anvil.1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
cache-on-failure: true
- run: cargo test --workspace --doc

codespell:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
skip: "*.json"

clippy:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -107,6 +116,7 @@ jobs:
- nextest
- docs
- doctest
- codespell
- clippy
- rustfmt
- forge-fmt
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ out/
out.json
.idea
.vscode
bloat*
Loading

0 comments on commit 95e9d52

Please sign in to comment.