Skip to content

Commit

Permalink
Use HEAD hogql_paresr in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 9, 2023
1 parent 3998469 commit a29896d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
24 changes: 19 additions & 5 deletions .github/actions/run-backend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ runs:
- name: Install SAML (python3-saml) dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
apt update
apt install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
Expand All @@ -63,12 +63,26 @@ runs:
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'

- name: Install python dependencies
- name: Install Python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
shell: bash
run: |
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
pip install -r requirements.txt -r requirements-dev.txt
- name: Install local hogql-parser
shell: bash
# This is not cached currently, as it's important to build the current HEAD version (we can't just look at
# requirements.txt, which only has the published version) and caching just one package is not worth the effort
run: |
apt install libboost-all-dev unzip cmake curl uuid pkg-config
curl https://www.antlr.org/download/antlr4-cpp-runtime-4.13.1-source.zip --output antlr4-source.zip
unzip antlr4-source.zip -d antlr4-source && cd antlr4-source
cmake .
DESTDIR=out make install
cp -r out/usr/local/include/antlr4-runtime /usr/include/
cp out/usr/local/lib/libantlr4-runtime.so* /usr/lib/
ldconfig
pip install ./hogql_parser
- name: Set up needed files
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions hogql_parser/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"parser.cpp",
],
include_dirs=[
f"{homebrew_location}/include/" if is_macos else "/usr/include/",
f"{homebrew_location}/include/antlr4-runtime/" if is_macos else "/usr/include/antlr4-runtime/",
],
library_dirs=[
f"{homebrew_location}/lib/" if is_macos else "/usr/lib64/",
],
f"{homebrew_location}/include/",
f"{homebrew_location}/include/antlr4-runtime/",
]
if is_macos
else ["/usr/include/", "/usr/include/antlr4-runtime/"],
library_dirs=[f"{homebrew_location}/lib/"] if is_macos else ["/usr/lib/", "/usr/lib64/"],
libraries=["antlr4-runtime"],
extra_compile_args=["-std=c++20"],
)
Expand Down

0 comments on commit a29896d

Please sign in to comment.