Skip to content

Commit

Permalink
Make Narwhal work together with Sui in the same repo:
Browse files Browse the repository at this point in the history
- Fix Narwhal workspace-hack.
- Fix Sui's dependency on Narwhal.
- Fix Narwhal dependency on mysten-infra
- Fix generate-format binary name collision.
- Disable Narwhal rustfmt.
- Disable lint checks that do not work with Narwhal.
- Add CI step for Narwhal. Fix enabling unsupport feature for Narwhal
  (e.g. dhat-heap).
- Disable simtest which is broken (confirmed with @mystenmark).
  • Loading branch information
mwtian committed Sep 30, 2022
1 parent a9fa587 commit 188d757
Show file tree
Hide file tree
Showing 57 changed files with 566 additions and 671 deletions.
8 changes: 7 additions & 1 deletion .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ outputs:
description: True when changes happened to some documentation
value: "${{ steps.diff.outputs.isDoc }}"
isRust:
description: True when changes happened to the rust code
description: True when changes happened to the Rust code
value: "${{ steps.diff.outputs.isRust }}"
isNarwhal:
description: True when changes happened to the Narwhal code
value: "${{ steps.diff.outputs.isNarwhal }}"
runs:
using: composite
steps:
Expand All @@ -18,10 +21,13 @@ runs:
filters: |
isRust:
- 'crates/**'
- 'narwhal/**'
- '.github/workflows/bench.yml'
- '.github/workflows/codecov.yml'
- '.github/workflows/rust.yml'
isDoc:
- 'doc/**'
- '*.md'
- '.github/workflows/docs.yml'
isNarwhal:
- 'narwhal/**'
32 changes: 30 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
runs-on: [ubuntu-latest]
outputs:
isRust: ${{ steps.diff.outputs.isRust }}
isNarwhal: ${{ steps.diff.outputs.isNarwhal }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
Expand Down Expand Up @@ -73,10 +74,36 @@ jobs:
- uses: taiki-e/install-action@nextest
- name: cargo test
run: |
cargo nextest run --all-features --profile ci
cargo nextest run --profile ci -E 'not package(~narwhal)'
- name: Doctests
run: |
cargo test --doc --all-features
cargo test --doc
# Ensure there are no uncommitted changes in the repo after running tests
- run: scripts/changed-files.sh
shell: bash

test-narwhal:
needs: diff
if: needs.diff.outputs.isNarwhal == 'true'
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- [ubuntu-ghcloud]
fail-fast: false
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: taiki-e/install-action@nextest
- name: cargo test
run: |
cargo nextest run --features celo --profile ci -E 'package(~narwhal)'
- name: Doctests
run: |
cargo test --doc --features celo
# Ensure there are no uncommitted changes in the repo after running tests
- run: scripts/changed-files.sh
shell: bash
Expand Down Expand Up @@ -113,6 +140,7 @@ jobs:
- uses: actions-rs/toolchain@v1
- uses: taiki-e/install-action@nextest
- name: cargo simtest
# Disable simtest until building with Narwhal is fixed.
run: |
echo "Skipped"
# scripts/simtest/cargo-simtest simtest
Expand Down
Loading

0 comments on commit 188d757

Please sign in to comment.