From 809c4b1c64914e30e3913e0be5a71d294ab33ebe Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 11 Nov 2024 23:29:51 +0000 Subject: [PATCH 1/5] what could go wrong --- .github/workflows/publish.yml | 2 +- .github/workflows/test_publish.yml | 2 ++ tools/load_build_targets.py | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f934d8..738be92 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -113,7 +113,7 @@ jobs: - run: python -m pip install PyYAML click - run: echo $LOAD_BUILD_TARGETS_SCRIPT | base64 --decode > load_build_targets.py env: - LOAD_BUILD_TARGETS_SCRIPT: aW1wb3J0IGpzb24KaW1wb3J0IG9zCmltcG9ydCByZQoKaW1wb3J0IGNsaWNrCmltcG9ydCB5YW1sCgpNQUNISU5FX1RZUEUgPSB7CiAgICAibGludXgiOiAidWJ1bnR1LWxhdGVzdCIsCiAgICAibWFjb3MiOiAibWFjb3MtMTIiLAogICAgIndpbmRvd3MiOiAid2luZG93cy1sYXRlc3QiLAp9Ck0xX1JVTk5FUiA9ICJtYWNvcy0xNCIKCkNJQldfQlVJTEQgPSBvcy5lbnZpcm9uLmdldCgiQ0lCV19CVUlMRCIsICIqIikKQ0lCV19BUkNIUyA9IG9zLmVudmlyb24uZ2V0KCJDSUJXX0FSQ0hTIiwgImF1dG8iKQoKCkBjbGljay5jb21tYW5kKCkKQGNsaWNrLm9wdGlvbigiLS10YXJnZXRzIiwgZGVmYXVsdD0iIikKZGVmIGxvYWRfYnVpbGRfdGFyZ2V0cyh0YXJnZXRzKToKICAgICIiIlNjcmlwdCB0byBsb2FkIGNpYnVpbGR3aGVlbCB0YXJnZXRzIGZvciBHaXRIdWIgQWN0aW9ucyB3b3JrZmxvdy4iIiIKICAgICMgTG9hZCBsaXN0IG9mIHRhcmdldHMKICAgIHRhcmdldHMgPSB5YW1sLmxvYWQodGFyZ2V0cywgTG9h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GQodGFyZ2V0KSwKICAgICAgICAiQ0lCV19BUkNIUyI6IGdldF9jaWJ3X2FyY2hzKHRhcmdldCksCiAgICAgICAgImFydGlmYWN0LW5hbWUiOiBnZXRfYXJ0aWZhY3RfbmFtZSh0YXJnZXQpLAogICAgICAgICoqZXh0cmFfdGFyZ2V0X2FyZ3MsCiAgICB9CgoKaWYgX19uYW1lX18gPT0gIl9fbWFpbl9fIjoKICAgIGxvYWRfYnVpbGRfdGFyZ2V0cygpCg== - id: set-outputs run: python load_build_targets.py --targets "${{ inputs.targets }}" shell: sh diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index c4e6c64..a67379c 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -32,6 +32,8 @@ jobs: - cp3?-win_amd64 - cp312-manylinux_aarch64 - cp313-manylinux_x86_64 + - target: cp313-manylinux_x86_64 + runs-on: this-is-nonsense timeout-minutes: 30 release_sdist_only: uses: ./.github/workflows/publish.yml diff --git a/tools/load_build_targets.py b/tools/load_build_targets.py index 3426df2..ea8ccfd 100644 --- a/tools/load_build_targets.py +++ b/tools/load_build_targets.py @@ -66,12 +66,17 @@ def get_artifact_name(target): def get_matrix_item(target): + extra_target_args = {} + if isinstance(target, dict): + extra_target_args = target + target = extra_target_args.pop("target") return { "target": target, "os": get_os(target), "CIBW_BUILD": get_cibw_build(target), "CIBW_ARCHS": get_cibw_archs(target), "artifact-name": get_artifact_name(target), + **extra_target_args, } From 5c20b2ae5882dba0b273b0693a0236c2df98e6f0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 11 Nov 2024 23:37:48 +0000 Subject: [PATCH 2/5] more --- .github/workflows/publish.yml | 4 ++-- tools/load_build_targets.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 738be92..d797729 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -113,7 +113,7 @@ jobs: - run: python -m pip install PyYAML click - run: echo $LOAD_BUILD_TARGETS_SCRIPT | base64 --decode > load_build_targets.py env: - LOAD_BUILD_TARGETS_SCRIPT: aW1wb3J0IGpzb24KaW1wb3J0IG9zCmltcG9ydCByZQoKaW1wb3J0IGNsaWNrCmltcG9ydCB5YW1sCgpNQUNISU5FX1RZUEUgPSB7CiAgICAibGludXgiOiAidWJ1bnR1LWxhdGVzdCIsCiAgICAibWFjb3MiOiAibWFjb3MtMTIiLAogICAgIndpbmRvd3MiOiAid2luZG93cy1sYXRlc3QiLAp9Ck0xX1JVTk5FUiA9ICJtYWNvcy0xNCIKCkNJQldfQlVJTEQgPSBvcy5lbnZpcm9uLmdldCgiQ0lCV19CVUlMRCIsICIqIikKQ0lCV19BUkNIUyA9IG9zLmVudmlyb24uZ2V0KCJDSUJXX0FSQ0hTIiwgImF1dG8iKQoKCkBjbGljay5jb21tYW5kKCkKQGNsaWNrLm9wdGlvbigiLS10YXJnZXRzIiwgZGVmYXVsdD0iIikKZGVmIGxvYWRfYnVpbGRfdGFyZ2V0cyh0YXJnZXRzKToKICAgICIiIlNjcmlwdCB0byBsb2FkIGNpYnVpbGR3aGVlbCB0YXJnZXRzIGZvciBHaXRIdWIgQWN0aW9ucyB3b3JrZmxvdy4iIiIKICAgICMgTG9hZCBsaXN0IG9mIHRhcmdldHMKICAgIHRhcmdldHMgPSB5YW1sLmxvYWQodGFyZ2V0cywgTG9hZGVyPXlhbWwuQmFzZUxvYWRlcikKICAgIHByaW50KGpzb24uZHVtcHModGFyZ2V0cywgaW5kZW50PTIpKQoKICAgICMgQ3JlYXRlIG1hdHJpeAogICAgbWF0cml4ID0geyJpbmNsdWRlIjogW119CiAgICBmb3IgdGFyZ2V0IGluIHRhcmdldHM6CiAgICAgICAgbWF0cml4WyJpbmNsdWRlIl0uYXBwZW5kKGdldF9tYXRyaXhfaXRlbSh0YXJnZXQpKQoKICAgICMgT3V0cHV0IG1hdHJpeAogICAgcHJpbnQoanNvbi5kdW1w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ModGFyZ2V0KSwKICAgICAgICAiYXJ0aWZhY3QtbmFtZSI6IGdldF9hcnRpZmFjdF9uYW1lKHRhcmdldCksCiAgICAgICAgKipleHRyYV90YXJnZXRfYXJncywKICAgIH0KCgppZiBfX25hbWVfXyA9PSAiX19tYWluX18iOgogICAgbG9hZF9idWlsZF90YXJnZXRzKCkK - id: set-outputs run: python load_build_targets.py --targets "${{ inputs.targets }}" shell: sh @@ -132,7 +132,7 @@ jobs: build_wheels: name: Build ${{ matrix.target }} wheels needs: [targets] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.runs-on }} timeout-minutes: ${{ inputs.timeout-minutes }} strategy: fail-fast: ${{ inputs.fail-fast }} diff --git a/tools/load_build_targets.py b/tools/load_build_targets.py index ea8ccfd..48dbafa 100644 --- a/tools/load_build_targets.py +++ b/tools/load_build_targets.py @@ -72,7 +72,7 @@ def get_matrix_item(target): target = extra_target_args.pop("target") return { "target": target, - "os": get_os(target), + "runs-on": get_os(target), "CIBW_BUILD": get_cibw_build(target), "CIBW_ARCHS": get_cibw_archs(target), "artifact-name": get_artifact_name(target), From 04bc7fefb13abb3ad1e61fdd920b661979ed8751 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 11 Nov 2024 23:41:42 +0000 Subject: [PATCH 3/5] whoot --- .github/workflows/test_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index a67379c..59f6081 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -32,8 +32,8 @@ jobs: - cp3?-win_amd64 - cp312-manylinux_aarch64 - cp313-manylinux_x86_64 - - target: cp313-manylinux_x86_64 - runs-on: this-is-nonsense + - target: cp311-manylinux_x86_64 + runs-on: ubuntu-latest timeout-minutes: 30 release_sdist_only: uses: ./.github/workflows/publish.yml From 3c9cff1d92b1c84853fe51d2dbb38143dbaa9677 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 12 Nov 2024 21:44:50 +0000 Subject: [PATCH 4/5] uname -m ?! --- .github/workflows/publish.yml | 9 +++++++-- tools/load_build_targets.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d797729..274fb08 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -113,7 +113,7 @@ jobs: - run: python -m pip install PyYAML click - run: echo $LOAD_BUILD_TARGETS_SCRIPT | base64 --decode > load_build_targets.py env: - LOAD_BUILD_TARGETS_SCRIPT: aW1wb3J0IGpzb24KaW1wb3J0IG9zCmltcG9ydCByZQoKaW1wb3J0IGNsaWNrCmltcG9ydCB5YW1sCgpNQUNISU5FX1RZUEUgPSB7CiAgICAibGludXgiOiAidWJ1bnR1LWxhdGVzdCIsCiAgICAibWFjb3MiOiAibWFjb3MtMTIiLAogICAgIndpbmRvd3MiOiAid2luZG93cy1sYXRlc3QiLAp9Ck0xX1JVTk5FUiA9ICJtYWNvcy0xNCIKCkNJQldfQlVJTEQgPSBvcy5lbnZpcm9uLmdldCgiQ0lCV19CVUlMRCIsICIqIikKQ0lCV19BUkNIUyA9IG9zLmVudmlyb24uZ2V0KCJDSUJXX0FSQ0hTIiwgImF1dG8iKQoKCkBjbGljay5jb21tYW5kKCkKQGNsaWNrLm9wdGlvbigiLS10YXJnZXRzIiwgZGVmYXVsdD0iIikKZGVmIGxvYWRfYnVpbGRfdGFyZ2V0cyh0YXJnZXRzKToKICAgICIiIlNjcmlwdCB0byBsb2FkIGNpYnVpbGR3aGVlbCB0YXJnZXRzIGZvciBHaXRIdWIgQWN0aW9ucyB3b3JrZmxvdy4iIiIKICAgICMgTG9hZCBsaXN0IG9mIHRhcmdldHMKICAgIHRhcmdldHMgPSB5YW1sLmxvYWQodGFyZ2V0cywgTG9hZGVyPXlhbWwuQmFzZUxvYWRlcikKICAgIHByaW50KGpzb24uZHVtcHModGFyZ2V0cywgaW5kZW50PTIpK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FyZ2V0ID0gZXh0cmFfdGFyZ2V0X2FyZ3MucG9wKCJ0YXJnZXQiKQogICAgcmV0dXJuIHsKICAgICAgICAidGFyZ2V0IjogdGFyZ2V0LAogICAgICAgICJydW5zLW9uIjogZ2V0X29zKHRhcmdldCksCiAgICAgICAgIkNJQldfQlVJTEQiOiBnZXRfY2lid19idWlsZCh0YXJnZXQpLAogICAgICAgICJDSUJXX0FSQ0hTIjogZ2V0X2NpYndfYXJjaHModGFyZ2V0KSwKICAgICAgICAiYXJ0aWZhY3QtbmFtZSI6IGdldF9hcnRpZmFjdF9uYW1lKHRhcmdldCksCiAgICAgICAgKipleHRyYV90YXJnZXRfYXJncywKICAgIH0KCgppZiBfX25hbWVfXyA9PSAiX19tYWluX18iOgogICAgbG9hZF9idWlsZF90YXJnZXRzKCkK - id: set-outputs run: python load_build_targets.py --targets "${{ inputs.targets }}" shell: sh @@ -144,8 +144,13 @@ jobs: lfs: true submodules: ${{ inputs.submodules }} ref: ${{ inputs.checkout_ref }} + - name: Get machine arch + if: ${{ runner.os == 'Linux' }} + id: uname_m + run: | + echo "uname_m=$(uname -m)" >> "$GITHUB_OUTPUT" - name: Set up QEMU - if: ${{ matrix.CIBW_ARCHS == 'aarch64' }} + if: ${{ runner.os == 'Linux' && (matrix.CIBW_ARCHS != 'auto' || matrix.CIBW_ARCHS != steps.uname_m.outputs.uname_m) }} uses: docker/setup-qemu-action@v3 with: platforms: all diff --git a/tools/load_build_targets.py b/tools/load_build_targets.py index 48dbafa..ecd2fe4 100644 --- a/tools/load_build_targets.py +++ b/tools/load_build_targets.py @@ -53,7 +53,7 @@ def get_cibw_build(target): def get_cibw_archs(target): - for arch in ["aarch64", "arm64", "universal2"]: + for arch in ["aarch64", "ppc64le", "s390x", "armv7l", "arm64", "universal2"]: if target.endswith(arch): return arch return CIBW_ARCHS From aa15c18027e4039f8eff4755484b1866522c7453 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 12 Nov 2024 22:13:47 +0000 Subject: [PATCH 5/5] more uname --- .github/workflows/publish.yml | 2 +- .github/workflows/test_publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 274fb08..752db87 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -150,7 +150,7 @@ jobs: run: | echo "uname_m=$(uname -m)" >> "$GITHUB_OUTPUT" - name: Set up QEMU - if: ${{ runner.os == 'Linux' && (matrix.CIBW_ARCHS != 'auto' || matrix.CIBW_ARCHS != steps.uname_m.outputs.uname_m) }} + if: ${{ runner.os == 'Linux' && (matrix.CIBW_ARCHS != 'auto' && matrix.CIBW_ARCHS != steps.uname_m.outputs.uname_m) }} uses: docker/setup-qemu-action@v3 with: platforms: all diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index 59f6081..5f880e8 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -32,7 +32,7 @@ jobs: - cp3?-win_amd64 - cp312-manylinux_aarch64 - cp313-manylinux_x86_64 - - target: cp311-manylinux_x86_64 + - target: cp311-manylinux_ppc64le runs-on: ubuntu-latest timeout-minutes: 30 release_sdist_only: