perf: Parse HogQL with C++ for a huge speedup #10
Workflow file for this run
This file contains 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: Release hogql-parser | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- hogql_parser/** | |
- .github/workflows/build-hogql-parser.yml | |
pull_request: | |
paths: | |
- hogql_parser/** | |
- .github/workflows/build-hogql-parser.yml | |
jobs: | |
build-wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU for Linux ARM builds | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.* | |
- name: Build wheels | |
run: cd hogql_parser && python -m cibuildwheel --output-dir wheelhouse | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '12' # A modern target allows us to use C++20 | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: hogql_parser/wheelhouse/*.whl | |
publish: | |
name: Publish on PyPI | |
needs: build-wheels | |
environment: pypi-hogql-parser | |
permissions: | |
id-token: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
- name: Build sdist | |
run: cd hogql_parser && python setup.py sdist | |
- name: Fetch wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: hogql_parser/dist/ | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: hogql_parser/dist/ |