Skip to content

Commit

Permalink
Add some instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 9, 2023
1 parent 9566e5d commit a3acd89
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/run-backend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ runs:
run: |
pip install -r requirements.txt -r requirements-dev.txt
- name: Install local hogql-parser
- name: Install the working version of hogql-parser
if: steps.hogql-parser-diff.outputs.changed == 'true'
shell: bash
# This is not cached currently, as it's important to build the current HEAD version of hogql-parser if it has
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-hogql-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
timeout-minutes: 120 # The Linux ARM builds are painfully slow
strategy:
matrix:
# ARM emulation is reasonably fast on macOS, but insanely slow (20x longer) on Linux runners
# As of October 2023, GitHub doesn't have ARM Actions runners… and ARM emulation is insanely slow
# (20x longer) on the Linux runners (while being reasonable on the macOS runners). Hence, we use
# BuildJet as a provider of ARM runners - this solution saves a lot of time and consequently some money.
os: [ubuntu-22.04, buildjet-2vcpu-ubuntu-2204-arm, macos-12]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
# If added or modified, run OptiPNG
if [ $ADDED -gt 0 ] || [ $MODIFIED -gt 0 ]; then
echo "Snapshots updated ($ADDED new, $MODIFIED changed), running OptiPNG"
sudo apt-get update && sudo apt-get install -y optipng
apt update && apt install -y optipng
optipng -clobber -o4 -strip all
# we don't want to _always_ run OptiPNG
Expand Down
20 changes: 20 additions & 0 deletions hogql_parser/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# HogQL Parser

## Developing locally on macOS

1. Install libraries:

```bash
brew install boost antlr
```

1. Install `hogql_parser` from local sources:

```bash
pip install ./hogql_parser
```

1. If you now run tests, the locally-built version of `hogql_parser` will be used:

```bash
pytest posthog/hogql/
```

0 comments on commit a3acd89

Please sign in to comment.