diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9c45cb4..65eae50 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-24.04, macos-13, macos-14] + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -64,7 +64,11 @@ jobs: env: TARGET_PYTHON: ${{ matrix.python-version }} run: | - bazel build --define TARGET_VERSION="$(python -c "print(\"py${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + glibc_version=$(ldd --version | awk '/ldd/{print $NF}') + export GLIBC_VERSION="${glibc_version//./_}" + echo $GLIBC_VERSION + sed "s/^MANYLINUX_VERSION.*/MANYLINUX_VERSION=\"manylinux_${GLIBC_VERSION}_x86_64.manylinux2014_x86_64\"/" BUILD -i || true + bazel build --define GLIBC_VERSION=$GLIBC_VERSION --define TARGET_VERSION="$(python -c "print(\"py${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 456a6ca..a6384a3 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-24.04, macos-13, macos-14] + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] python-version: ['3.10', '3.11', '3.12'] steps: @@ -64,6 +64,10 @@ jobs: env: TARGET_PYTHON: ${{ matrix.python-version }} run: | + glibc_version=$(ldd --version | awk '/ldd/{print $NF}') + export GLIBC_VERSION="${glibc_version//./_}" + echo $GLIBC_VERSION + sed "s/^MANYLINUX_VERSION.*/MANYLINUX_VERSION=\"manylinux_${GLIBC_VERSION}_x86_64.manylinux2014_x86_64\"/" BUILD -i || true bazel build --define TARGET_VERSION="$(python -c "print(\"py${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/BUILD b/BUILD index e70fec5..384a92f 100644 --- a/BUILD +++ b/BUILD @@ -13,6 +13,8 @@ filegroup( visibility = ["//visibility:public"], ) +MANYLINUX_VERSION="manylinux_2_17_x86_64.manylinux2014_x86_64" + py_wheel( name="tesseract_decoder_wheel", distribution = "tesseract_decoder", @@ -29,7 +31,7 @@ py_wheel( ":macos_arm": "macosx_11_0_arm64", ":macos_x86": "macosx_10_13_x86_64", "@platforms//os:windows": "win32", - "@platforms//os:linux": "manylinux_2_17_x86_64.manylinux2014_x86_64", + "@platforms//os:linux": MANYLINUX_VERSION, }), strip_path_prefixes = ["src"], description_file=":package_description",