This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Bump syn from 2.0.101 to 2.0.106 #739
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| # Make sure CI fails on all warnings, including Clippy lints | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| # This runs the pre-commit hooks defined in .pre-commit-config.yaml | |
| # TODO: figure out how to update to use pre-commit.ci | |
| - uses: pre-commit/action@v3.0.1 | |
| clippy_linting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install wasm32 target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Run Clippy (Native Workspace) | |
| run: cargo clippy --workspace --all-targets --all-features -- -Dclippy::all | |
| - name: Run Clippy (WASM Projects Workspace) | |
| run: | | |
| cd projects | |
| cargo clippy --workspace --target wasm32-unknown-unknown --all-features -- -Dclippy::all | |
| - name: Check WASM contract exports | |
| run: | | |
| # Check that all WASM projects export the required finish function | |
| find ./projects -type d -name "src" | while read -r src_dir; do | |
| dir=$(dirname "$src_dir") | |
| echo "🔧 Checking exports in $dir" | |
| if [[ -f "$src_dir/lib.rs" ]]; then | |
| grep -q "finish() -> i32" "$src_dir/lib.rs" || { | |
| echo "❌ Missing required finish() -> i32 export in $dir" | |
| exit 1 | |
| } | |
| else | |
| echo "❌ Missing lib.rs in $src_dir" | |
| exit 1 | |
| fi | |
| done | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Run fmt (Entire Workspace) | |
| run: cargo fmt --all -- --check | |
| # Note: This job should not be "required" for PRs, as during development there may be temporary | |
| # discrepancies between craft and rippled | |
| host_function_audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Audit host functions to ensure they match the XRPLd host functions | |
| run: node tools/compareHostFunctions.js https://github.com/XRPLF/rippled/tree/ripple/smart-escrow | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Add target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Build & Test Native Workspace | |
| run: | | |
| # Build and test the native workspace (fast!) | |
| cargo build --workspace | |
| cargo test --workspace | |
| - name: Build xrpl-std for WASM | |
| run: | | |
| cargo build -p xrpl-std --target wasm32-unknown-unknown | |
| cargo rustc -p xrpl-std --target wasm32-unknown-unknown -- -D warnings | |
| - name: Build WASM Projects Workspace | |
| run: | | |
| cd projects | |
| echo "🔧 Building projects workspace for WASM" | |
| cargo build --workspace --target wasm32-unknown-unknown | |
| cargo build --workspace --target wasm32-unknown-unknown --release | |
| - name: Install and run craft | |
| run: | | |
| cargo install --path craft --force | |
| find ./projects/examples -name "Cargo.toml" -type f | while read -r cargo_file; do | |
| dir=$(dirname "$cargo_file") | |
| contract_name=$(basename "$dir") | |
| if [ -d "$dir/fixtures" ]; then | |
| craft build $contract_name -r -O aggressive || exit 1 | |
| fi | |
| done | |
| run-markdown: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Run code in Markdown files | |
| run: | | |
| # Find all .md files and run code blocks | |
| find . -type d \( -name target -o -name node_modules \) -prune -false -o -name "*.md" -print | while read -r md_file; do | |
| echo "🔧 Running code blocks in $md_file" | |
| set -euo pipefail | |
| md_dir=$(dirname "$md_file") | |
| awk ' | |
| BEGIN { inblock=0 } | |
| /^```bash/ { inblock=1; next } | |
| /^```/ { if (inblock) inblock=0; next } | |
| inblock { print } | |
| ' "$md_file" | (cd "$md_dir" && bash) || { | |
| echo "❌ Bash code blocks in $md_file failed" | |
| exit 1 | |
| } | |
| echo "✅ Bash code blocks in $md_file succeeded" | |
| done | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| # needs: build_and_test | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Add target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Build | |
| run: | | |
| ./build.sh | |
| ./build.sh release | |
| - name: Run integration tests | |
| run: | | |
| find ./projects -name "Cargo.toml" -type f | while read -r cargo_file; do | |
| dir=$(dirname "$cargo_file") | |
| contract_name=$(basename "$dir") | |
| if [ -d "$dir/fixtures" ]; then | |
| cargo run --package wasm-host --bin wasm-host -- -p "$contract_name" --dir $dir || exit 1 | |
| fi | |
| done |