You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2025/05/29 05:34:47 UTC
(flink) branch release-1.20 updated (4e1ac5a7980 -> 0fb676c35b0)
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a change to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git
from 4e1ac5a7980 [FLINK-37820][table-planner] Support `AsyncScalarFunction` registration via `CompiledPlan`
new b714db4dadf [FLINK-34487][ci] Adds Python Wheels nightly GHA workflow
new 0fb676c35b0 [FLINK-34582] Updates cibuildwheel to support cpython 3.11 wheel package
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/actions/stringify/action.yml | 42 +++++++++++++++++++++++++++
.github/workflows/nightly.yml | 51 +++++++++++++++++++++++++++++++++
.github/workflows/template.flink-ci.yml | 15 ++++------
flink-python/pyproject.toml | 3 ++
4 files changed, 101 insertions(+), 10 deletions(-)
create mode 100644 .github/actions/stringify/action.yml
(flink) 01/02: [FLINK-34487][ci] Adds Python Wheels nightly GHA workflow
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git
commit b714db4dadf8de6a21c147b6a3568bf78b6ca8eb
Author: morazow <m....@gmail.com>
AuthorDate: Fri Mar 1 11:38:36 2024 +0100
[FLINK-34487][ci] Adds Python Wheels nightly GHA workflow
Co-authored-by: Matthias Pohl <gi...@mapohl.com>
---
.github/actions/stringify/action.yml | 42 +++++++++++++++++++++++++++++
.github/workflows/nightly.yml | 48 +++++++++++++++++++++++++++++++++
.github/workflows/template.flink-ci.yml | 15 ++++-------
3 files changed, 95 insertions(+), 10 deletions(-)
diff --git a/.github/actions/stringify/action.yml b/.github/actions/stringify/action.yml
new file mode 100644
index 00000000000..e05547f78dd
--- /dev/null
+++ b/.github/actions/stringify/action.yml
@@ -0,0 +1,42 @@
+# 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: "Stringify"
+description: "Stringifies the given input value."
+inputs:
+ value:
+ description: "Input value to stringify."
+ required: true
+outputs:
+ stringified_value:
+ description: "Stringified output value."
+ value: ${{ steps.stringify-step.outputs.stringified_value }}
+runs:
+ using: "composite"
+ steps:
+ - name: "Stringify '${{ inputs.value }}'"
+ id: stringify-step
+ shell: bash
+ run: |
+ # adds a stringified version of the workflow name that can be used for generating unique build artifact names within a composite workflow
+ # - replaces any special characters (except for underscores and dots) with dashes
+ # - makes the entire string lowercase
+ # - condenses multiple dashes into a single one
+ # - removes leading and following dashes
+ stringified_value=$(echo "${{ inputs.value }}" | tr -C '[:alnum:]._' '-' | tr '[:upper:]' '[:lower:]' | sed -e 's/--*/-/g' -e 's/^-*//g' -e 's/-*$//g')
+ echo "stringified_value=${stringified_value}" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 2090a3b1156..67994be49a5 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -94,3 +94,51 @@ jobs:
s3_bucket: ${{ secrets.IT_CASE_S3_BUCKET }}
s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }}
s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}
+
+ build_python_wheels:
+ name: "Build Python Wheels on ${{ matrix.os }}"
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-latest
+ os_name: linux
+ python-version: 3.9
+ - os: macos-latest
+ os_name: macos
+ python-version: 3.9
+ steps:
+ - name: "Checkout the repository"
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ - name: "Install python"
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: "Stringify workflow name"
+ uses: "./.github/actions/stringify"
+ id: stringify_workflow
+ with:
+ value: ${{ github.workflow }}
+ - name: "Build python wheels for ${{ matrix.os_name }}"
+ if: matrix.os_name == 'linux'
+ run: |
+ cd flink-python
+ bash dev/build-wheels.sh
+ - name: "Build python wheels for ${{ matrix.os }}"
+ if: matrix.os_name == 'macos'
+ run: |
+ cd flink-python
+ python -m pip install --upgrade pip
+ pip install cibuildwheel==2.8.0
+ cibuildwheel --platform macos --output-dir dist .
+ - name: "Tar python artifact"
+ run: tar -czvf python-wheel-${{ matrix.os_name }}.tar.gz -C flink-python/dist .
+ - name: "Upload python artifact"
+ uses: actions/upload-artifact@v4
+ with:
+ name: wheel_${{ matrix.os_name }}_${{ steps.stringify_workflow.outputs.stringified_value }}-${{ github.run_number }}
+ path: python-wheel-${{ matrix.os_name }}.tar.gz
diff --git a/.github/workflows/template.flink-ci.yml b/.github/workflows/template.flink-ci.yml
index 552d428fd69..15c278f061e 100644
--- a/.github/workflows/template.flink-ci.yml
+++ b/.github/workflows/template.flink-ci.yml
@@ -80,7 +80,7 @@ jobs:
# timeout in minutes - this environment variable is required by uploading_watchdog.sh
GHA_JOB_TIMEOUT: 240
outputs:
- stringified-workflow-name: ${{ steps.workflow-prep-step.outputs.stringified-workflow-name }}
+ stringified-workflow-name: ${{ steps.workflow-prep-step.outputs.stringified_value }}
steps:
- name: "Flink Checkout"
uses: actions/checkout@v4
@@ -96,15 +96,10 @@ jobs:
target_directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }}
- name: "Stringify workflow name"
+ uses: "./.github/actions/stringify"
id: workflow-prep-step
- run: |
- # adds a stringified version of the workflow name that can be used for generating unique build artifact names within a composite workflow
- # - replaces any special characters (except for underscores and dots) with dashes
- # - makes the entire string lowercase
- # - condenses multiple dashes into a single one
- # - removes leading and following dashes
- stringified_workflow_name=$(echo "${{ github.workflow }}-${{ inputs.workflow-caller-id }}" | tr -C '[:alnum:]._' '-' | tr '[:upper:]' '[:lower:]' | sed -e 's/--*/-/g' -e 's/^-*//g' -e 's/-*$//g')
- echo "stringified-workflow-name=${stringified_workflow_name}" >> $GITHUB_OUTPUT
+ with:
+ value: "${{ github.workflow }}-${{ inputs.workflow-caller-id }}"
- name: "Compile Flink"
uses: "./.github/actions/run_mvn"
@@ -122,7 +117,7 @@ jobs:
- name: "Upload artifacts to make them available in downstream jobs"
uses: actions/upload-artifact@v4
with:
- name: build-artifacts-${{ steps.workflow-prep-step.outputs.stringified-workflow-name }}-${{ github.run_number }}
+ name: build-artifacts-${{ steps.workflow-prep-step.outputs.stringified_value }}-${{ github.run_number }}
path: ${{ env.FLINK_ARTIFACT_DIR }}/${{ env.FLINK_ARTIFACT_FILENAME }}
if-no-files-found: error
# use minimum here because we only need these artifacts to speed up the build
(flink) 02/02: [FLINK-34582] Updates cibuildwheel to support cpython 3.11 wheel package
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 0fb676c35b0ad32342937d1e05b50b8f2a0459a4
Author: morazow <m....@gmail.com>
AuthorDate: Thu May 23 16:51:10 2024 +0200
[FLINK-34582] Updates cibuildwheel to support cpython 3.11 wheel package
---
.github/workflows/nightly.yml | 39 +++++++++++++++++++++------------------
flink-python/pyproject.toml | 3 +++
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 67994be49a5..adbdf660888 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -96,7 +96,7 @@ jobs:
s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}
build_python_wheels:
- name: "Build Python Wheels on ${{ matrix.os }}"
+ name: "Build Python Wheels on ${{ matrix.os_name }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -104,37 +104,40 @@ jobs:
include:
- os: ubuntu-latest
os_name: linux
- python-version: 3.9
- os: macos-latest
os_name: macos
- python-version: 3.9
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- - name: "Install python"
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
- name: "Stringify workflow name"
uses: "./.github/actions/stringify"
id: stringify_workflow
with:
value: ${{ github.workflow }}
+ # Used to host cibuildwheel
+ - name: "Setup Python"
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.x'
+ - name: "Install cibuildwheel"
+ run: python -m pip install cibuildwheel==2.16.5
- name: "Build python wheels for ${{ matrix.os_name }}"
- if: matrix.os_name == 'linux'
- run: |
- cd flink-python
- bash dev/build-wheels.sh
- - name: "Build python wheels for ${{ matrix.os }}"
- if: matrix.os_name == 'macos'
- run: |
- cd flink-python
- python -m pip install --upgrade pip
- pip install cibuildwheel==2.8.0
- cibuildwheel --platform macos --output-dir dist .
+ run: python -m cibuildwheel --output-dir flink-python/dist flink-python
+ env:
+ # Skip -musllinux on Linux builds
+ CIBW_SKIP: "*-musllinux*"
+ # Use manylinux2014 on Linux
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
+ CIBW_BEFORE_ALL_LINUX: pip install patchelf
+ CIBW_BEFORE_BUILD_LINUX: pip install -r flink-python/dev/dev-requirements.txt
+ CIBW_ENVIRONMENT_LINUX: CFLAGS="-I. -include ./dev/glibc_version_fix.h"
+ # Run auditwheel repair on Linux
+ CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair -w {dest_dir} {wheel}"
+ # Skip repair on MacOS
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
- name: "Tar python artifact"
run: tar -czvf python-wheel-${{ matrix.os_name }}.tar.gz -C flink-python/dist .
- name: "Upload python artifact"
diff --git a/flink-python/pyproject.toml b/flink-python/pyproject.toml
index 47ec69ab780..cfdbdd1fb6d 100644
--- a/flink-python/pyproject.toml
+++ b/flink-python/pyproject.toml
@@ -32,3 +32,6 @@ build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
+
+[tool.cibuildwheel.linux]
+archs = ["x86_64"]