This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #623 from OffchainLabs/develop
Version Number and Branch Organization
- Loading branch information
Showing
248 changed files
with
57,953 additions
and
16,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: -Dwarnings | ||
|
||
jobs: | ||
rustfmt: | ||
name: Rust formatting check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
test: | ||
name: Test with ${{ matrix.rust }} rust on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
rust: [stable, nightly] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y \ | ||
libasound2-dev libudev-dev build-essential pkg-config libssl-dev | ||
- name: Install rust ${{ matrix.rust }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: ${{ matrix.rust == 'nightly' && 'llvm-tools-preview' || '' }} | ||
|
||
- name: Install grcov if supported for rust ${{ matrix.rust }} | ||
uses: actions-rs/[email protected] | ||
if: matrix.rust == 'nightly' | ||
with: | ||
crate: grcov | ||
version: latest | ||
use-tool-cache: true | ||
|
||
- name: Cache rust build products | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ matrix.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ matrix.os }}-cargo-${{ matrix.rust }}- | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --all | ||
|
||
- name: Set up code-coverage instrumentation if supported for rust ${{ matrix.rust }} | ||
if: matrix.rust == 'nightly' | ||
run: | | ||
echo LLVM_PROFILE_FILE="your_name-%p-%m.profraw" >> $GITHUB_ENV | ||
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV | ||
echo RUSTFLAGS="-Zinstrument-coverage" >> $GITHUB_ENV | ||
echo RUSTDOCFLAGS="-Cpanic=abort" >> $GITHUB_ENV | ||
- name: Install npm dependencies | ||
run: | | ||
sudo npm install -g yarn && cd contracts && yarn install | ||
- name: Make and test ArbOS | ||
run: make clean && make -j ci compile_options="-w" | ||
|
||
- name: Check if ArbOS or replayTests changed | ||
run: git update-index --refresh && git diff-index HEAD -- | ||
|
||
- name: Create code-coverage files if supported for rust ${{ matrix.rust }} | ||
if: matrix.rust == 'nightly' | ||
run: | | ||
grcov . --binary-path ./target/release/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v1 | ||
if: matrix.rust == 'nightly' | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./lcov.info,./lcov-mini.info | ||
fail_ci_if_error: true | ||
verbose: false | ||
|
||
node: | ||
name: Node integration test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo add-apt-repository -y ppa:longsleep/golang-backports | ||
sudo apt-get update && sudo apt-get install -y \ | ||
autoconf automake cmake libboost-dev libboost-filesystem-dev libgmp-dev \ | ||
librocksdb-dev libssl-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev \ | ||
liblz4-dev libzstd-dev libtool golang-go clang-format cmake | ||
sudo apt-get install librocksdb-dev | ||
# | ||
# If apt's rocksdb is ever out of date, we'll need to use the following | ||
# git clone -b v6.11.4 https://github.com/facebook/rocksdb | ||
# cd rocksdb && make shared_lib && sudo make install | ||
# | ||
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.7.0/gotestsum_1.7.0_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum | ||
- name: Clone Arbitrum | ||
run: | | ||
git clone --recursive https://github.com/OffchainLabs/arbitrum.git | ||
cd arbitrum && git submodule update --init --recursive | ||
- name: Copy over this branch's ArbOS | ||
run: | | ||
rm -r arbitrum/packages/arb-os/* | ||
# We'd need `make testlogs` to generate these files | ||
# cp -r testlogs/* arbitrum/packages/arb-avm-cpp/tests/arbos-cases/ | ||
mv * arbitrum/packages/arb-os/ || true | ||
- name: Build Arbitrum | ||
run: | | ||
mkdir arbitrum/packages/arb-avm-cpp/debug/ | ||
cd $_ | ||
cmake .. -DCMAKE_BUILD_TYPE=Debug | ||
make -j | ||
- name: Test Node's C++ Database | ||
run: | | ||
./arbitrum/packages/arb-avm-cpp/build/bin/avm_tests | ||
- name: Test Node's Core | ||
run: | | ||
cd arbitrum/packages/arb-node-core/ | ||
gotestsum --format testname | tee issues | grep FAIL | ||
- name: Test Node's RPC | ||
run: | | ||
cd arbitrum/packages/arb-rpc-node/ | ||
gotestsum --format testname | tee issues | grep FAIL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "evm-tests/tests"] | ||
path = evm-tests/tests | ||
url = https://github.com/ethereum/tests.git |
Oops, something went wrong.