diff --git a/.github/workflows/cov.yml b/.github/workflows/cov.yml new file mode 100644 index 0000000..592b9a5 --- /dev/null +++ b/.github/workflows/cov.yml @@ -0,0 +1,56 @@ +on: + push: + branches: + - main + paths: + - "src/**" + - "tests/**" + - "scripts/**" + - "proto/**" + + +name: Coverage + +jobs: + check: + name: Rust project + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Install Prerequisites + run: sh ./install.sh + + - name: Run cargo-tarpaulin + uses: actions-rs/tarpaulin@v0.1 + with: + version: '0.19.1' + args: '-- --test-threads 1' + + - name: Upload to codecov.io + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + + - name: Archive code coverage results + uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml new file mode 100644 index 0000000..f3c3c94 --- /dev/null +++ b/.github/workflows/fmt.yml @@ -0,0 +1,44 @@ +name: fmt + +on: + push: + branches: + - main + paths: + - "src/**" + - "tests/**" + - "scripts/**" + - "proto/**" + pull_request: + types: [ opened, synchronize ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + fmt: + runs-on: ubuntu-22.04 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Install Prerequisites + run: sh ./install.sh + + - name: add path + run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Run fmt check + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: Check function complexity + run: python3 -m lizard -l rust src/* -L 300 -a 10 + + - name: proto lint + run: cd proto && prototool lint . --config-data '{"lint":{"group":"google"}}' + + - name: python lint + run: cd scripts && python3 -m pylint --rcfile=.pylintrc *.py | tee | grep 10.00 diff --git a/README.md b/README.md index f3a28c5..60de29c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # mufuzz, a parallel fuzzing framework +[![build](https://github.com/OMH4ck/mufuzz/actions/workflows/main.yml/badge.svg)](https://github.com/Changochen/mufuzz/actions/workflows/main.yml) +[![codecov](https://codecov.io/gh/OMH4ck/mufuzz/branch/main/graph/badge.svg?token=S29YN47226)](https://codecov.io/gh/OMH4ck/mufuzz) +[![fmt](https://github.com/OMH4ck/mufuzz/actions/workflows/fmt.yml/badge.svg)](https://github.com/OMH4ck/mufuzz/actions/workflows/fmt.yml) + The orginal paper can be [here](https://changochen.github.io/publication/mufuzz_usenix_2023.pdf). ## Build