docs: enhance documentation formatting for clarity in extract_struct_… #1491
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: | |
| - "**" | |
| tags-ignore: | |
| - "**" # Don't run twice on commits with tags | |
| paths-ignore: | |
| - "docker/**" | |
| - "**.Dockerfile" | |
| - "**.md" | |
| pull_request: | |
| schedule: | |
| - cron: "15 6 * * 2" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # ============================================================================ | |
| # Markdown Lint | |
| # ============================================================================ | |
| markdown-lint: | |
| name: "Markdown Lint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run markdownlint | |
| uses: DavidAnson/markdownlint-cli2-action@v23 | |
| with: | |
| globs: | | |
| **/*.md | |
| #node_modules | |
| #versatiles_node/node_modules | |
| #target | |
| # ============================================================================ | |
| # Linux: Format | |
| # ============================================================================ | |
| linux-format: | |
| name: "Linux: Format" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check format | |
| run: cargo fmt -- --check | |
| # ============================================================================ | |
| # Linux: Docs | |
| # ============================================================================ | |
| linux-docs: | |
| name: "Linux: Docs" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup GDAL | |
| uses: ./.github/actions/setup-gdal | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "linux-docs" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Build docs | |
| run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps | |
| # ============================================================================ | |
| # Linux: Node.js | |
| # ============================================================================ | |
| linux-nodejs: | |
| name: "Linux: Node.js" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup GDAL | |
| uses: ./.github/actions/setup-gdal | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "linux-nodejs" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: versatiles_node/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./versatiles_node | |
| run: npm install | |
| - name: Build | |
| working-directory: ./versatiles_node | |
| run: npm run build | |
| - name: Typecheck | |
| working-directory: ./versatiles_node | |
| run: npm run typecheck | |
| - name: Lint | |
| working-directory: ./versatiles_node | |
| run: npm run lint | |
| - name: Check format | |
| working-directory: ./versatiles_node | |
| run: npm run format:check | |
| - name: Test | |
| working-directory: ./versatiles_node | |
| run: npm run test | |
| - name: Test examples | |
| working-directory: ./versatiles_node | |
| run: npm run test:examples | |
| # ============================================================================ | |
| # Linux: Coverage | |
| # ============================================================================ | |
| linux-coverage: | |
| name: "Linux: Coverage" | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'schedule' || | |
| github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'push' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup GDAL | |
| uses: ./.github/actions/setup-gdal | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "linux-coverage" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate coverage | |
| # Skip e2e tests (test functions prefixed with e2e_) during coverage | |
| run: cargo llvm-cov test --workspace --all-features --tests --lcov --output-path ./lcov.info -- --skip e2e_ | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: ./lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| # ============================================================================ | |
| # Linux: Feature Matrix | |
| # ============================================================================ | |
| linux-feature-matrix: | |
| name: "Linux: Features (${{ matrix.name }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: "default" | |
| features: "" | |
| run-tests: true | |
| - name: "no-default" | |
| features: "--no-default-features" | |
| - name: "cli-only" | |
| features: "--no-default-features --features cli" | |
| - name: "server-only" | |
| features: "--no-default-features --features server" | |
| - name: "gdal" | |
| features: "--features gdal" | |
| needs-gdal: true | |
| run-tests: true | |
| - name: "all-features" | |
| features: "--all-features" | |
| needs-gdal: true | |
| run-clippy: true | |
| run-tests: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup GDAL | |
| if: matrix.needs-gdal | |
| uses: ./.github/actions/setup-gdal | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "linux-feature-${{ matrix.name }}" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Check compilation | |
| if: ${{ !matrix.run-tests }} | |
| run: cargo check --workspace --all-targets ${{ matrix.features }} | |
| - name: Clippy | |
| if: matrix.run-clippy | |
| run: cargo clippy --workspace --all-targets ${{ matrix.features }} -- -D warnings | |
| - name: Run tests | |
| if: matrix.run-tests | |
| run: cargo test --workspace ${{ matrix.features }} | |
| # ============================================================================ | |
| # Windows: Test | |
| # ============================================================================ | |
| windows-test: | |
| name: "Windows: Test" | |
| runs-on: windows-latest | |
| env: | |
| RUSTFLAGS: "-C link-arg=-fuse-ld=lld" | |
| steps: | |
| - name: Configure Git | |
| shell: bash | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "windows-test" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Check no-default-features | |
| run: cargo check --workspace --no-default-features | |
| # ============================================================================ | |
| # Windows: Node.js | |
| # ============================================================================ | |
| windows-nodejs: | |
| name: "Windows: Node.js" | |
| runs-on: windows-latest | |
| steps: | |
| - name: Configure Git | |
| shell: bash | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "windows-nodejs" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: versatiles_node/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./versatiles_node | |
| run: npm install | |
| - name: Build | |
| working-directory: ./versatiles_node | |
| run: npm run build:debug | |
| - name: Typecheck | |
| working-directory: ./versatiles_node | |
| run: npm run typecheck | |
| - name: Lint | |
| working-directory: ./versatiles_node | |
| run: npm run lint | |
| - name: Check format | |
| working-directory: ./versatiles_node | |
| run: npm run format:check | |
| - name: Test | |
| working-directory: ./versatiles_node | |
| run: npm run test | |
| - name: Test examples | |
| working-directory: ./versatiles_node | |
| run: npm run test:examples | |
| # ============================================================================ | |
| # Windows ARM: Test | |
| # ============================================================================ | |
| windows-arm-test: | |
| name: "Windows ARM: Test" | |
| runs-on: windows-11-arm | |
| steps: | |
| - name: Configure Git | |
| shell: bash | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "windows-arm-test" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Test | |
| run: cargo test --workspace | |
| # ============================================================================ | |
| # macOS: GDAL | |
| # ============================================================================ | |
| macos-gdal: | |
| name: "macOS: GDAL" | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup GDAL | |
| uses: ./.github/actions/setup-gdal | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "macos-gdal" | |
| cache-targets: true | |
| cache-on-failure: false | |
| - name: Test with GDAL | |
| run: cargo test --workspace --features gdal | |
| # ============================================================================ | |
| # CI Success - Summary job | |
| # ============================================================================ | |
| ci-success: | |
| name: "CI Success" | |
| runs-on: ubuntu-latest | |
| needs: | |
| - linux-coverage | |
| - linux-docs | |
| - linux-feature-matrix | |
| - linux-format | |
| - linux-nodejs | |
| - macos-gdal | |
| - markdown-lint | |
| - windows-arm-test | |
| - windows-nodejs | |
| - windows-test | |
| if: always() | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "::error::Some jobs failed or were cancelled" | |
| exit 1 | |
| fi | |
| echo "All CI jobs passed successfully!" |