diff --git a/.github/workflows/_build-maturin.yml b/.github/workflows/_build-maturin.yml new file mode 100644 index 00000000000..3ae52b558e5 --- /dev/null +++ b/.github/workflows/_build-maturin.yml @@ -0,0 +1,154 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT + +name: Build wheels with maturin + +on: + workflow_call: + inputs: + package: + description: Package name used for the uploaded artifact. + required: true + type: string + version: + description: Package version being built. + required: true + type: string + repository: + description: Upstream owner/repository to check out. + required: true + type: string + ref: + description: Upstream ref to check out. + required: true + type: string + artifact-tag: + description: Platform or ABI suffix used in the uploaded artifact name. + required: true + type: string + timeout-minutes: + description: Build job timeout in minutes. + required: false + default: 60 + type: number + checkout-submodules: + description: actions/checkout submodules value (false, true, or recursive). + required: false + default: 'false' + type: string + maturin-args: + description: Arguments passed to maturin build, excluding the output directory. + required: true + type: string + maturin-target: + description: Rust target passed to maturin-action. + required: false + default: riscv64gc-unknown-linux-gnu + type: string + maturin-manylinux: + description: Manylinux compatibility level passed to maturin-action. + required: false + default: '2_39' + type: string + maturin-version: + description: Maturin version installed by maturin-action. + required: false + default: '' + type: string + maturin-working-directory: + description: Source-relative directory in which maturin runs. + required: false + default: . + type: string + maturin-output-directory: + description: Working-directory-relative wheel output directory. + required: false + default: dist + type: string + maturin-before-script-linux: + description: Script run by maturin-action before the Linux build. + required: false + default: git config --global --add safe.directory "*" + type: string + cargo-profile-release-lto: + description: CARGO_PROFILE_RELEASE_LTO value exported for the build. + required: false + default: '' + type: string + cargo-profile-release-codegen-units: + description: CARGO_PROFILE_RELEASE_CODEGEN_UNITS value exported for the build. + required: false + default: '' + type: string + +jobs: + build_wheel: + name: Build ${{ inputs.package }} ${{ inputs.version }} ${{ inputs['artifact-tag'] }} + runs-on: ubuntu-24.04-riscv + timeout-minutes: ${{ inputs['timeout-minutes'] }} + steps: + - name: Checkout ${{ inputs.repository }} ${{ inputs.ref }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + submodules: ${{ inputs['checkout-submodules'] }} + persist-credentials: false + + - name: Validate maturin configuration + env: + ARGS: ${{ inputs['maturin-args'] }} + WORKING_DIRECTORY: ${{ inputs['maturin-working-directory'] }} + OUTPUT_DIRECTORY: ${{ inputs['maturin-output-directory'] }} + run: | + python3 - <<'PY' + import os + import shlex + + args = shlex.split(os.environ["ARGS"]) + if any( + arg in {"-o", "--out"} + or arg.startswith("--out=") + or (arg.startswith("-o") and not arg.startswith("--")) + for arg in args + ): + raise SystemExit("maturin-args must not set the output directory") + PY + for directory in "$WORKING_DIRECTORY" "$OUTPUT_DIRECTORY"; do + case "$directory" in + ''|/*|../*|*/../*|*/..) + echo "directory must be a non-empty relative path without ..: $directory" >&2 + exit 1 + ;; + esac + done + + - name: Configure Cargo release profile + if: inputs['cargo-profile-release-lto'] != '' || inputs['cargo-profile-release-codegen-units'] != '' + env: + LTO: ${{ inputs['cargo-profile-release-lto'] }} + CODEGEN_UNITS: ${{ inputs['cargo-profile-release-codegen-units'] }} + run: | + if [ -n "$LTO" ]; then + echo "CARGO_PROFILE_RELEASE_LTO=$LTO" >> "$GITHUB_ENV" + fi + if [ -n "$CODEGEN_UNITS" ]; then + echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=$CODEGEN_UNITS" >> "$GITHUB_ENV" + fi + + - name: Build wheel + uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 + with: + command: build + maturin-version: ${{ inputs['maturin-version'] }} + target: ${{ inputs['maturin-target'] }} + args: ${{ inputs['maturin-args'] }} --out ${{ inputs['maturin-output-directory'] }} + working-directory: ${{ inputs['maturin-working-directory'] }} + manylinux: ${{ inputs['maturin-manylinux'] }} + before-script-linux: ${{ inputs['maturin-before-script-linux'] }} + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ${{ inputs.package }}-${{ inputs.version }}-${{ inputs['artifact-tag'] }} + path: ${{ inputs['maturin-working-directory'] }}/${{ inputs['maturin-output-directory'] }}/*.whl + if-no-files-found: error diff --git a/.github/workflows/build-ast-grep-cli.yml b/.github/workflows/build-ast-grep-cli.yml index ef77e3730ec..d2be3661763 100644 --- a/.github/workflows/build-ast-grep-cli.yml +++ b/.github/workflows/build-ast-grep-cli.yml @@ -49,38 +49,18 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build ast-grep-cli ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - AST_GREP_CLI_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ast-grep v${{ env.AST_GREP_CLI_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ast-grep/ast-grep - ref: ${{ env.AST_GREP_CLI_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`, manifest-path = crates/cli/Cargo.toml: - # the wheel is one compiled executable (actually two: ast-grep and its sg - # alias) with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ast-grep-cli-${{ env.AST_GREP_CLI_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`, manifest-path = crates/cli/Cargo.toml: + # the wheel is one compiled executable (actually two: ast-grep and its sg + # alias) with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: ast-grep-cli + version: ${{ matrix.version }} + repository: ast-grep/ast-grep + ref: ${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked test_wheel: name: Test ast-grep-cli ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-bauplan.yml b/.github/workflows/build-bauplan.yml index c60ccea934e..a4f0db1b9c2 100644 --- a/.github/workflows/build-bauplan.yml +++ b/.github/workflows/build-bauplan.yml @@ -49,45 +49,26 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build bauplan ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 1440 - - env: - BAUPLAN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout bauplan v${{ env.BAUPLAN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: BauplanLabs/bauplan - ref: v${{ env.BAUPLAN_VERSION }} - persist-credentials: false - - # Upstream builds the CLI on the runner and downloads a protoc release, - # which ships no riscv64 binary; both happen in the manylinux container - # here, with protoc from Rocky 10's CRB repo. - - name: Build wheels - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - target: riscv64gc-unknown-linux-gnu - args: >- - --release --out dist - -i python3.12 python3.13 python3.14 - manylinux: '2_39' - before-script-linux: | - set -euo pipefail - git config --global --add safe.directory "*" - yum install -y protobuf-compiler protobuf-devel - cargo build --release --bin bauplan - rm -f python/data/scripts/.gitkeep python/data/scripts/.gitignore - cp target/release/bauplan python/data/scripts/ - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: bauplan-${{ env.BAUPLAN_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # Upstream builds the CLI on the runner and downloads a protoc release, + # which ships no riscv64 binary; both happen in the manylinux container + # here, with protoc from Rocky 10's CRB repo. + uses: $/.github/workflows/_build-maturin.yml + with: + package: bauplan + version: ${{ matrix.version }} + repository: BauplanLabs/bauplan + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 1440 + maturin-args: >- + --release -i python3.12 python3.13 python3.14 + maturin-before-script-linux: | + set -euo pipefail + git config --global --add safe.directory "*" + yum install -y protobuf-compiler protobuf-devel + cargo build --release --bin bauplan + rm -f python/data/scripts/.gitkeep python/data/scripts/.gitignore + cp target/release/bauplan python/data/scripts/ test_wheels: name: Test bauplan ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-cargo-lambda.yml b/.github/workflows/build-cargo-lambda.yml index 76ea22baf35..4aef11d7660 100644 --- a/.github/workflows/build-cargo-lambda.yml +++ b/.github/workflows/build-cargo-lambda.yml @@ -49,38 +49,18 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build cargo-lambda ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - CARGO_LAMBDA_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cargo-lambda v${{ env.CARGO_LAMBDA_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: cargo-lambda/cargo-lambda - ref: v${{ env.CARGO_LAMBDA_VERSION }} - persist-credentials: false - - # Upstream cross-builds static musl in x86_64 rust-musl-cross images; build glibc - # natively, overriding pyproject's maturin<1.9 pin, which has no riscv64 asset (gotcha 344). - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - maturin-version: '1.15.0' - command: build - target: riscv64gc-unknown-linux-gnu - args: --release -o dist --strip -m crates/cargo-lambda-cli/Cargo.toml - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cargo-lambda-${{ env.CARGO_LAMBDA_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # Upstream cross-builds static musl in x86_64 rust-musl-cross images; build glibc + # natively, overriding pyproject's maturin<1.9 pin, which has no riscv64 asset (gotcha 344). + uses: $/.github/workflows/_build-maturin.yml + with: + package: cargo-lambda + version: ${{ matrix.version }} + repository: cargo-lambda/cargo-lambda + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --strip -m crates/cargo-lambda-cli/Cargo.toml + maturin-version: '1.15.0' test_wheel: name: Test cargo-lambda ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-cargo-xwin.yml b/.github/workflows/build-cargo-xwin.yml index 2cad996c158..822b3b9bbae 100644 --- a/.github/workflows/build-cargo-xwin.yml +++ b/.github/workflows/build-cargo-xwin.yml @@ -51,39 +51,19 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build cargo-xwin ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - CARGO_XWIN_VERSION: ${{ matrix.version }} - CARGO_PROFILE_RELEASE_LTO: "true" - CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1" - - steps: - - name: Checkout cargo-xwin v${{ env.CARGO_XWIN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rust-cross/cargo-xwin - ref: v${{ env.CARGO_XWIN_VERSION }} - persist-credentials: false - - # Upstream builds static *-unknown-linux-musl binaries in rust-musl-cross - # images, which have no riscv64 variant, so build glibc. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release -o dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cargo-xwin-${{ env.CARGO_XWIN_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # Upstream builds static *-unknown-linux-musl binaries in rust-musl-cross + # images, which have no riscv64 variant, so build glibc. + uses: $/.github/workflows/_build-maturin.yml + with: + package: cargo-xwin + version: ${{ matrix.version }} + repository: rust-cross/cargo-xwin + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release + cargo-profile-release-lto: "true" + cargo-profile-release-codegen-units: "1" test_wheel: name: Test cargo-xwin ${{ matrix.version }} (${{ matrix.cross-compiler }}) diff --git a/.github/workflows/build-cargo-zigbuild.yml b/.github/workflows/build-cargo-zigbuild.yml index 17c700ae463..ab525340434 100644 --- a/.github/workflows/build-cargo-zigbuild.yml +++ b/.github/workflows/build-cargo-zigbuild.yml @@ -51,37 +51,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build cargo-zigbuild ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - CARGO_ZIGBUILD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cargo-zigbuild v${{ env.CARGO_ZIGBUILD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rust-cross/cargo-zigbuild - ref: v${{ env.CARGO_ZIGBUILD_VERSION }} - persist-credentials: false - - # Upstream builds static *-unknown-linux-musl binaries in rust-musl-cross - # images; rustup ships no riscv64 musl host toolchain, so build glibc. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release -o dist --strip - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cargo-zigbuild-${{ env.CARGO_ZIGBUILD_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # Upstream builds static *-unknown-linux-musl binaries in rust-musl-cross + # images; rustup ships no riscv64 musl host toolchain, so build glibc. + uses: $/.github/workflows/_build-maturin.yml + with: + package: cargo-zigbuild + version: ${{ matrix.version }} + repository: rust-cross/cargo-zigbuild + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --strip test_wheel: name: Test cargo-zigbuild ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-djade.yml b/.github/workflows/build-djade.yml index 79df7755db6..3e6d064ddb4 100644 --- a/.github/workflows/build-djade.yml +++ b/.github/workflows/build-djade.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build djade ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - DJADE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout djade v${{ env.DJADE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: adamchainz/djade - ref: ${{ env.DJADE_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: djade-${{ env.DJADE_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: djade + version: ${{ matrix.version }} + repository: adamchainz/djade + ref: ${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked test_wheel: name: Test djade ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-fest-mutate.yml b/.github/workflows/build-fest-mutate.yml index 82dbbbec0e3..76b4d42c705 100644 --- a/.github/workflows/build-fest-mutate.yml +++ b/.github/workflows/build-fest-mutate.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build fest-mutate ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 - - env: - FEST_MUTATE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fest v${{ env.FEST_MUTATE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: sakost/fest - ref: v${{ env.FEST_MUTATE_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fest-mutate-${{ env.FEST_MUTATE_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: fest-mutate + version: ${{ matrix.version }} + repository: sakost/fest + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 120 + maturin-args: --release --locked test_wheel: name: Test fest-mutate ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-git-cliff.yml b/.github/workflows/build-git-cliff.yml index f77cf9ff2f3..bc24658f6c9 100644 --- a/.github/workflows/build-git-cliff.yml +++ b/.github/workflows/build-git-cliff.yml @@ -49,39 +49,19 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build git-cliff ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - GIT_CLIFF_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout git-cliff v${{ env.GIT_CLIFF_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: orhun/git-cliff - ref: v${{ env.GIT_CLIFF_VERSION }} - persist-credentials: false - - # `working-directory: pypi` mirrors upstream's own cd.yml exactly: pypi/pyproject.toml - # ships in the tag and its `[tool.maturin] manifest-path = "../git-cliff/Cargo.toml"` - # resolves relative to that file. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - working-directory: pypi - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: git-cliff-${{ env.GIT_CLIFF_VERSION }}-manylinux_riscv64 - path: pypi/dist/*.whl - if-no-files-found: error + # `working-directory: pypi` mirrors upstream's own cd.yml exactly: pypi/pyproject.toml + # ships in the tag and its `[tool.maturin] manifest-path = "../git-cliff/Cargo.toml"` + # resolves relative to that file. + uses: $/.github/workflows/_build-maturin.yml + with: + package: git-cliff + version: ${{ matrix.version }} + repository: orhun/git-cliff + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked + maturin-working-directory: pypi test_wheel: name: Test git-cliff ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-kfnetlist.yml b/.github/workflows/build-kfnetlist.yml index 99017968a81..7725f2f0a96 100644 --- a/.github/workflows/build-kfnetlist.yml +++ b/.github/workflows/build-kfnetlist.yml @@ -50,36 +50,16 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build kfnetlist ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 - - env: - KFNETLIST_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout kfnetlist v${{ env.KFNETLIST_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: gdsfactory/kfnetlist - ref: v${{ env.KFNETLIST_VERSION }} - persist-credentials: false - - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - manylinux: '2_39' - # pyo3 carries abi3-py312 in Cargo.toml; upstream gets 3.12 from setup-python. - args: -i python3.12 --release --out dist - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: kfnetlist-${{ env.KFNETLIST_VERSION }}-cp312-abi3-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-maturin.yml + with: + package: kfnetlist + version: ${{ matrix.version }} + repository: gdsfactory/kfnetlist + ref: v${{ matrix.version }} + artifact-tag: cp312-abi3-manylinux_riscv64 + timeout-minutes: 60 + # pyo3 carries abi3-py312 in Cargo.toml; upstream gets 3.12 from setup-python. + maturin-args: -i python3.12 --release test_wheel: name: Test kfnetlist ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-migrate-to-uv.yml b/.github/workflows/build-migrate-to-uv.yml index 551b3b1e520..e077e561097 100644 --- a/.github/workflows/build-migrate-to-uv.yml +++ b/.github/workflows/build-migrate-to-uv.yml @@ -49,38 +49,18 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build migrate-to-uv ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - MIGRATE_TO_UV_VERSION: ${{ matrix.version }} - - steps: - # Upstream tags have no `v` prefix (`0.12.0`, not `v0.12.0`). - - name: Checkout migrate-to-uv ${{ env.MIGRATE_TO_UV_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: osprey-oss/migrate-to-uv - ref: ${{ env.MIGRATE_TO_UV_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: migrate-to-uv-${{ env.MIGRATE_TO_UV_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # Upstream tags have no `v` prefix (`0.12.0`, not `v0.12.0`). + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: migrate-to-uv + version: ${{ matrix.version }} + repository: osprey-oss/migrate-to-uv + ref: ${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked test_wheel: name: Test migrate-to-uv ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-nb-clean.yml b/.github/workflows/build-nb-clean.yml index cb52448e177..e1c342d2827 100644 --- a/.github/workflows/build-nb-clean.yml +++ b/.github/workflows/build-nb-clean.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build nb-clean ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 - - env: - NB_CLEAN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout nb-clean v${{ env.NB_CLEAN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: srstevenson/nb-clean - ref: v${{ env.NB_CLEAN_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: nb-clean-${{ env.NB_CLEAN_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: nb-clean + version: ${{ matrix.version }} + repository: srstevenson/nb-clean + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 120 + maturin-args: --release --locked test_wheel: name: Test nb-clean ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-openalgo.yml b/.github/workflows/build-openalgo.yml index aefe4326a93..e532ef5b993 100644 --- a/.github/workflows/build-openalgo.yml +++ b/.github/workflows/build-openalgo.yml @@ -76,37 +76,20 @@ jobs: build_wheel: needs: [setup] if: needs.setup.outputs.versions != '[]' - name: Build openalgo ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - - env: - OPENALGO_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout openalgo v${{ env.OPENALGO_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: marketcalls/openalgo-python-library - ref: v${{ env.OPENALGO_VERSION }} - persist-credentials: false - - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - target: riscv64gc-unknown-linux-gnu - manylinux: '2_39' - args: --release --out dist --interpreter python3.12 -m rust/oa_py/Cargo.toml - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: openalgo-${{ env.OPENALGO_VERSION }}-cp312-abi3-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-maturin.yml + with: + package: openalgo + version: ${{ matrix.version }} + repository: marketcalls/openalgo-python-library + ref: v${{ matrix.version }} + artifact-tag: cp312-abi3-manylinux_riscv64 + timeout-minutes: 90 + maturin-args: --release --interpreter python3.12 -m rust/oa_py/Cargo.toml + maturin-before-script-linux: '' test_wheel: needs: [setup, build_wheel] diff --git a/.github/workflows/build-prek.yml b/.github/workflows/build-prek.yml index cac54a3cad4..ae1e6c80898 100644 --- a/.github/workflows/build-prek.yml +++ b/.github/workflows/build-prek.yml @@ -49,40 +49,20 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build prek ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - PREK_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout prek v${{ env.PREK_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: j178/prek - ref: v${{ env.PREK_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - # self-update matches the feature set upstream's own published PyPI - # wheels are built with (build-release-binaries.yml's linux/linux-arm jobs). - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - maturin-version: v1.14.1 - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist --features self-update - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: prek-${{ env.PREK_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + # self-update matches the feature set upstream's own published PyPI + # wheels are built with (build-release-binaries.yml's linux/linux-arm jobs). + uses: $/.github/workflows/_build-maturin.yml + with: + package: prek + version: ${{ matrix.version }} + repository: j178/prek + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked --features self-update + maturin-version: v1.14.1 test_wheel: name: Test prek ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-pyrefly.yml b/.github/workflows/build-pyrefly.yml index d51db65903b..08c5c6229d1 100644 --- a/.github/workflows/build-pyrefly.yml +++ b/.github/workflows/build-pyrefly.yml @@ -49,38 +49,18 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build pyrefly ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - PYREFLY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyrefly ${{ env.PYREFLY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: facebook/pyrefly - ref: ${{ env.PYREFLY_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - working-directory: pyrefly - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyrefly-${{ env.PYREFLY_VERSION }}-manylinux_riscv64 - path: pyrefly/dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: pyrefly + version: ${{ matrix.version }} + repository: facebook/pyrefly + ref: ${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked + maturin-working-directory: pyrefly test_wheel: name: Test pyrefly ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-rumdl.yml b/.github/workflows/build-rumdl.yml index 16bc0120fcb..b60e88ad798 100644 --- a/.github/workflows/build-rumdl.yml +++ b/.github/workflows/build-rumdl.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build rumdl ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 - - env: - RUMDL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout rumdl v${{ env.RUMDL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rvben/rumdl - ref: v${{ env.RUMDL_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: rumdl-${{ env.RUMDL_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: rumdl + version: ${{ matrix.version }} + repository: rvben/rumdl + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 120 + maturin-args: --release --locked test_wheel: name: Test rumdl ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-snapper-fmt.yml b/.github/workflows/build-snapper-fmt.yml index 2fe94f8697b..fc5a4c37570 100644 --- a/.github/workflows/build-snapper-fmt.yml +++ b/.github/workflows/build-snapper-fmt.yml @@ -49,49 +49,30 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build snapper-fmt ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - SNAPPER_FMT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout snapper v${{ env.SNAPPER_FMT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: TurtleTech-ehf/snapper - ref: v${{ env.SNAPPER_FMT_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - # Default features (incl. `pandoc`) match upstream's own `pypi.yml` build; - # `pandoc` only adds a runtime dlopen path (CLAUDE.md gotcha 541 nearby) -- - # `pandoc-colink`, the feature that needs a GHC-built static archive, is - # off by default and not what upstream publishes either. - # tract-onnx's build.rs compiles onnx.proto3 through prost-build 0.9, - # which bundles protoc only for x86/aarch64 targets and otherwise needs - # `protoc` on PATH; Rocky 10's CRB repo (enabled in manylinux_2_39) has - # it. onnx.proto3 imports no well-known types, and prost-build passes - # its own bundled include dir, so PROTOC_INCLUDE is not needed. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist - manylinux: '2_39' - before-script-linux: | - set -euo pipefail - git config --global --add safe.directory "*" - yum install -y protobuf-compiler - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: snapper-fmt-${{ env.SNAPPER_FMT_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + # Default features (incl. `pandoc`) match upstream's own `pypi.yml` build; + # `pandoc` only adds a runtime dlopen path (CLAUDE.md gotcha 541 nearby) -- + # `pandoc-colink`, the feature that needs a GHC-built static archive, is + # off by default and not what upstream publishes either. + # tract-onnx's build.rs compiles onnx.proto3 through prost-build 0.9, + # which bundles protoc only for x86/aarch64 targets and otherwise needs + # `protoc` on PATH; Rocky 10's CRB repo (enabled in manylinux_2_39) has + # it. onnx.proto3 imports no well-known types, and prost-build passes + # its own bundled include dir, so PROTOC_INCLUDE is not needed. + uses: $/.github/workflows/_build-maturin.yml + with: + package: snapper-fmt + version: ${{ matrix.version }} + repository: TurtleTech-ehf/snapper + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked + maturin-before-script-linux: | + set -euo pipefail + git config --global --add safe.directory "*" + yum install -y protobuf-compiler test_wheel: name: Test snapper-fmt ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-squawk-cli.yml b/.github/workflows/build-squawk-cli.yml index fe6b35df7dc..cf942173f31 100644 --- a/.github/workflows/build-squawk-cli.yml +++ b/.github/workflows/build-squawk-cli.yml @@ -49,44 +49,25 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build squawk-cli ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 1440 - - env: - SQUAWK_CLI_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout squawk v${{ env.SQUAWK_CLI_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: sbdchd/squawk - ref: v${{ env.SQUAWK_CLI_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - # `maturin-version` left unset because upstream's v1.7.1 pin predates - # maturin's riscv64 release assets (gotcha 344). - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - working-directory: crates/squawk - args: --release --locked --out dist - manylinux: '2_39' - # `perl-core` replaces upstream's `perl-IPC-Cmd`: Rocky 10 also lacks - # FindBin, which openssl-src's vendored OpenSSL build needs. - before-script-linux: | - git config --global --add safe.directory "*" - dnf -y install perl-core - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: squawk-cli-${{ env.SQUAWK_CLI_VERSION }}-manylinux_riscv64 - path: crates/squawk/dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + # `maturin-version` left unset because upstream's v1.7.1 pin predates + # maturin's riscv64 release assets (gotcha 344). + uses: $/.github/workflows/_build-maturin.yml + with: + package: squawk-cli + version: ${{ matrix.version }} + repository: sbdchd/squawk + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 1440 + maturin-args: --release --locked + maturin-working-directory: crates/squawk + # `perl-core` replaces upstream's `perl-IPC-Cmd`: Rocky 10 also lacks + # FindBin, which openssl-src's vendored OpenSSL build needs. + maturin-before-script-linux: | + git config --global --add safe.directory "*" + dnf -y install perl-core test_wheel: name: Test squawk-cli ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-typos.yml b/.github/workflows/build-typos.yml index dec23ac4429..b22274a6fd2 100644 --- a/.github/workflows/build-typos.yml +++ b/.github/workflows/build-typos.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build typos ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - TYPOS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout typos v${{ env.TYPOS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: crate-ci/typos - ref: v${{ env.TYPOS_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist --manifest-path crates/typos-cli/Cargo.toml - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: typos-${{ env.TYPOS_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: typos + version: ${{ matrix.version }} + repository: crate-ci/typos + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked --manifest-path crates/typos-cli/Cargo.toml test_wheel: name: Test typos ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-zizmor.yml b/.github/workflows/build-zizmor.yml index 794da3d6c13..431e560199a 100644 --- a/.github/workflows/build-zizmor.yml +++ b/.github/workflows/build-zizmor.yml @@ -49,37 +49,17 @@ jobs: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - name: Build zizmor ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - ZIZMOR_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout zizmor v${{ env.ZIZMOR_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: zizmorcore/zizmor - ref: v${{ env.ZIZMOR_VERSION }} - persist-credentials: false - - # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable - # with no ABI tag, so a single native build covers every interpreter. - - name: Build wheel - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: - command: build - target: riscv64gc-unknown-linux-gnu - args: --release --locked --out dist --manifest-path crates/zizmor/Cargo.toml - manylinux: '2_39' - before-script-linux: git config --global --add safe.directory "*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: zizmor-${{ env.ZIZMOR_VERSION }}-manylinux_riscv64 - path: dist/*.whl - if-no-files-found: error + # `[tool.maturin] bindings = "bin"`: the wheel is one compiled executable + # with no ABI tag, so a single native build covers every interpreter. + uses: $/.github/workflows/_build-maturin.yml + with: + package: zizmor + version: ${{ matrix.version }} + repository: zizmorcore/zizmor + ref: v${{ matrix.version }} + artifact-tag: manylinux_riscv64 + timeout-minutes: 360 + maturin-args: --release --locked --manifest-path crates/zizmor/Cargo.toml test_wheel: name: Test zizmor ${{ matrix.version }} on Python ${{ matrix.python-version }}