Skip to content

Commit

Permalink
bare bones of differential fuzzing and cleanup of commits from ethere…
Browse files Browse the repository at this point in the history
  • Loading branch information
satyamakgec committed May 26, 2021
1 parent ddd4f0a commit 94298fd
Show file tree
Hide file tree
Showing 233 changed files with 2,310 additions and 175 deletions.
250 changes: 124 additions & 126 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,169 +2,167 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
tags:
- v*

pull_request:
branches: [ master ]
branches: [master]

env:
CARGO_TERM_COLOR: always

jobs:

coverage:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install system dependencies
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: coverage with tarpaulin
run: |
cargo install cargo-tarpaulin
make coverage
bash <(curl -s https://codecov.io/bash)
- uses: actions/checkout@v2
- name: Install system dependencies
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: coverage with tarpaulin
run: |
cargo install cargo-tarpaulin
make coverage
bash <(curl -s https://codecov.io/bash)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install system dependencies
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Validate release notes entry
run: ./newsfragments/validate_files.py
- name: Lint with rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Lint with clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features -- -D warnings
- uses: actions/checkout@v2
- name: Install system dependencies
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Validate release notes entry
run: ./newsfragments/validate_files.py
- name: Lint with rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Lint with clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features -- -D warnings

test:
# Build & Test runs on all platforms
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macOS-latest
- os: ubuntu-latest
- os: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install Mac System dependencies
if: startsWith(matrix.os,'macOS')
run: |
brew install boost
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test --workspace --features solc-backend --verbose

wasm-test:
runs-on: ubuntu-latest
container: davesque/rust-wasm
steps:
- uses: actions/checkout@v2
- name: Cache Rust dependencies
uses: actions/cache@v1.1.2
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install Mac System dependencies
if: startsWith(matrix.os,'macOS')
run: |
brew install boost
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run WASM tests
run: wasm-pack test --node -- --workspace
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test --workspace --features solc-backend --verbose

# wasm-test:
# runs-on: ubuntu-latest
# container: davesque/rust-wasm
# steps:
# - uses: actions/checkout@v2
# - name: Install rust
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# - name: Run WASM tests
# run: wasm-pack test --node -- --workspace

release:
# Only run this when we push a tag
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
needs: [lint, test, wasm-test]
strategy:
matrix:
include:
# Only run this when we push a tag
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
# needs: [lint, test, wasm-test]
needs: [lint, test]
strategy:
matrix:
include:
- os: ubuntu-latest
BIN_FILE: fe_amd64
- os: macOS-latest
BIN_FILE: fe_mac

steps:
- uses: actions/checkout@v2
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Install Mac System dependencies
if: startsWith(matrix.os,'macOS')
run: |
brew install boost
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build
run: cargo build --all-features --release && strip target/release/fe && mv target/release/fe target/release/${{ matrix.BIN_FILE }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/release/${{ matrix.BIN_FILE }}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
"${GITHUB_WORKSPACE}/.github/install_deps.sh"
- name: Install Mac System dependencies
if: startsWith(matrix.os,'macOS')
run: |
brew install boost
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build
run: cargo build --all-features --release && strip target/release/fe && mv target/release/fe target/release/${{ matrix.BIN_FILE }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/release/${{ matrix.BIN_FILE }}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
[package]
name = "fe"
version = "0.4.0-alpha"
authors = ["David Sanders <david@ethereum.org>"]
edition = "2018"
license = "Apache-2.0"
repository = "https://github.com/ethereum/fe"
categories = ["cryptography::cryptocurrencies", "command-line-utilities", "development-tools"]
description = "An implementation of the Fe smart contract language"
edition = "2018"
keywords = ["ethereum", "fe", "yul", "smart", "contract", "compiler"]
categories = ["cryptography::cryptocurrencies", "command-line-utilities", "development-tools"]
license = "Apache-2.0"
name = "fe"
readme = "README.md"
repository = "https://github.com/ethereum/fe"
version = "0.4.0-alpha"

[workspace]
members = [".", "parser", "compiler"]
members = [".", "parser", "compiler", "tests"]

[features]
solc-backend = ["fe-compiler/solc-backend"]
solc-backend = ["fe-compiler/solc-backend", "fe-compiler-tests/solc-backend"]

[dependencies]
clap = "2.33.3"
fe-common = {path = "common", version = "^0.4.0-alpha"}
fe-parser = {path = "parser", version = "^0.4.0-alpha"}
fe-compiler = {path = "compiler", version = "^0.4.0-alpha"}
clap = "2.33.3"
fe-compiler-tests = {path = "tests", features = ["solc-backend"], version = "^0.4.0-alpha"}
fe-parser = {path = "parser", version = "^0.4.0-alpha"}

[dev-dependencies]
cargo-release = "0.13.9"
Expand Down

0 comments on commit 94298fd

Please sign in to comment.