From 50a11d763d4429c1a7590ef699c26f312ddb2fd2 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Thu, 5 Oct 2023 21:52:18 +0200 Subject: [PATCH] Publish the wheels on PyPI --- .github/workflows/build-hogql-parser.yml | 18 ++++++++++++++++-- hogql_parser/parser.cpp | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-hogql-parser.yml b/.github/workflows/build-hogql-parser.yml index eb6efc7efbc73e..73ee5b9c7eee87 100644 --- a/.github/workflows/build-hogql-parser.yml +++ b/.github/workflows/build-hogql-parser.yml @@ -13,10 +13,10 @@ on: - .github/workflows/build-hogql-parser.yml jobs: - build_wheels: + build-wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} - timeout-minutes: 15 + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -44,3 +44,17 @@ jobs: - uses: actions/upload-artifact@v3 with: path: hogql_parser/wheelhouse/*.whl + + upload-all: + needs: build-wheels + environment: pypi-hogql-parser + permissions: + id-token: write + runs-on: ubuntu-22.04 + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index 28cd6812c06d05..474c25263296bb 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -282,7 +282,7 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { ); PyObject* array_join_list = visitAsPyObject(array_join_clause_ctx->columnExprList()); - for (size_t i = 0; i < PyList_Size(array_join_list); i++) { + for (Py_ssize_t i = 0; i < PyList_Size(array_join_list); i++) { PyObject* expr = PyList_GET_ITEM(array_join_list, i); if (!is_ast_node_instance(expr, "Alias")) { Py_DECREF(array_join_list);