Skip to content

chore: merge v0.2.0-rc.0 to main #669

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

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/check-abi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: check-abi
# This workflow checks that the example contracts can export their ABI.
permissions:
contents: read
on:
push:
branches: [main, v*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check-abi:
name: Check ABI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""

- name: Install cargo-stylus
run: cargo install cargo-stylus@0.5.12

- name: Run export-abi
run: ./scripts/check-abi.sh
16 changes: 16 additions & 0 deletions .github/workflows/check-antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Antora Docs
# This workflow checks that all links in the documentation are valid.
# It does this for antora docs(adoc).
on: workflow_dispatch

jobs:
check-links-adoc:
name: Check AsciiDoc Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
fail_on_error: true
37 changes: 0 additions & 37 deletions .github/workflows/check-links.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/check-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check Markdown
# This workflow checks that all links in the documentation are valid.
# It does this for markdown files.
# We prefer lycheeverse because it is faster, but doesn't support adoc files yet(https://github.com/lycheeverse/lychee/issues/291)
# Because of that, we use linkspector for adoc files and lychee for md files.
on:
push:
branches: [main, v*]
pull_request:
branches: [main, v*]

jobs:
check-links-md:
name: Check Markdown Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
uses: lycheeverse/lychee-action@v2
with:
args: --no-progress './**/*.md'
fail: true
4 changes: 2 additions & 2 deletions .github/workflows/check-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ permissions:
contents: read
on:
push:
branches: [main, release/*]
branches: [main, v*]
pull_request:
branches: [main, release/*]
branches: [main, v*]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permissions:
contents: read
on:
push:
branches: [main, release/*]
branches: [main, v*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -25,7 +25,7 @@ jobs:
rustflags: ""

- name: Install cargo-stylus
run: cargo install cargo-stylus@0.5.11
run: cargo install cargo-stylus@0.5.12

- name: Run wasm check
run: ./scripts/check-wasm.sh
32 changes: 28 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
# main branch ensures that the PR only gets built once.
on:
push:
branches: [ main, release/* ]
branches: [main, v*]
pull_request:
# If new code is pushed to a PR branch, then cancel in progress workflows for
# that PR. Ensures that we don't waste CI time, and returns results quicker.
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
# Get early warning of new lints which are regularly introduced in beta
# channels.
toolchain: [ stable, beta ]
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Cargo clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
reporter: "github-pr-check"
github_token: ${{ secrets.GITHUB_TOKEN }}
doc:
# Run docs generation on nightly rather than stable. This enables features
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
# target in this context means one of `--lib`, `--bin`, etc, and not the
# target triple.
- name: Cargo hack
run: cargo hack check --feature-powerset --depth 2 --release --target wasm32-unknown-unknown --skip std --workspace --exclude e2e --exclude basic-example-script --exclude benches
run: cargo hack check --feature-powerset --depth 2 --release --target wasm32-unknown-unknown --workspace --exclude e2e --exclude basic-script-example --exclude benches
typos:
runs-on: ubuntu-latest
name: ubuntu / stable / typos
Expand All @@ -128,3 +128,27 @@ jobs:

- name: Check spelling of files in the workspace
uses: crate-ci/typos@v1
nostd:
# This job checks whether the library is able to run without the std
# library.
runs-on: ubuntu-latest
name: ${{ matrix.target }}
strategy:
matrix:
target: [wasm32-unknown-unknown]
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
rustflags: ""

- name: Add rust targets ${{ matrix.target }}
run: rustup target add ${{ matrix.target }}

- name: Cargo check
run: cargo check --release --target ${{ matrix.target }} --no-default-features
11 changes: 2 additions & 9 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# It roughly follows these steps:
# - Install rust
# - Install `cargo-stylus`
# - Install `solc`
# - Spin up `nitro-testnode`
#
# Contract deployments and account funding happen on a per-test basis.
Expand All @@ -12,7 +11,7 @@ permissions:
contents: read
on:
push:
branches: [main, release/*]
branches: [main, v*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -33,13 +32,7 @@ jobs:
rustflags: ""

- name: Install cargo-stylus
run: cargo install cargo-stylus@0.5.10

- name: Install solc
run: |
curl -LO https://github.com/ethereum/solidity/releases/download/v0.8.24/solc-static-linux
sudo mv solc-static-linux /usr/bin/solc
sudo chmod a+x /usr/bin/solc
run: cargo install cargo-stylus@0.5.12

- name: Setup nitro node
run: ./scripts/nitro-testnode.sh -d -i
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -47,13 +47,13 @@ jobs:

- name: Restore cached corpus
id: cache-corpus
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: fuzz/corpus/${{ github.event.inputs.fuzz_target }}
key: fuzz-corpus-${{ github.event.inputs.fuzz_target }}-${{ github.sha }}
restore-keys: |
fuzz-corpus-${{ github.event.inputs.fuzz_target }}-

- name: Generate corpus if needed
if: steps.cache-corpus.outputs.cache-hit != 'true'
run: |
Expand All @@ -68,15 +68,15 @@ jobs:
run: |
# Calculate duration in seconds (minutes * 60)
DURATION=$(( ${{ github.event.inputs.fuzz_time_mins }} * 60 ))

# Run the fuzzer with a time limit
cargo +nightly fuzz run ${{ github.event.inputs.fuzz_target }} -- \
-max_total_time=$DURATION \
-detect_leaks=0 \
-max_len=4096 \
-use_value_profile=1 \
-rss_limit_mb=4096

- name: Minimize corpus (if fuzzing succeeded)
if: success()
working-directory: ./fuzz
Expand All @@ -100,12 +100,12 @@ jobs:

- name: Upload crashes
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fuzz-crashes-${{ github.event.inputs.fuzz_target }}
path: fuzz/artifacts/crashes-${{ github.event.inputs.fuzz_target }}
retention-days: 7

- name: Generate fuzzing stats
if: always()
working-directory: ./fuzz
Expand All @@ -124,11 +124,11 @@ jobs:
else
echo "No fuzzer stats available." > fuzz_stats/no_stats.txt
fi

- name: Upload fuzzing stats
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fuzz-stats-${{ github.event.inputs.fuzz_target }}
path: fuzz/fuzz_stats
retention-days: 7
retention-days: 7
10 changes: 2 additions & 8 deletions .github/workflows/gas-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permissions:
contents: read
on:
push:
branches: [main, release/*]
branches: [main, v*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -26,17 +26,11 @@ jobs:
rustflags: ""

- name: Install cargo-stylus
run: cargo install cargo-stylus@0.5.11
run: cargo install cargo-stylus@0.5.12

- name: Install wasm-opt
run: cargo install wasm-opt@0.116.1

- name: Install solc
run: |
curl -LO https://github.com/ethereum/solidity/releases/download/v0.8.24/solc-static-linux
sudo mv solc-static-linux /usr/bin/solc
sudo chmod a+x /usr/bin/solc

- name: Setup nitro node
run: ./scripts/nitro-testnode.sh -d -i
- name: run benches
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/nostd.yml

This file was deleted.

Loading
Loading