2019-11-25 04:48:24 +00:00
|
|
|
name: test-suite
|
|
|
|
|
2020-05-19 03:17:49 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-02-11 06:06:54 +00:00
|
|
|
- stable
|
2020-07-07 06:31:20 +00:00
|
|
|
- staging
|
|
|
|
- trying
|
2020-07-09 09:23:28 +00:00
|
|
|
- 'pr/*'
|
2020-05-19 03:17:49 +00:00
|
|
|
pull_request:
|
2020-07-21 05:51:33 +00:00
|
|
|
env:
|
|
|
|
# Deny warnings in CI
|
2023-02-21 20:54:57 +00:00
|
|
|
# Disable debug info (see https://github.com/sigp/lighthouse/issues/4005)
|
|
|
|
RUSTFLAGS: "-D warnings -C debuginfo=0"
|
2021-03-04 00:00:51 +00:00
|
|
|
# The Nightly version used for cargo-udeps, might need updating from time to time.
|
Bump Rust version (MSRV) (#4204)
## Issue Addressed
There was a [`VecDeque` bug](https://github.com/rust-lang/rust/issues/108453) in some recent versions of the Rust standard library (1.67.0 & 1.67.1) that could cause Lighthouse to panic (reported by `@Sea Monkey` on discord). See full logs below.
The issue was likely introduced in Rust 1.67.0 and [fixed](https://github.com/rust-lang/rust/pull/108475) in 1.68, and we were able to reproduce the panic ourselves using [@michaelsproul's fuzz tests](https://github.com/michaelsproul/lighthouse/blob/fuzz-lru-time-cache/beacon_node/lighthouse_network/src/peer_manager/fuzz.rs#L111) on both Rust 1.67.0 and 1.67.1.
Users that uses our Docker images or binaries are unlikely affected, as our Docker images were built with `1.66`, and latest binaries were built with latest stable (`1.68.2`). It likely impacts user that builds from source using Rust versions 1.67.x.
## Proposed Changes
Bump Rust version (MSRV) to latest stable `1.68.2`.
## Additional Info
From `@Sea Monkey` on Lighthouse Discord:
> Crash on goerli using `unstable` `dd124b2d6804d02e4e221f29387a56775acccd08`
```
thread 'tokio-runtime-worker' panicked at 'Key must exist', /mnt/goerli/goerli/lighthouse/common/lru_cache/src/time.rs:68:28
stack backtrace:
Apr 15 09:37:36.993 WARN Peer sent invalid block in single block lookup, peer_id: 16Uiu2HAm6ZuyJpVpR6y51X4Enbp8EhRBqGycQsDMPX7e5XfPYznG, error: WouldRevertFinalizedSlot { block_slot: Slot(5420212), finalized_slot: Slot(5420224) }, root: 0x10f6…3165, service: sync
0: rust_begin_unwind
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
2: core::panicking::panic_display
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:135:5
3: core::panicking::panic_str
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:119:5
4: core::option::expect_failed
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:1879:5
5: lru_cache::time::LRUTimeCache<Key>::raw_remove
6: lighthouse_network::peer_manager::PeerManager<TSpec>::handle_ban_operation
7: lighthouse_network::peer_manager::PeerManager<TSpec>::handle_score_action
8: lighthouse_network::peer_manager::PeerManager<TSpec>::report_peer
9: network::service::NetworkService<T>::spawn_service::{{closure}}
10: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
11: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
12: <futures_util::future::future::flatten::Flatten<Fut,<Fut as core::future::future::Future>::Output> as core::future::future::Future>::poll
13: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
14: tokio::runtime::task::core::Core<T,S>::poll
15: tokio::runtime::task::harness::Harness<T,S>::poll
16: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
17: tokio::runtime::scheduler::multi_thread::worker::Context::run
18: tokio::macros::scoped_tls::ScopedKey<T>::set
19: tokio::runtime::scheduler::multi_thread::worker::run
20: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
21: tokio::runtime::task::core::Core<T,S>::poll
22: tokio::runtime::task::harness::Harness<T,S>::poll
23: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Apr 15 09:37:37.069 INFO Saved DHT state service: network
Apr 15 09:37:37.070 INFO Network service shutdown service: network
Apr 15 09:37:37.132 CRIT Task panic. This is a bug! advice: Please check above for a backtrace and notify the developers, message: <none>, task_name: network
Apr 15 09:37:37.132 INFO Internal shutdown received reason: Panic (fatal error)
Apr 15 09:37:37.133 INFO Shutting down.. reason: Failure("Panic (fatal error)")
Apr 15 09:37:37.135 WARN Unable to free worker error: channel closed, msg: did not free worker, shutdown may be underway
Apr 15 09:37:39.350 INFO Saved beacon chain to disk service: beacon
Panic (fatal error)
```
2023-04-18 02:47:37 +00:00
|
|
|
PINNED_NIGHTLY: nightly-2023-04-16
|
2022-12-20 01:34:52 +00:00
|
|
|
# Prevent Github API rate limiting.
|
|
|
|
LIGHTHOUSE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2019-11-25 04:48:24 +00:00
|
|
|
jobs:
|
2021-02-09 02:00:53 +00:00
|
|
|
target-branch-check:
|
|
|
|
name: target-branch-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
steps:
|
2022-02-21 23:21:03 +00:00
|
|
|
- name: Check that the pull request is not targeting the stable branch
|
|
|
|
run: test ${{ github.base_ref }} != "stable"
|
2022-03-17 03:33:29 +00:00
|
|
|
extract-msrv:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-17 03:33:29 +00:00
|
|
|
- name: Extract Minimum Supported Rust Version (MSRV)
|
|
|
|
run: |
|
|
|
|
metadata=$(cargo metadata --no-deps --format-version 1)
|
|
|
|
msrv=$(echo $metadata | jq -r '.packages | map(select(.name == "lighthouse")) | .[0].rust_version')
|
2022-11-13 22:40:44 +00:00
|
|
|
echo "MSRV=$msrv" >> $GITHUB_OUTPUT
|
2022-03-17 03:33:29 +00:00
|
|
|
id: extract_msrv
|
|
|
|
outputs:
|
|
|
|
MSRV: ${{ steps.extract_msrv.outputs.MSRV }}
|
2019-11-25 04:48:24 +00:00
|
|
|
cargo-fmt:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: cargo-fmt
|
2019-11-25 04:48:24 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2019-11-25 04:48:24 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
|
|
|
- name: Check formatting with cargo fmt
|
|
|
|
run: make cargo-fmt
|
|
|
|
release-tests-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: release-tests-ubuntu
|
2019-11-25 04:48:24 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2019-11-27 01:47:46 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-20 22:48:14 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
2019-11-25 04:48:24 +00:00
|
|
|
- name: Run tests in release
|
|
|
|
run: make test-release
|
2021-05-19 23:05:16 +00:00
|
|
|
release-tests-windows:
|
|
|
|
name: release-tests-windows
|
2022-02-17 21:47:06 +00:00
|
|
|
runs-on: windows-2019
|
2021-05-19 23:05:16 +00:00
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-19 23:05:16 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-03-22 21:33:37 +00:00
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
2022-03-21 21:47:18 +00:00
|
|
|
- name: Install windows build tools
|
|
|
|
run: |
|
2022-09-29 01:50:11 +00:00
|
|
|
choco install python protoc visualstudio2019-workload-vctools -y
|
2022-03-21 21:47:18 +00:00
|
|
|
npm config set msvs_version 2019
|
2022-03-20 22:48:14 +00:00
|
|
|
- name: Install ganache
|
2022-03-22 21:33:37 +00:00
|
|
|
run: npm install -g ganache --loglevel verbose
|
2021-05-19 23:05:16 +00:00
|
|
|
- name: Install make
|
|
|
|
run: choco install -y make
|
2021-12-21 08:23:17 +00:00
|
|
|
- uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2023-04-21 18:29:27 +00:00
|
|
|
version: "15.0"
|
2021-12-21 08:23:17 +00:00
|
|
|
directory: ${{ runner.temp }}/llvm
|
|
|
|
- name: Set LIBCLANG_PATH
|
|
|
|
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
|
2021-05-19 23:05:16 +00:00
|
|
|
- name: Run tests in release
|
|
|
|
run: make test-release
|
2021-07-09 06:15:32 +00:00
|
|
|
beacon-chain-tests:
|
|
|
|
name: beacon-chain-tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-09 06:15:32 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-16 05:07:23 +00:00
|
|
|
- name: Run beacon_chain tests for all known forks
|
|
|
|
run: make test-beacon-chain
|
|
|
|
op-pool-tests:
|
|
|
|
name: op-pool-tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-16 05:07:23 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-16 05:07:23 +00:00
|
|
|
- name: Run operation_pool tests for all known forks
|
|
|
|
run: make test-op-pool
|
2022-08-15 01:30:56 +00:00
|
|
|
slasher-tests:
|
|
|
|
name: slasher-tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-15 01:30:56 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
|
|
|
- name: Run slasher tests for all supported backends
|
|
|
|
run: make test-slasher
|
2019-11-25 04:48:24 +00:00
|
|
|
debug-tests-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: debug-tests-ubuntu
|
2022-07-20 18:18:26 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2019-11-25 04:48:24 +00:00
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2019-11-27 01:47:46 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-20 22:48:14 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
2019-11-25 04:48:24 +00:00
|
|
|
- name: Run tests in debug
|
|
|
|
run: make test-debug
|
2020-05-08 23:37:21 +00:00
|
|
|
state-transition-vectors-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: state-transition-vectors-ubuntu
|
2020-05-08 23:37:21 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-08 23:37:21 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-08 23:37:21 +00:00
|
|
|
- name: Run state_transition_vectors in release.
|
|
|
|
run: make run-state-transition-tests
|
2019-11-25 04:48:24 +00:00
|
|
|
ef-tests-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: ef-tests-ubuntu
|
2019-11-25 04:48:24 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2019-11-27 01:47:46 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-09-25 05:58:35 +00:00
|
|
|
- name: Run consensus-spec-tests with blst, milagro and fake_crypto
|
2019-11-25 04:48:24 +00:00
|
|
|
run: make test-ef
|
|
|
|
dockerfile-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: dockerfile-ubuntu
|
2019-11-25 04:48:24 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2019-11-25 04:48:24 +00:00
|
|
|
- name: Build the root Dockerfile
|
2022-01-31 22:55:03 +00:00
|
|
|
run: docker build --build-arg FEATURES=portable -t lighthouse:local .
|
|
|
|
- name: Test the built image
|
|
|
|
run: docker run -t lighthouse:local lighthouse --version
|
2020-05-26 08:30:44 +00:00
|
|
|
eth1-simulator-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: eth1-simulator-ubuntu
|
2020-05-26 08:30:44 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-20 22:48:14 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
2020-05-26 08:30:44 +00:00
|
|
|
- name: Run the beacon chain sim that starts from an eth1 contract
|
|
|
|
run: cargo run --release --bin simulator eth1-sim
|
2022-07-18 23:15:40 +00:00
|
|
|
merge-transition-ubuntu:
|
|
|
|
name: merge-transition-ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-18 23:15:40 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-07-18 23:15:40 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
|
|
|
- name: Run the beacon chain sim and go through the merge transition
|
|
|
|
run: cargo run --release --bin simulator eth1-sim --post-merge
|
2020-03-30 05:42:03 +00:00
|
|
|
no-eth1-simulator-ubuntu:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: no-eth1-simulator-ubuntu
|
2020-03-30 05:42:03 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-20 22:48:14 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
2020-03-30 05:42:03 +00:00
|
|
|
- name: Run the beacon chain sim without an eth1 connection
|
|
|
|
run: cargo run --release --bin simulator no-eth1-sim
|
2020-12-16 05:37:38 +00:00
|
|
|
syncing-simulator-ubuntu:
|
|
|
|
name: syncing-simulator-ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
|
|
|
- name: Run the syncing simulator
|
|
|
|
run: cargo run --release --bin simulator syncing-sim
|
2021-07-31 03:50:52 +00:00
|
|
|
doppelganger-protection-test:
|
2022-09-29 01:50:11 +00:00
|
|
|
name: doppelganger-protection-test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install ganache
|
|
|
|
run: sudo npm install -g ganache
|
|
|
|
- name: Install lighthouse and lcli
|
|
|
|
run: |
|
|
|
|
make
|
|
|
|
make install-lcli
|
|
|
|
- name: Run the doppelganger protection success test script
|
|
|
|
run: |
|
|
|
|
cd scripts/tests
|
|
|
|
./doppelganger_protection.sh success
|
|
|
|
- name: Run the doppelganger protection failure test script
|
|
|
|
run: |
|
|
|
|
cd scripts/tests
|
|
|
|
./doppelganger_protection.sh failure
|
2022-02-17 21:47:06 +00:00
|
|
|
execution-engine-integration-ubuntu:
|
|
|
|
name: execution-engine-integration-ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
2022-03-03 02:10:57 +00:00
|
|
|
with:
|
2023-02-16 23:34:33 +00:00
|
|
|
go-version: '1.20'
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/setup-dotnet@v3
|
2022-03-24 00:04:48 +00:00
|
|
|
with:
|
|
|
|
dotnet-version: '6.0.201'
|
2022-02-17 21:47:06 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-17 21:47:06 +00:00
|
|
|
- name: Run exec engine integration tests in release
|
|
|
|
run: make test-exec-engine
|
2020-04-06 10:16:08 +00:00
|
|
|
check-benchmarks:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: check-benchmarks
|
2020-04-06 10:16:08 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2020-04-06 10:16:08 +00:00
|
|
|
- name: Typecheck benchmark code without running it
|
|
|
|
run: make check-benches
|
2020-04-20 02:35:11 +00:00
|
|
|
clippy:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: clippy
|
2020-04-20 02:35:11 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2020-04-20 02:35:11 +00:00
|
|
|
- name: Lint code for quality and style with Clippy
|
|
|
|
run: make lint
|
2020-08-26 00:01:08 +00:00
|
|
|
- name: Certify Cargo.lock freshness
|
|
|
|
run: git diff --exit-code Cargo.lock
|
2022-03-17 03:33:29 +00:00
|
|
|
check-msrv:
|
|
|
|
name: check-msrv
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [cargo-fmt, extract-msrv]
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-17 03:33:29 +00:00
|
|
|
- name: Install Rust @ MSRV (${{ needs.extract-msrv.outputs.MSRV }})
|
|
|
|
run: rustup override set ${{ needs.extract-msrv.outputs.MSRV }}
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-17 03:33:29 +00:00
|
|
|
- name: Run cargo check
|
|
|
|
run: cargo check --workspace
|
2020-05-05 23:12:28 +00:00
|
|
|
arbitrary-check:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: arbitrary-check
|
2020-07-07 06:31:20 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2020-07-07 06:31:20 +00:00
|
|
|
- name: Validate state_processing feature arbitrary-fuzz
|
|
|
|
run: make arbitrary-fuzz
|
2020-05-26 07:04:39 +00:00
|
|
|
cargo-audit:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: cargo-audit
|
2020-07-07 06:31:20 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-15 00:09:12 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2020-07-07 06:31:20 +00:00
|
|
|
- name: Run cargo audit to identify known security vulnerabilities reported to the RustSec Advisory Database
|
|
|
|
run: make audit
|
2021-11-05 04:42:12 +00:00
|
|
|
cargo-vendor:
|
|
|
|
name: cargo-vendor
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-05 04:42:12 +00:00
|
|
|
- name: Run cargo vendor to make sure dependencies can be vendored for packaging, reproducibility and archival purpose
|
|
|
|
run: CARGO_HOME=$(readlink -f $HOME) make vendor
|
2020-06-14 00:59:50 +00:00
|
|
|
cargo-udeps:
|
2020-07-07 13:44:35 +00:00
|
|
|
name: cargo-udeps
|
2020-07-07 06:31:20 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: cargo-fmt
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-04 00:00:51 +00:00
|
|
|
- name: Install Rust (${{ env.PINNED_NIGHTLY }})
|
|
|
|
run: rustup toolchain install $PINNED_NIGHTLY
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-11-13 22:40:44 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2020-07-07 06:31:20 +00:00
|
|
|
- name: Install cargo-udeps
|
2023-01-20 04:19:29 +00:00
|
|
|
run: cargo install cargo-udeps --locked --force
|
2021-06-18 05:58:01 +00:00
|
|
|
- name: Create Cargo config dir
|
|
|
|
run: mkdir -p .cargo
|
|
|
|
- name: Install custom Cargo config
|
|
|
|
run: cp -f .github/custom/config.toml .cargo/config.toml
|
2020-07-07 06:31:20 +00:00
|
|
|
- name: Run cargo udeps to identify unused crates in the dependency graph
|
|
|
|
run: make udeps
|
2020-07-21 05:51:33 +00:00
|
|
|
env:
|
|
|
|
# Allow warnings on Nightly
|
|
|
|
RUSTFLAGS: ""
|
2022-11-15 05:21:36 +00:00
|
|
|
compile-with-beta-compiler:
|
|
|
|
name: compile-with-beta-compiler
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang protobuf-compiler
|
|
|
|
- name: Use Rust beta
|
|
|
|
run: rustup override set beta
|
|
|
|
- name: Run make
|
|
|
|
run: make
|