From a537d30465ef2d3bc93366e8bb831c5464d8ca73 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:14:58 -0700 Subject: [PATCH 01/19] Fix minor issues in pypi workflow --- .github/workflows/prerelease.yml | 10 ++++++++++ .github/workflows/stable-release-workflow.yml | 10 +++++++++- BUILD | 1 + _version.py | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 7b9eecc..21fb9e8 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -37,6 +37,9 @@ jobs: arch: x86_64 - os: macos-13 arch: auto + matrix: + include: + python-version: [3.10, 3.11, 3.12] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -57,6 +60,12 @@ jobs: disk-cache: ${{ github.workflow }} repository-cache: true + - name: Set Python Version + env: + TARGET_PYTHON: ${{ matrix.python-version }} + run: | + sed -i "s/DEFAULT_PYTHON_VERSION =.*/DEFAULT_PYTHON_VERSION = \"${TARGET_PYTHON}\"/g" MODULE.bazel + - name: Build package run: | bazel build --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel @@ -88,6 +97,7 @@ jobs: packages_dir: wheelhouse/ verbose: true + - name: Publish package to pypi uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index de7c291..de728e0 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -36,6 +36,9 @@ jobs: arch: x86_64 - os: macos-13 arch: auto + matrix: + include: + python-version: [3.10, 3.11, 3.12] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -56,6 +59,12 @@ jobs: disk-cache: ${{ github.workflow }} repository-cache: true + - name: Set Python Version + env: + TARGET_PYTHON: ${{ matrix.python-version }} + run: | + sed -i "s/DEFAULT_PYTHON_VERSION =.*/DEFAULT_PYTHON_VERSION = \"${TARGET_PYTHON}\"/g" MODULE.bazel + - name: Build package run: | bazel build --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel @@ -78,7 +87,6 @@ jobs: merge-multiple: true path: wheelhouse/ - - name: Publish package to testpypi uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/BUILD b/BUILD index 1225b3a..24cd358 100644 --- a/BUILD +++ b/BUILD @@ -29,6 +29,7 @@ py_wheel( "@platforms//os:windows": "win32", "@platforms//os:linux": "manylinux_2_17_x86_64.manylinux2014_x86_64", }), + strip_path_prefixes = ["src"], description_file=":package_description", description_content_type="text/markdown", summary="A search-based decoder for quantum error correction (QEC).", diff --git a/_version.py b/_version.py index 646b797..269365e 100644 --- a/_version.py +++ b/_version.py @@ -1,6 +1,6 @@ # Version of Tesseract's python distribution -__version__ = '0.1.1' +__version__ = '0.1.2' if __name__ == '__main__': print(__version__) From 08aa066a8ce1a4d307e6d95d1fb34d75bc083f6e Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:17:38 -0700 Subject: [PATCH 02/19] test ci --- .github/workflows/prerelease.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 21fb9e8..487877e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -5,6 +5,10 @@ on: branches: - main + pull_request: + branches: + - main + permissions: contents: read From 8112465823526bdc2721920d09dbcd1af288439b Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:20:28 -0700 Subject: [PATCH 03/19] nit --- .github/workflows/prerelease.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 487877e..c72d106 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -41,9 +41,7 @@ jobs: arch: x86_64 - os: macos-13 arch: auto - matrix: - include: - python-version: [3.10, 3.11, 3.12] + - python-version: [3.10, 3.11, 3.12] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -68,6 +66,7 @@ jobs: env: TARGET_PYTHON: ${{ matrix.python-version }} run: | + echo "set version to ${TARGET_PYTHON}" sed -i "s/DEFAULT_PYTHON_VERSION =.*/DEFAULT_PYTHON_VERSION = \"${TARGET_PYTHON}\"/g" MODULE.bazel - name: Build package From 4bcb57155be6152f1c0b654bccbb979a8afd9cd9 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:21:38 -0700 Subject: [PATCH 04/19] nit --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index c72d106..17a3ec5 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -41,7 +41,7 @@ jobs: arch: x86_64 - os: macos-13 arch: auto - - python-version: [3.10, 3.11, 3.12] + python-version: [3.10, 3.11, 3.12] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From 3d0a6846a74e0e4ed6faeed76cdac8781fb2fed1 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:22:15 -0700 Subject: [PATCH 05/19] nit --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 17a3ec5..589f308 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -41,7 +41,7 @@ jobs: arch: x86_64 - os: macos-13 arch: auto - python-version: [3.10, 3.11, 3.12] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From a039c6f0cc25c5582f2ac0748e20b4147d1e5776 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:22:35 -0700 Subject: [PATCH 06/19] nit --- .github/workflows/stable-release-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index de728e0..e7e8aa8 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -36,9 +36,7 @@ jobs: arch: x86_64 - os: macos-13 arch: auto - matrix: - include: - python-version: [3.10, 3.11, 3.12] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From 09fea10d0a09794e0b6f8c2f2013dfc9bcfc9ca9 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:23:41 -0700 Subject: [PATCH 07/19] nit --- .github/workflows/prerelease.yml | 3 ++- .github/workflows/stable-release-workflow.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 589f308..1048094 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -39,9 +39,10 @@ jobs: include: - os: ubuntu-24.04 arch: x86_64 + python-version: ['3.10', '3.11', '3.12'] - os: macos-13 arch: auto - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index e7e8aa8..1ac8b1b 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -34,9 +34,10 @@ jobs: include: - os: ubuntu-24.04 arch: x86_64 + python-version: ['3.10', '3.11', '3.12'] - os: macos-13 arch: auto - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From 0c57ba4d4484ad2bf22b379d1fea939489820b13 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:25:06 -0700 Subject: [PATCH 08/19] nit --- .github/workflows/prerelease.yml | 7 +++++-- .github/workflows/stable-release-workflow.yml | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 1048094..518662a 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -39,10 +39,13 @@ jobs: include: - os: ubuntu-24.04 arch: x86_64 - python-version: ['3.10', '3.11', '3.12'] - os: macos-13 arch: auto - python-version: ['3.10', '3.11', '3.12'] + strategy: + fail-fast: true + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 1ac8b1b..9922b0d 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -34,10 +34,12 @@ jobs: include: - os: ubuntu-24.04 arch: x86_64 - python-version: ['3.10', '3.11', '3.12'] - os: macos-13 arch: auto - python-version: ['3.10', '3.11', '3.12'] + strategy: + fail-fast: true + matrix: + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From 84c727b4cd6b7015f1fb6910b04b160114655f7f Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:27:43 -0700 Subject: [PATCH 09/19] nit --- .github/workflows/prerelease.yml | 9 +-------- .github/workflows/stable-release-workflow.yml | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 518662a..0d4aa2d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -33,17 +33,10 @@ jobs: build_wheels: runs-on: ${{ matrix.os }} needs: [create_version] - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-24.04 - arch: x86_64 - - os: macos-13 - arch: auto strategy: fail-fast: true matrix: + os: [ubuntu-24.04, macos-13] python-version: ['3.10', '3.11', '3.12'] diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 9922b0d..34b854a 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -28,17 +28,10 @@ jobs: build_wheels: runs-on: ${{ matrix.os }} needs: [create_version] - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-24.04 - arch: x86_64 - - os: macos-13 - arch: auto strategy: fail-fast: true matrix: + os: [ubuntu-24.04, macos-13] python-version: ['3.10', '3.11', '3.12'] steps: From 48a410b3f01220974986ae50de3946dc41f9fb9b Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:35:34 -0700 Subject: [PATCH 10/19] nit --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 3 ++- _update_bazel_py_version.py | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 _update_bazel_py_version.py diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 0d4aa2d..11c0b1f 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -64,7 +64,7 @@ jobs: TARGET_PYTHON: ${{ matrix.python-version }} run: | echo "set version to ${TARGET_PYTHON}" - sed -i "s/DEFAULT_PYTHON_VERSION =.*/DEFAULT_PYTHON_VERSION = \"${TARGET_PYTHON}\"/g" MODULE.bazel + python _update_bazel_py_version.py $TARGET_PYTHON - name: Build package run: | diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 34b854a..a7168a5 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -57,7 +57,8 @@ jobs: env: TARGET_PYTHON: ${{ matrix.python-version }} run: | - sed -i "s/DEFAULT_PYTHON_VERSION =.*/DEFAULT_PYTHON_VERSION = \"${TARGET_PYTHON}\"/g" MODULE.bazel + echo "set version to ${TARGET_PYTHON}" + python _update_bazel_py_version.py $TARGET_PYTHON - name: Build package run: | diff --git a/_update_bazel_py_version.py b/_update_bazel_py_version.py new file mode 100644 index 0000000..c0220fc --- /dev/null +++ b/_update_bazel_py_version.py @@ -0,0 +1,14 @@ +import sys + +def main(): + version = sys.argv[1] + lines = open('MODULE.bazel').read().splitlines() + for i, l in enumerate(lines): + if l.startswith('DEFAULT_PYTHON_VERSION = '): + lines[i] = f'DEFAULT_PYTHON_VERSION = "{version}"' + break + with open('MODULE.bazel', 'w') as ouf: + print(*lines, file=ouf, sep='\n') + +if __name__ == '__main__': + main() From ee35afd5c5c73f961ffc6db34c09ba0ef04c1c1d Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:42:02 -0700 Subject: [PATCH 11/19] nit --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 2 +- BUILD | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 11c0b1f..bd1329b 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -68,7 +68,7 @@ jobs: - name: Build package run: | - bazel build --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + bazel build --define TARGET_VERSION=\"${TARGET_PYTHON}\" --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 a7168a5..b01edff 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -62,7 +62,7 @@ jobs: - name: Build package run: | - bazel build --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + bazel build --define TARGET_VERSION=\"${TARGET_PYTHON}\" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: diff --git a/BUILD b/BUILD index 24cd358..b33be34 100644 --- a/BUILD +++ b/BUILD @@ -24,6 +24,8 @@ py_wheel( requires=[ "stim", ], + abi="$(TARGET_VERSION)", + python_tag="$(TARGET_VERSION)", platform= select({ "@platforms//os:macos": "macosx_10_13_x86_64", "@platforms//os:windows": "win32", From 03ca2b0a452de72b59ab87da85adca9eb34d9976 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:43:12 -0700 Subject: [PATCH 12/19] nit --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index bd1329b..86d99a3 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -68,7 +68,7 @@ jobs: - name: Build package run: | - bazel build --define TARGET_VERSION=\"${TARGET_PYTHON}\" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + bazel build --define TARGET_VERSION="${TARGET_PYTHON}" --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 b01edff..e320c2c 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -62,7 +62,7 @@ jobs: - name: Build package run: | - bazel build --define TARGET_VERSION=\"${TARGET_PYTHON}\" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + bazel build --define TARGET_VERSION="${TARGET_PYTHON}" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: From 602a265704b93babcedc476f3475e69d2e3d0343 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:50:46 -0700 Subject: [PATCH 13/19] nit --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 86d99a3..f2ba2de 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -68,7 +68,7 @@ jobs: - name: Build package run: | - bazel build --define TARGET_VERSION="${TARGET_PYTHON}" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + 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 with: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index e320c2c..d146fe5 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -62,7 +62,7 @@ jobs: - name: Build package run: | - bazel build --define TARGET_VERSION="${TARGET_PYTHON}" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + bazel build --define TARGET_VERSION="$(python -c "print(\"${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: From 6049856319f0698840efa8b534b3707e3048d5d0 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:53:03 -0700 Subject: [PATCH 14/19] nit --- .github/workflows/stable-release-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index d146fe5..ef54fdd 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -62,11 +62,11 @@ jobs: - name: Build package run: | - bazel build --define TARGET_VERSION="$(python -c "print(\"${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel + 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 with: - name: python-wheels-${{ matrix.os }} + name: python-wheels-${{ matrix.os }}-{{ matrix.python-version }} path: ./bazel-bin/*.whl release-wheels: From 57dfb04ecb0d7d693c0c7391f16acacd5641c159 Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:55:26 -0700 Subject: [PATCH 15/19] nit --- .github/workflows/prerelease.yml | 4 +++- .github/workflows/stable-release-workflow.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f2ba2de..268a248 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -67,12 +67,14 @@ jobs: python _update_bazel_py_version.py $TARGET_PYTHON - name: Build package + 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 - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: - name: python-wheels-${{ matrix.os }} + name: python-wheels-${{ matrix.os }}-{{ matrix.python-version }} path: ./bazel-bin/*.whl release-wheels: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index ef54fdd..02e5f77 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -61,6 +61,8 @@ jobs: python _update_bazel_py_version.py $TARGET_PYTHON - name: Build package + 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 From b3a5b9c20f8e475edd5d10efa3e89ec3d4d6f83a Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:56:11 -0700 Subject: [PATCH 16/19] nit --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 268a248..2fda7a3 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -74,7 +74,7 @@ jobs: - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: - name: python-wheels-${{ matrix.os }}-{{ matrix.python-version }} + name: python-wheels-${{ matrix.os }}-${{ matrix.python-version }} path: ./bazel-bin/*.whl release-wheels: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 02e5f77..2a4c585 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -68,7 +68,7 @@ jobs: - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 with: - name: python-wheels-${{ matrix.os }}-{{ matrix.python-version }} + name: python-wheels-${{ matrix.os }}-${{ matrix.python-version }} path: ./bazel-bin/*.whl release-wheels: From 151555f9c4705a77932b8ab99675e639ec85f9ef Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 14:59:51 -0700 Subject: [PATCH 17/19] make environment based on python-version --- .github/workflows/prerelease.yml | 2 +- .github/workflows/stable-release-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 2fda7a3..d308d45 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,7 +45,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5 with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} - uses: actions/download-artifact@master with: diff --git a/.github/workflows/stable-release-workflow.yml b/.github/workflows/stable-release-workflow.yml index 2a4c585..e9bb6fa 100644 --- a/.github/workflows/stable-release-workflow.yml +++ b/.github/workflows/stable-release-workflow.yml @@ -39,7 +39,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5 with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} - uses: actions/download-artifact@master with: From 27f5b697c3094b774f178e31f93f47bcc7f4262c Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Tue, 15 Jul 2025 15:01:15 -0700 Subject: [PATCH 18/19] remove test trigger --- .github/workflows/prerelease.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index d308d45..7165063 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -5,10 +5,6 @@ on: branches: - main - pull_request: - branches: - - main - permissions: contents: read From fb869b8c26e8ed6d230779588d4a9eb12361e3e2 Mon Sep 17 00:00:00 2001 From: Noureldin Date: Tue, 15 Jul 2025 15:21:28 -0700 Subject: [PATCH 19/19] Update _version.py --- _version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_version.py b/_version.py index 269365e..646b797 100644 --- a/_version.py +++ b/_version.py @@ -1,6 +1,6 @@ # Version of Tesseract's python distribution -__version__ = '0.1.2' +__version__ = '0.1.1' if __name__ == '__main__': print(__version__)