From 62c585a3ca20fbd50e221c8fc4ce3eaf22af2d5f Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 13:50:20 -0800 Subject: [PATCH 01/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 287 ++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..a239b8a0a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,287 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Python Release Build +on: + pull_request: + branches: ["main"] + push: + tags: ["*-rc*"] + branches: ["branch-*"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + # Update output format to enable automatic inline annotations. +# - name: Run Ruff +# run: | +# ruff check --output-format=github python/ +# ruff format --check python/ + + generate-license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Generate license file + run: python ./dev/create_license.py + - uses: actions/upload-artifact@v4 + with: + name: python-wheel-license + path: LICENSE.txt + + build-python-mac-win: + needs: [generate-license] + name: Mac/Win + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.10"] + os: [macos-latest, windows-latest] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install maturin + run: pip install maturin==1.5.1 + + - run: rm LICENSE.txt + - name: Download LICENSE.txt + uses: actions/download-artifact@v4 + with: + name: python-wheel-license + path: . + + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Python package + run: cd python && cargo build && maturin build --release --strip + + - name: List Windows wheels + if: matrix.os == 'windows-latest' + run: dir target\wheels\ + # since the runner is dynamic shellcheck (from actionlint) can't infer this is powershell + # so we specify it explicitly + shell: powershell + + - name: List Mac wheels + if: matrix.os != 'windows-latest' + run: find target/wheels/ + + - name: Archive wheels + uses: actions/upload-artifact@v4 + with: + name: dist-${{ matrix.os }} + path: python/target/wheels/* + + build-macos-x86_64: + needs: [generate-license] + name: Mac x86_64 + runs-on: macos-13 + strategy: + fail-fast: false + matrix: + python-version: ["3.10"] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install maturin + run: pip install maturin==1.5.1 + + - run: rm LICENSE.txt + - name: Download LICENSE.txt + uses: actions/download-artifact@v4 + with: + name: python-wheel-license + path: . + + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Python package + run: cd python && cargo build && maturin build --release --strip + - name: List Mac wheels + run: python/target/wheels/ + + - name: Archive wheels + uses: actions/upload-artifact@v4 + with: + name: dist-macos-aarch64 + path: python/target/wheels/* + + build-manylinux-x86_64: + needs: [generate-license] + name: Manylinux x86_64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm LICENSE.txt + - name: Download LICENSE.txt + uses: actions/download-artifact@v4 + with: + name: python-wheel-license + path: . + - run: cat LICENSE.txt + - name: Build wheels + uses: PyO3/maturin-action@v1 + env: + RUST_BACKTRACE: 1 + with: + rust-toolchain: nightly + target: x86_64 + manylinux: auto + rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 + working-directory: python + args: --release --manylinux 2014 + - name: Archive wheels + uses: actions/upload-artifact@v4 + with: + name: dist-manylinux-x86_64 + path: python/target/wheels/* + + build-manylinux-aarch64: + needs: [generate-license] + name: Manylinux arm64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm LICENSE.txt + - name: Download LICENSE.txt + uses: actions/download-artifact@v4 + with: + name: python-wheel-license + path: . + - run: cat LICENSE.txt + - name: Build wheels + uses: PyO3/maturin-action@v1 + env: + RUST_BACKTRACE: 1 + with: + rust-toolchain: nightly + target: aarch64 + # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail + manylinux: 2_28 + rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 + working-directory: python + args: --release + - name: Archive wheels + uses: actions/upload-artifact@v4 + with: + name: dist-manylinux-aarch64 + path: python/target/wheels/* + + build-sdist: + needs: [generate-license] + name: Source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm LICENSE.txt + - name: Download LICENSE.txt + uses: actions/download-artifact@v4 + with: + name: python-wheel-license + path: . + - run: cat LICENSE.txt + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + rust-toolchain: stable + manylinux: auto + rustup-components: rust-std rustfmt + working-directory: python + args: --release --sdist --out dist + - name: Assert sdist build does not generate wheels + run: | + if [ "$(ls -A target/wheels)" ]; then + echo "Error: Sdist build generated wheels" + exit 1 + else + echo "Directory is clean" + fi + shell: bash + + merge-build-artifacts: + runs-on: ubuntu-latest + needs: + - build-python-mac-win + - build-macos-x86_64 + - build-manylinux-x86_64 + - build-manylinux-aarch64 + - build-sdist + steps: + - name: Merge Build Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: dist + pattern: dist-* + + # NOTE: PyPI publish needs to be done manually for now after release passed the vote + # release: + # name: Publish in PyPI + # needs: [build-manylinux, build-python-mac-win] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/download-artifact@v4 + # - name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@master + # with: + # user: __token__ + # password: ${{ secrets.pypi_password }} From a39e638388f2f68bb1839843f9aa79562df43d84 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 13:56:41 -0800 Subject: [PATCH 02/21] adding pyproject updates --- python/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 2d06b225d..97d952f03 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -16,7 +16,7 @@ # under the License. [build-system] -requires = ["maturin>=0.15,<0.16"] +requires = ["maturin>=1.5.1,<1.6.0"] build-backend = "maturin" [project] @@ -61,4 +61,4 @@ include = [ ] exclude = [".github/**", "ci/**", ".asf.yaml"] # Require Cargo.lock is up to date -locked = true \ No newline at end of file +locked = true From c5570f737385859bdf5b92aeaf363824bceca8f7 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 14:04:49 -0800 Subject: [PATCH 03/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 10 +++++++--- python/pyproject.toml | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a239b8a0a..3b0249d30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,8 +97,11 @@ jobs: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Cargo build + run: cd python && cargo build + - name: Build Python package - run: cd python && cargo build && maturin build --release --strip + run: maturin build --release --strip - name: List Windows wheels if: matrix.os == 'windows-latest' @@ -154,9 +157,10 @@ jobs: with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - + - name: Cargo build + run: cd python && cargo build - name: Build Python package - run: cd python && cargo build && maturin build --release --strip + run: maturin build --release --strip - name: List Mac wheels run: python/target/wheels/ diff --git a/python/pyproject.toml b/python/pyproject.toml index 97d952f03..30a58d401 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -60,5 +60,3 @@ include = [ { path = "Cargo.lock", format = "sdist" } ] exclude = [".github/**", "ci/**", ".asf.yaml"] -# Require Cargo.lock is up to date -locked = true From a28ff3be999261cf410e83bd884950f1eb198d8b Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 14:16:43 -0800 Subject: [PATCH 04/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b0249d30..edf503412 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,7 @@ jobs: run: cd python && cargo build - name: Build Python package - run: maturin build --release --strip + run: cd python && maturin build --release --strip - name: List Windows wheels if: matrix.os == 'windows-latest' @@ -160,7 +160,7 @@ jobs: - name: Cargo build run: cd python && cargo build - name: Build Python package - run: maturin build --release --strip + run: cd python && maturin build --release --strip - name: List Mac wheels run: python/target/wheels/ From f786c0c9345fe073b366c9be747373f7a81b2d26 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 14:32:27 -0800 Subject: [PATCH 05/21] updated maturin version and ccargo build to build yml --- python/pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/pyproject.toml b/python/pyproject.toml index 30a58d401..97d952f03 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -60,3 +60,5 @@ include = [ { path = "Cargo.lock", format = "sdist" } ] exclude = [".github/**", "ci/**", ".asf.yaml"] +# Require Cargo.lock is up to date +locked = true From 5f6c2b25ad513c8c72712f5fcf8511da99a2acc1 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 15:11:40 -0800 Subject: [PATCH 06/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index edf503412..773d2eb78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,14 +105,14 @@ jobs: - name: List Windows wheels if: matrix.os == 'windows-latest' - run: dir target\wheels\ + run: dir python\target\wheels\ # since the runner is dynamic shellcheck (from actionlint) can't infer this is powershell # so we specify it explicitly shell: powershell - name: List Mac wheels if: matrix.os != 'windows-latest' - run: find target/wheels/ + run: cd python/target/wheels/ - name: Archive wheels uses: actions/upload-artifact@v4 From 291e7270d84e427c883d8ebbaaa98716cb4e5295 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Mon, 25 Nov 2024 15:44:28 -0800 Subject: [PATCH 07/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 773d2eb78..bcb11ef68 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,7 +162,7 @@ jobs: - name: Build Python package run: cd python && maturin build --release --strip - name: List Mac wheels - run: python/target/wheels/ + run: cd python/target/wheels/ - name: Archive wheels uses: actions/upload-artifact@v4 From 4b20b4d2ede9dc8c01a9204fd57c10014eb77c77 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 09:49:56 -0800 Subject: [PATCH 08/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcb11ef68..2e0b26d0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,12 +177,18 @@ jobs: steps: - uses: actions/checkout@v4 - run: rm LICENSE.txt + - name: Download LICENSE.txt uses: actions/download-artifact@v4 with: name: python-wheel-license path: . + - run: cat LICENSE.txt + + - name: Cargo Build + run: cd python && cargo build + - name: Build wheels uses: PyO3/maturin-action@v1 env: @@ -212,7 +218,12 @@ jobs: with: name: python-wheel-license path: . + - run: cat LICENSE.txt + + - name: Cargo Build + run: cd python && cargo build + - name: Build wheels uses: PyO3/maturin-action@v1 env: @@ -243,7 +254,12 @@ jobs: with: name: python-wheel-license path: . + - run: cat LICENSE.txt + + - name: Cargo Build + run: cd python && cargo build + - name: Build sdist uses: PyO3/maturin-action@v1 with: From cbd6153c28eac7b3e734f7a474d06d23da918fca Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 09:55:54 -0800 Subject: [PATCH 09/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e0b26d0b..fcc5241c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,6 +185,11 @@ jobs: path: . - run: cat LICENSE.txt + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build @@ -220,6 +225,11 @@ jobs: path: . - run: cat LICENSE.txt + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build @@ -256,6 +266,11 @@ jobs: path: . - run: cat LICENSE.txt + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build From 8a5dea4acca738359131ac2d5b30395ea581805e Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 10:16:54 -0800 Subject: [PATCH 10/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcc5241c9..dd28b6dbd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,6 +191,9 @@ jobs: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Protobug Compiler (Setup protoc not working) + run: apt-get install protobuf-compiler + - name: Cargo Build run: cd python && cargo build @@ -231,6 +234,8 @@ jobs: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Protobug Compiler (Setup protoc not working) + run: apt-get install protobuf-compiler - name: Cargo Build run: cd python && cargo build @@ -272,6 +277,8 @@ jobs: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Protobug Compiler (Setup protoc not working) + run: apt-get install protobuf-compiler - name: Cargo Build run: cd python && cargo build From 71bab8533014a53dd93e968a9ca3a5e05246819b Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 10:19:50 -0800 Subject: [PATCH 11/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd28b6dbd..25ef25646 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,7 +192,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Protobug Compiler (Setup protoc not working) - run: apt-get install protobuf-compiler + run: sudo apt-get install protobuf-compiler - name: Cargo Build run: cd python && cargo build @@ -235,7 +235,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Protobug Compiler (Setup protoc not working) - run: apt-get install protobuf-compiler + run: sudo apt-get install protobuf-compiler + - name: Cargo Build run: cd python && cargo build @@ -278,7 +279,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Protobug Compiler (Setup protoc not working) - run: apt-get install protobuf-compiler + run: sudo apt-get install protobuf-compiler + - name: Cargo Build run: cd python && cargo build From 7f539a1d76b20352bf258a9b05bf08a7b551bba8 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 10:37:01 -0800 Subject: [PATCH 12/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25ef25646..e1ed0f5aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,15 +185,15 @@ jobs: path: . - run: cat LICENSE.txt + + - name: Install Protobug Compiler (Setup protoc not working) + run: sudo apt-get install protobuf-compiler + - name: Install Protoc uses: arduino/setup-protoc@v3 with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - - name: Cargo Build run: cd python && cargo build @@ -228,15 +228,15 @@ jobs: path: . - run: cat LICENSE.txt + + - name: Install Protobug Compiler (Setup protoc not working) + run: sudo apt-get install protobuf-compiler + - name: Install Protoc uses: arduino/setup-protoc@v3 with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - - name: Cargo Build run: cd python && cargo build @@ -272,15 +272,15 @@ jobs: path: . - run: cat LICENSE.txt + + - name: Install Protobug Compiler (Setup protoc not working) + run: sudo apt-get install protobuf-compiler + - name: Install Protoc uses: arduino/setup-protoc@v3 with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - - name: Cargo Build run: cd python && cargo build From 32a4844d49cf604d76f5319540717abec6e96796 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 11:10:37 -0800 Subject: [PATCH 13/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1ed0f5aa..b5c47716f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,9 +186,6 @@ jobs: - run: cat LICENSE.txt - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - - name: Install Protoc uses: arduino/setup-protoc@v3 with: @@ -199,6 +196,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 + run: sudo apt-get install protobuf-compiler env: RUST_BACKTRACE: 1 with: From 6f8933143144e29a26c69d154b54111487162b21 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 12:09:45 -0800 Subject: [PATCH 14/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5c47716f..0bf09ea08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -284,6 +284,7 @@ jobs: - name: Build sdist uses: PyO3/maturin-action@v1 + run: sudo apt-get install protobuf-compiler with: rust-toolchain: stable manylinux: auto From 9f231b95ab883ee31dff919882e0b8cb5686a6f6 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Tue, 26 Nov 2024 12:12:30 -0800 Subject: [PATCH 15/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bf09ea08..06a9ada96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -196,7 +196,6 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 - run: sudo apt-get install protobuf-compiler env: RUST_BACKTRACE: 1 with: @@ -284,7 +283,6 @@ jobs: - name: Build sdist uses: PyO3/maturin-action@v1 - run: sudo apt-get install protobuf-compiler with: rust-toolchain: stable manylinux: auto From 19295a9462ee112233b0e7a4a28886aacb0b9b4c Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 09:17:40 -0800 Subject: [PATCH 16/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06a9ada96..88b12c38f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,25 +186,11 @@ jobs: - run: cat LICENSE.txt - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - version: "27.4" - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build - - name: Build wheels - uses: PyO3/maturin-action@v1 - env: - RUST_BACKTRACE: 1 - with: - rust-toolchain: nightly - target: x86_64 - manylinux: auto - rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 - working-directory: python - args: --release --manylinux 2014 + - name: Build Python package + run: cd python && maturin build --release --strip - name: Archive wheels uses: actions/upload-artifact@v4 with: From 2959fd847ae72c5e302b4a49a758af94867b73b0 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 09:26:18 -0800 Subject: [PATCH 17/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88b12c38f..878029dd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,6 +185,11 @@ jobs: path: . - run: cat LICENSE.txt + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "27.4" + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build From 534f9f966881d76c619f1fc889fcd692c791be5b Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 09:32:14 -0800 Subject: [PATCH 18/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 878029dd2..32c923618 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,6 +191,11 @@ jobs: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install maturin + run: pip install maturin==1.5.1 - name: Cargo Build run: cd python && cargo build From b29af3c63964f8b1878a7d28a0943f4dda1ce773 Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 09:52:41 -0800 Subject: [PATCH 19/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 41 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32c923618..ea4e653ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -221,10 +221,7 @@ jobs: path: . - run: cat LICENSE.txt - - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - + - name: Install Protoc uses: arduino/setup-protoc@v3 with: @@ -232,19 +229,16 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install maturin + run: pip install maturin==1.5.1 + - name: Cargo Build + run: cd python && cargo build - - name: Build wheels - uses: PyO3/maturin-action@v1 - env: - RUST_BACKTRACE: 1 - with: - rust-toolchain: nightly - target: aarch64 - # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail - manylinux: 2_28 - rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 - working-directory: python - args: --release + - name: Build Python package + run: cd python && maturin build --release --strip - name: Archive wheels uses: actions/upload-artifact@v4 with: @@ -265,10 +259,7 @@ jobs: path: . - run: cat LICENSE.txt - - - name: Install Protobug Compiler (Setup protoc not working) - run: sudo apt-get install protobuf-compiler - + - name: Install Protoc uses: arduino/setup-protoc@v3 with: @@ -276,15 +267,9 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Cargo Build run: cd python && cargo build + - name: Build Python package + run: cd python && maturin build --release --sdist --out dist --strip - - name: Build sdist - uses: PyO3/maturin-action@v1 - with: - rust-toolchain: stable - manylinux: auto - rustup-components: rust-std rustfmt - working-directory: python - args: --release --sdist --out dist - name: Assert sdist build does not generate wheels run: | if [ "$(ls -A target/wheels)" ]; then From 4ad850c0893d87542f0e9768e504d61e101eff4a Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 10:01:02 -0800 Subject: [PATCH 20/21] updated maturin version and ccargo build to build yml --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea4e653ba..ce92d5a52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -227,8 +227,6 @@ jobs: with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Cargo Build - run: cd python && cargo build - name: Upgrade pip run: python -m pip install --upgrade pip @@ -265,6 +263,11 @@ jobs: with: version: "27.4" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install maturin + run: pip install maturin==1.5.1 - name: Cargo Build run: cd python && cargo build - name: Build Python package From 8be52c60d6e05d90c8a630f57d2479afb1bdf50e Mon Sep 17 00:00:00 2001 From: tbar4 Date: Wed, 27 Nov 2024 11:27:22 -0800 Subject: [PATCH 21/21] updated maturin version and ccargo build to build yml --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 97d952f03..cce88fd3b 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -24,7 +24,7 @@ name = "ballista" description = "Python client for Apache Arrow Ballista Distributed SQL Query Engine" readme = "README.md" license = {file = "LICENSE.txt"} -requires-python = ">=3.6" +requires-python = ">=3.7" keywords = ["ballista", "sql", "rust", "distributed"] classifier = [ "Development Status :: 2 - Pre-Alpha",