fix(ledger): minFeeRefScriptCostPerByte u64->Rational — byte-exact No… #1929
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install protoc | |
| # dugite-rpc's build.rs invokes tonic-build → prost-build → protoc to | |
| # codegen the vendored utxorpc/spec proto files. See issue #672. | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Build | |
| run: cargo build --all-targets | |
| - name: Guard against pallas-network re-entry | |
| run: | | |
| if cargo tree --workspace --prefix none 2>/dev/null | grep -qi '^pallas-network '; then | |
| echo "::error::pallas-network is in the dependency tree; it was removed and must stay removed." | |
| cargo tree --workspace -i pallas-network || true | |
| exit 1 | |
| fi | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Run all tests (unit, property, conformance, golden) | |
| run: cargo nextest run --workspace --profile ci | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: target/nextest/ci/junit.xml | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| upstream-conformance: | |
| name: Upstream conformance (UPLC + golden decode) | |
| runs-on: ubuntu-latest | |
| # The corpus is pinned via tests/conformance/upstream/manifest.toml. | |
| # Updating the pin: edit sources.toml, trigger regenerate-conformance-corpus | |
| # workflow, bump manifest.toml tag, and refresh conformance_skip.txt. | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-conformance-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-conformance- | |
| ${{ runner.os }}-cargo- | |
| - name: Cache upstream conformance fixtures | |
| uses: actions/cache@v5 | |
| with: | |
| path: tests/conformance/upstream/fixtures | |
| key: upstream-fixtures-${{ hashFiles('tests/conformance/upstream/manifest.toml') }} | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Download upstream conformance fixtures | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: cargo xtask download-upstream-fixtures | |
| - name: Run the full UPLC evaluation conformance suite | |
| env: | |
| DUGITE_REQUIRE_UPSTREAM: "1" | |
| run: cargo nextest run -p dugite-uplc --features conformance --test conformance --profile ci | |
| - name: Run upstream golden decode tests | |
| env: | |
| DUGITE_REQUIRE_UPSTREAM: "1" | |
| run: cargo nextest run -p dugite-conformance --features upstream-conformance --test upstream_tests --profile ci | |
| - name: Upload conformance test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: target/nextest/ci/junit.xml | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-coverage-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-coverage- | |
| - name: Cache upstream conformance fixtures | |
| uses: actions/cache@v5 | |
| with: | |
| path: tests/conformance/upstream/fixtures | |
| key: upstream-fixtures-${{ hashFiles('tests/conformance/upstream/manifest.toml') }} | |
| - name: Download upstream conformance fixtures | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: cargo xtask download-upstream-fixtures | |
| # Run the conformance suite alongside the rest of the workspace so the | |
| # lines it covers in `dugite-crypto` (v13 VRF), `dugite-uplc` (builtins, | |
| # populate paths) and `dugite-serialization` (era CBOR decoders) count | |
| # toward the reported numbers — they're real tests, just gated on | |
| # upstream fixtures. `--exclude-from-report` keeps the conformance crate | |
| # itself out of the percentage (it is pure test scaffolding). | |
| # | |
| # Pure binary entrypoints and the ratatui TUI render layers are excluded | |
| # via `--ignore-filename-regex` because they aren't reachable from | |
| # `cargo test` and dragging them through the denominator distorts the | |
| # picture without representing real risk. | |
| - name: Generate code coverage | |
| env: | |
| DUGITE_REQUIRE_UPSTREAM: "1" | |
| run: | | |
| cargo llvm-cov \ | |
| --all-features \ | |
| --workspace \ | |
| --exclude dugite-integration-tests \ | |
| --exclude-from-report dugite-conformance \ | |
| --ignore-filename-regex '(src/main\.rs|/ui\.rs|/bin/capture_)' \ | |
| --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| integration-offline: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build binaries | |
| run: cargo build --release -p dugite-cli -p dugite-node | |
| - name: Run offline integration tests | |
| run: cargo test -p dugite-integration-tests -- tier0 | |
| release-binaries: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: [build-and-test, integration-offline] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| artifact: dugite-linux-x86_64 | |
| # Use the native aarch64 runner instead of cross-compiling: the | |
| # bundled gmp-mpfr-sys (via mithril-stm → rug) cannot cross-build | |
| # its arch-specific assembly across host architectures. | |
| - os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| artifact: dugite-linux-aarch64 | |
| # x86_64-apple-darwin is dropped: GitHub macOS runners are aarch64-only | |
| # and bundled GMP cannot cross-compile under Apple Silicon clang. | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact: dugite-macos-aarch64 | |
| # Windows disabled: fs2 file locking behaves differently on MSVC. | |
| # Re-enable when dugite-lsm session_lock.rs is ported to Windows. | |
| # - os: windows-latest | |
| # target: x86_64-pc-windows-msvc | |
| # artifact: dugite-windows-x86_64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install protoc (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install protoc (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install protobuf | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.target }}-cargo- | |
| - name: Build release binaries | |
| run: cargo build --release --target ${{ matrix.target }} -p dugite-node -p dugite-cli | |
| - name: Package binaries | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/dugite-node dist/ 2>/dev/null || true | |
| cp target/${{ matrix.target }}/release/dugite-cli dist/ 2>/dev/null || true | |
| tar -czf ${{ matrix.artifact }}.tar.gz -C dist . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.tar.gz | |
| retention-days: 30 |