Skip to content

Commit

Permalink
Merge pull request #614 from matter-labs/elfedy-ummc
Browse files Browse the repository at this point in the history
chore: initial merge conflict resolution for update up to f5aa05e
  • Loading branch information
elfedy authored Oct 28, 2024
2 parents 1c99984 + b03ec29 commit 427c240
Show file tree
Hide file tree
Showing 479 changed files with 11,268 additions and 5,802 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
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @danipopes @klkvr @mattsse
* @matter-labs/devxp
* @matter-labs/external-moonsonglabs-team
10 changes: 0 additions & 10 deletions .github/INTEGRATION_FAILURE.md

This file was deleted.

4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/BUG-FORM.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: File a bug report
labels: ["T-bug", "T-needs-triage"]
labels: ["bug 🐛", "needs triage ♟️"]
body:
- type: markdown
attributes:
Expand All @@ -16,9 +16,7 @@ body:
options:
- Forge
- Cast
- Anvil
- Foundryup
- Chisel
- Other (please describe)
validations:
required: true
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/FEATURE-FORM.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Suggest a feature
labels: ["T-feature", "T-needs-triage"]
labels: ["feature", "needs triage ♟️"]
body:
- type: markdown
attributes:
Expand All @@ -16,9 +16,7 @@ body:
options:
- Forge
- Cast
- Anvil
- Foundryup
- Chisel
- Other (please describe)
validations:
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Support
url: https://t.me/foundry_support
about: This issue tracker is only for bugs and feature requests. Support is available on Telegram!
- name: Dev Support
url: https://github.com/ZKsync-Community-Hub/zksync-developers/discussions/
about: This issue tracker is only for bugs and feature requests. Support is available on Dev Discussions!
30 changes: 13 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
# What :computer:
* First thing updated with this PR
* Second thing updated with this PR
* Third thing updated with this PR

Bug fixes and new features should include tests.
-->
# Why :hand:
* Reason why first thing was added to PR
* Reason why second thing was added to PR
* Reason why third thing was added to PR

## Motivation
# Evidence :camera:
Include screenshots, screen recordings, or `console` output here demonstrating that your changes work as intended

<!--
Explain the context and why you're making that change. What is the problem
you're trying to solve? In some cases there is not a problem and this can be
thought of as being the motivation for your change.
-->
<!-- All sections below are optional. You can uncomment any section applicable to your Pull Request. -->

## Solution

<!--
Summarize the solution and provide any necessary context needed to understand
the code change.
-->
<!-- # Notes :memo:
* Any notes/thoughts that the reviewers should know prior to reviewing the code? -->
2 changes: 1 addition & 1 deletion .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "bug: release workflow failed"
labels: P-high, T-bug
labels: p0 :white_circle:, bug 🐛
---

The release workflow has failed. Some or all binaries might have not been published correctly.
Expand Down
Binary file removed .github/compilation-benchmark.png
Binary file not shown.
Binary file removed .github/demo.gif
Binary file not shown.
Binary file removed .github/logo.png
Binary file not shown.
51 changes: 20 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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 @@ -136,69 +135,59 @@ 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
flags=(--target $TARGET --profile $PROFILE --bins
--no-default-features --features rustls,aws-kms,cli,asm-keccak)
target="${{ matrix.target }}"
flags=()
# `jemalloc` is not fully supported on MSVC or aarch64 Linux.
if [[ "$TARGET" != *msvc* && "$TARGET" != "aarch64-unknown-linux-gnu" ]]; then
flags+=(--features jemalloc)
fi
# Disable asm-keccak, see https://github.com/alloy-rs/core/issues/711
# # Remove jemalloc, only keep `asm-keccak` if applicable
# if [[ "$target" != *msvc* && "$target" != "aarch64-unknown-linux-gnu" ]]; then
# flags+=(--features asm-keccak)
# fi
[[ "$TARGET" == *windows* ]] && ext=".exe"
cargo build "${flags[@]}"
cargo build --release --bin forge --bin cast --target "$target" "${flags[@]}"
bins=(cast forge)
for name in "${bins[@]}"; do
bin=$OUT_DIR/$name$ext
echo ""
file "$bin" || true
du -h "$bin" || true
ldd "$bin" || true
$bin --version || true
bin=./target/$target/release/$name
file "$bin" || true
ldd "$bin" || true
$bin --version || true
done
- name: Archive binaries
id: artifacts
env:
PLATFORM_NAME: ${{ matrix.platform }}
OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
TARGET: ${{ matrix.target }}
ARCH: ${{ matrix.arch }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
shell: bash
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C $OUT_DIR forge cast
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
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 $OUT_DIR forge cast
gtar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
else
cd $OUT_DIR
7z a -tzip "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" forge.exe cast.exe
mv "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" ../../../
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" >> $GITHUB_OUTPUT
fi
- name: Build man page
id: man
if: matrix.target == 'x86_64-unknown-linux-gnu'
env:
OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }}
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
shell: bash
run: |
sudo apt-get -y install help2man
help2man -N $OUT_DIR/forge > forge.1
help2man -N $OUT_DIR/cast > cast.1
help2man -N ./target/${TARGET}/release/forge > forge.1
help2man -N ./target/${TARGET}/release/cast > cast.1
gzip forge.1
gzip cast.1
tar -czvf "foundry_man_${VERSION_NAME}.tar.gz" forge.1.gz cast.1.gz
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/retry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Retry workflow

on:
workflow_dispatch:
inputs:
run_id:
required: true
jobs:
rerun:
runs-on: ubuntu-latest
steps:
- name: rerun ${{ inputs.run_id }}
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
gh run rerun ${{ inputs.run_id }} --failed
41 changes: 40 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@ jobs:
shell: bash
run: ./.github/scripts/format.sh --check

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
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings

crate-checks:
runs-on: ubuntu-22.04-github-hosted-16core
timeout-minutes: 60
Expand Down Expand Up @@ -109,7 +131,7 @@ jobs:
log: info
logFilePath: era_test_node.log
target: x86_64-unknown-linux-gnu
releaseTag: v0.1.0-alpha.25
releaseTag: v0.1.0-alpha.29

- name: Run zk tests
env:
Expand All @@ -127,3 +149,20 @@ jobs:
cd /tmp && curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash
- name: Verify installation
run: forge --version

ci-success:
runs-on: ubuntu-latest
if: always()
needs:
- doctest
- codespell
- clippy
- rustfmt
- forge-fmt
- crate-checks
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_STORE
/target
out/
snapshots/
out.json
.idea
.vscode
Loading

0 comments on commit 427c240

Please sign in to comment.