fix: add producer signature verification in P2P block sync (critical consensus fix) #59
Workflow file for this run
This file contains hidden or 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
| name: Rust CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'rustchain-wallet/**' | |
| - 'rips/**' | |
| - '.github/workflows/rust-ci.yml' | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - 'rustchain-wallet/**' | |
| - 'rips/**' | |
| - '.github/workflows/rust-ci.yml' | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: 'Specific package to build (optional)' | |
| required: false | |
| type: string | |
| no_cache: | |
| description: 'Disable cargo cache' | |
| required: false | |
| type: boolean | |
| default: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| RUSTFLAGS: '-D warnings' | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| working-directory: rustchain-wallet | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache cargo dependencies | |
| if: ${{ github.event.inputs.no_cache != 'true' }} | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: 'rustchain-wallet -> target' | |
| cache-on-failure: true | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| working-directory: rustchain-wallet | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo dependencies | |
| if: ${{ github.event.inputs.no_cache != 'true' }} | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: 'rustchain-wallet -> target' | |
| cache-on-failure: true | |
| - name: Run tests | |
| run: cargo test --all-features --verbose | |
| working-directory: rustchain-wallet | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: rustchain-wallet/target/debug/deps/*.pdb | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: [fmt, clippy, test] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo dependencies | |
| if: ${{ github.event.inputs.no_cache != 'true' }} | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: 'rustchain-wallet -> target' | |
| cache-on-failure: true | |
| - name: Build release | |
| run: cargo build --release --verbose | |
| working-directory: rustchain-wallet | |
| - name: Upload binary (Linux/macOS) | |
| if: matrix.os != 'windows-latest' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rtc-wallet-${{ matrix.os }} | |
| path: rustchain-wallet/target/release/rtc-wallet | |
| retention-days: 14 | |
| - name: Upload binary (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rtc-wallet-${{ matrix.os }} | |
| path: rustchain-wallet/target/release/rtc-wallet.exe | |
| retention-days: 14 | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo dependencies | |
| if: ${{ github.event.inputs.no_cache != 'true' }} | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: 'rustchain-wallet -> target' | |
| cache-on-failure: true | |
| - name: Build documentation | |
| run: cargo doc --all-features --no-deps | |
| working-directory: rustchain-wallet | |
| - name: Upload documentation | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rustchain-wallet-docs | |
| path: rustchain-wallet/target/doc | |
| retention-days: 30 | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run security audit | |
| run: cargo audit | |
| working-directory: rustchain-wallet | |
| continue-on-error: true |