fix: WASM Windows build and PHP 8.5 mock type mismatch #991
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 Validate | |
| on: | |
| workflow_run: | |
| workflows: ["Publish Release"] | |
| types: [completed] | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'crates/kreuzberg/**' | |
| - 'crates/kreuzberg-cli/**' | |
| - 'crates/kreuzberg-py/**' | |
| - 'crates/kreuzberg-node/**' | |
| - 'crates/kreuzberg-ffi/**' | |
| - 'crates/kreuzberg-tesseract/**' | |
| - 'crates/kreuzberg-paddle-ocr/**' | |
| - 'crates/kreuzberg-wasm/**' | |
| - 'packages/python/**' | |
| - 'packages/typescript/**' | |
| - 'packages/ruby/**' | |
| - 'packages/r/**' | |
| - 'e2e/r/**' | |
| - 'packages/java/**' | |
| - 'packages/go/v4/**' | |
| - 'packages/csharp/**' | |
| - 'packages/wasm/**' | |
| - 'tools/benchmark-harness/**' | |
| - 'tools/e2e-generator/**' | |
| - 'tools/snippet-runner/**' | |
| - 'scripts/**' | |
| - 'docs/snippets/**' | |
| - 'docs/reference/**' | |
| - '.github/actions/**' | |
| - '.cargo/config.toml' | |
| - '.pre-commit-config.yaml' | |
| - '.golangci.yml' | |
| - 'pyproject.toml' | |
| - 'pnpm-lock.yaml' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/ci-validate.yaml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'crates/kreuzberg/**' | |
| - 'crates/kreuzberg-cli/**' | |
| - 'crates/kreuzberg-py/**' | |
| - 'crates/kreuzberg-node/**' | |
| - 'crates/kreuzberg-ffi/**' | |
| - 'crates/kreuzberg-tesseract/**' | |
| - 'crates/kreuzberg-paddle-ocr/**' | |
| - 'crates/kreuzberg-wasm/**' | |
| - 'packages/python/**' | |
| - 'packages/typescript/**' | |
| - 'packages/ruby/**' | |
| - 'packages/r/**' | |
| - 'e2e/r/**' | |
| - 'packages/java/**' | |
| - 'packages/go/v4/**' | |
| - 'packages/csharp/**' | |
| - 'packages/wasm/**' | |
| - 'tools/benchmark-harness/**' | |
| - 'tools/e2e-generator/**' | |
| - 'tools/snippet-runner/**' | |
| - 'scripts/**' | |
| - 'docs/snippets/**' | |
| - 'docs/reference/**' | |
| - '.github/actions/**' | |
| - '.cargo/config.toml' | |
| - '.pre-commit-config.yaml' | |
| - '.golangci.yml' | |
| - 'pyproject.toml' | |
| - 'pnpm-lock.yaml' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/ci-validate.yaml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-validate-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_PROFILE_DEV_DEBUG: 0 | |
| RUST_BACKTRACE: short | |
| RUST_MIN_STACK: 16777216 | |
| PDFIUM_VERSION: "7678" | |
| PDFIUM_STATIC_VERSION: "7678" | |
| ORT_VERSION: "1.24.1" | |
| MACOSX_DEPLOYMENT_TARGET: "14.0" | |
| BUILD_PROFILE: "ci" | |
| jobs: | |
| validate: | |
| name: Validate (Lint & Format) | |
| if: github.repository == 'kreuzberg-dev/kreuzberg' && github.actor != 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show initial disk space | |
| run: scripts/ci/validate/show-disk-space.sh "Initial disk space" | |
| shell: bash | |
| - name: Free disk space before setup | |
| uses: ./.github/actions/free-disk-space-linux | |
| with: | |
| show-initial: "false" | |
| show-final: "true" | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key-prefix: validate | |
| - name: Setup OpenSSL | |
| uses: ./.github/actions/setup-openssl | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: "3.13" | |
| cache-prefix: validate | |
| - name: Setup Node | |
| uses: ./.github/actions/setup-node-workspace | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| working-directory: packages/ruby | |
| env: | |
| BUNDLE_LOCKFILE_CHECKSUMS: "false" | |
| - name: Install E2E Ruby dependencies | |
| run: cd e2e/ruby && bundle install | |
| shell: bash | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.3' | |
| - name: Install R dependencies | |
| run: | | |
| Rscript -e "install.packages(c('styler', 'lintr', 'testthat', 'jsonlite', 'withr'), repos = 'https://cloud.r-project.org')" | |
| shell: bash | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| id: setup-java | |
| with: | |
| distribution: 'temurin' | |
| java-version: '24' | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| cache-dependency-path: packages/go/go.sum | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| tools: composer | |
| - name: Install PHP dependencies | |
| run: | | |
| cd packages/php | |
| composer install | |
| shell: bash | |
| - name: Setup Elixir | |
| uses: erlef/setup-elixir@v1 | |
| with: | |
| elixir-version: '1.17' | |
| otp-version: '27.2' | |
| version-type: strict | |
| - name: Install Elixir dependencies | |
| run: | | |
| cd packages/elixir | |
| mix deps.get | |
| shell: bash | |
| - name: Check disk space before tool installations | |
| run: scripts/ci/validate/show-disk-space.sh "Disk space before tool installations" | |
| shell: bash | |
| - name: Install Task | |
| uses: ./.github/actions/install-task | |
| - name: Install golangci-lint | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.9.0 | |
| echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | |
| shell: bash | |
| - name: Install wasm-pack | |
| run: scripts/ci/wasm/install-wasm-pack.sh | |
| shell: bash | |
| - name: Install WASI SDK | |
| uses: ./.github/actions/install-wasi-sdk | |
| - name: Check disk space before lint | |
| run: scripts/ci/validate/show-disk-space.sh "Disk space before lint" | |
| shell: bash | |
| - name: Install C/C++ tools | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y --no-install-recommends cppcheck clang-format | |
| - name: Run prek hooks | |
| uses: j178/prek-action@v1.1.1 | |
| with: | |
| extra-args: --all-files | |
| - name: Build snippet-runner | |
| run: cargo build --release -p snippet-runner | |
| - name: Validate documentation snippets | |
| run: ./target/release/snippet-runner validate --snippets docs/snippets --reference docs/reference --level syntax --timeout 120 | |
| - name: Verify API Parity | |
| run: python scripts/verify_api_parity.py | |
| - name: Check final disk space | |
| if: always() | |
| run: scripts/ci/validate/show-disk-space.sh "Final disk space" | |
| shell: bash | |
| - name: Cleanup build artifacts after lint | |
| if: always() | |
| run: scripts/ci/validate/cleanup-after-lint.sh | |
| shell: bash |