Skip to content
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

Add logic to disable lint checks and build diem-forge package #28

Merged
Merged
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
# TODO: check if we need all the packages below -- this list comes from the Libra build setup script
packages: build-essential lld pkg-config libssl-dev libgmp-dev clang
version: 1.0 # This is a cache key -- change it when you change the package list above
- name: Run cargo build
- name: Run cargo build for default packages
run: cargo build

- name: Run cargo build for diem-forge package
run: cargo build -p diem-forge
11 changes: 8 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
ENABLE_RUSTFMT: False
ENABLE_CLIPPY: False

jobs:
lint-checks:
Expand Down Expand Up @@ -46,12 +47,16 @@ jobs:
# TODO: check if we need all the packages below -- this list comes from the Libra build setup script
packages: build-essential lld pkg-config libssl-dev libgmp-dev clang
version: 1.0 # This is a cache key -- change it when you change the package list above
- name: Run cargo fmt
- name: Run cargo fmt on default packages
if: env.ENABLE_RUSTFMT == 'True'
# Note the hacky +nightly below
run: cargo +nightly fmt --all -- --check
- name: Run cargo fmt
- name: Skip cargo fmt on default packages
if: env.ENABLE_RUSTFMT != 'True'
run: echo "cargo fmt skipped due to project code not complying with current format rules"
- name: Run cargo clippy
- name: Run cargo clippy on default packages
if: env.ENABLE_CLIPPY == 'True'
run: cargo clippy --workspace --tests -- -D warnings
- name: Skip cargo clippy on default packages
if: env.ENABLE_CLIPPY != 'True'
run: echo "cargo fmt skipped due to project code not complying with current clippy rules"