docs: Update projects #87
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
| # SPDX-FileCopyrightText: 2026 The RISE Project | |
| # SPDX-License-Identifier: MIT | |
| --- | |
| # This workflow is based on: https://github.com/PostHog/posthog/blob/master/.github/workflows/build-hogql-parser-rs.yml | |
| name: Build hogql-parser-rs wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/hogql-parser-rs.yaml not released yet' | |
| required: false | |
| default: '' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-hogql-parser-rs.yml' | |
| - 'docs/packages/hogql-parser-rs.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-hogql-parser-rs.yml' | |
| - 'docs/packages/hogql-parser-rs.yaml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| env: | |
| # PostHog/posthog never tags this crate; pin the commit that bumped | |
| # Cargo.toml/pyproject.toml to 1.3.109 (matches the PyPI sdist, and current | |
| # master). Update alongside HOGQL_PARSER_RS_VERSION. | |
| HOGQL_PARSER_RS_REF: c30d2736928729ea424b08003c9cea2006b7606b | |
| MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 | |
| jobs: | |
| setup: | |
| uses: $/.github/workflows/_setup.yml | |
| with: | |
| package: hogql-parser-rs | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| name: Build hogql-parser-rs ${{ matrix.version }} cp312-abi3-manylinux_riscv64 | |
| runs-on: ubuntu-24.04-riscv | |
| timeout-minutes: 60 | |
| env: | |
| HOGQL_PARSER_RS_VERSION: ${{ matrix.version }} | |
| steps: | |
| # The crate lives at rust/hogql/parser inside an ~80-member Cargo | |
| # workspace (rust/Cargo.toml); sparse-checkout skips the rest of the | |
| # multi-GB posthog monorepo (Django app, frontend, ...). | |
| - name: Checkout posthog rust/ workspace | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: PostHog/posthog | |
| ref: ${{ env.HOGQL_PARSER_RS_REF }} | |
| sparse-checkout: rust | |
| persist-credentials: false | |
| - name: Build wheel | |
| uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 | |
| with: | |
| package-dir: rust/hogql/parser | |
| output-dir: wheelhouse/ | |
| # pyo3 carries abi3-py312 unconditionally, so one cp312-abi3 wheel | |
| # covers every interpreter, matching upstream's own PyPI wheels. | |
| # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. | |
| only: cp312-manylinux_riscv64 | |
| env: | |
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} | |
| CIBW_BEFORE_ALL_LINUX: >- | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" | |
| CIBW_TEST_COMMAND: >- | |
| python -c "import hogql_parser_rs as m; | |
| assert m.hogql_parser_rs.__file__.endswith('.so'), m.hogql_parser_rs.__file__; | |
| import json; | |
| r = json.loads(m.parse_expr_json('1 + 2')); | |
| assert r.get('error') is not True, r" | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: hogql-parser-rs-${{ env.HOGQL_PARSER_RS_VERSION }}-cp312-abi3-manylinux_riscv64 | |
| path: wheelhouse/*.whl | |
| if-no-files-found: error | |
| publish: | |
| name: Publish hogql-parser-rs ${{ matrix.version }} | |
| needs: [setup, build_wheels] | |
| if: needs.setup.outputs.versions != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| uses: $/.github/workflows/_publish-wheel.yml | |
| secrets: | |
| app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }} | |
| with: | |
| artifact-pattern: hogql-parser-rs-${{ matrix.version }}-*-manylinux_riscv64 |