diff --git a/.github/workflows/_build-cibuildwheel.yml b/.github/workflows/_build-cibuildwheel.yml index ad757b53526..5b7b578b80b 100644 --- a/.github/workflows/_build-cibuildwheel.yml +++ b/.github/workflows/_build-cibuildwheel.yml @@ -15,10 +15,15 @@ on: required: true type: string source: - description: Source provider (checkout or pypi-sdist). + description: Source provider (checkout, pypi-sdist, or artifact-sdist). required: false default: checkout type: string + source-artifact: + description: Artifact containing the sdist when source is artifact-sdist. + required: false + default: '' + type: string repository: description: Upstream owner/repository to check out when source is checkout. required: false @@ -272,6 +277,7 @@ jobs: - name: Validate source configuration env: SOURCE: ${{ inputs.source }} + SOURCE_ARTIFACT: ${{ inputs['source-artifact'] }} REPOSITORY: ${{ inputs.repository }} run: | case "$SOURCE" in @@ -279,6 +285,9 @@ jobs: test -n "$REPOSITORY" ;; pypi-sdist) ;; + artifact-sdist) + test -n "$SOURCE_ARTIFACT" + ;; *) echo "unsupported source: $SOURCE" >&2 exit 1 @@ -298,29 +307,24 @@ jobs: sparse-checkout: ${{ inputs['checkout-sparse-checkout'] }} persist-credentials: false - - name: Download and extract PyPI sdist + - name: Download PyPI sdist if: inputs.source == 'pypi-sdist' env: PACKAGE: ${{ inputs.package }} VERSION: ${{ inputs.version }} - DESTINATION: ${{ inputs.package }} + ARCHIVE_DIRECTORY: ${{ runner.temp }}/source-sdist run: | python3 - <<'PY' import hashlib import json import os - import shutil - import stat - import tarfile - import tempfile import urllib.parse import urllib.request - import zipfile - from pathlib import Path, PurePosixPath + from pathlib import Path distribution = os.environ["PACKAGE"] version = os.environ["VERSION"] - destination = Path(os.environ["GITHUB_WORKSPACE"], os.environ["DESTINATION"]) + archive_directory = Path(os.environ["ARCHIVE_DIRECTORY"]) api = "https://pypi.org/pypi/{}/{}/json".format( urllib.parse.quote(distribution, safe=""), urllib.parse.quote(version, safe=""), @@ -345,7 +349,8 @@ jobs: if filename != sdist["filename"]: raise SystemExit(f"unsafe PyPI sdist filename: {sdist['filename']}") - archive = Path(os.environ["RUNNER_TEMP"], filename) + archive_directory.mkdir() + archive = archive_directory / filename digest = hashlib.sha256() request = urllib.request.Request( sdist["url"], @@ -359,7 +364,39 @@ jobs: if digest.hexdigest() != expected: raise SystemExit(f"SHA-256 mismatch for {filename}") - staging = Path(tempfile.mkdtemp(prefix="pypi-sdist-", dir=os.environ["RUNNER_TEMP"])) + print(f"Downloaded {filename} with SHA-256 {expected}") + PY + + - name: Download sdist artifact + if: inputs.source == 'artifact-sdist' + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ inputs['source-artifact'] }} + path: ${{ runner.temp }}/source-sdist + + - name: Extract sdist + if: inputs.source == 'pypi-sdist' || inputs.source == 'artifact-sdist' + env: + ARCHIVE_DIRECTORY: ${{ runner.temp }}/source-sdist + DESTINATION: ${{ inputs.package }} + run: | + python3 - <<'PY' + import os + import shutil + import stat + import tarfile + import tempfile + import zipfile + from pathlib import Path, PurePosixPath + + archive_directory = Path(os.environ["ARCHIVE_DIRECTORY"]) + archives = [path for path in archive_directory.rglob("*") if path.is_file()] + if len(archives) != 1: + raise SystemExit( + f"expected exactly one sdist file in {archive_directory}, found {len(archives)}" + ) + archive = archives[0] + staging = Path(tempfile.mkdtemp(prefix="source-sdist-", dir=os.environ["RUNNER_TEMP"])) if tarfile.is_tarfile(archive): with tarfile.open(archive) as source: source.extractall(staging, filter="data") @@ -369,18 +406,19 @@ jobs: path = PurePosixPath(member.filename) mode = member.external_attr >> 16 if path.is_absolute() or ".." in path.parts or stat.S_ISLNK(mode): - raise SystemExit(f"unsafe path in {filename}: {member.filename}") + raise SystemExit(f"unsafe path in {archive.name}: {member.filename}") source.extractall(staging) else: - raise SystemExit(f"unsupported PyPI sdist archive: {filename}") + raise SystemExit(f"unsupported sdist archive: {archive.name}") roots = [path for path in staging.iterdir() if path.name != "__MACOSX"] if len(roots) != 1 or not roots[0].is_dir(): - raise SystemExit(f"expected one source directory in {filename}") + raise SystemExit(f"expected one source directory in {archive.name}") + destination = Path(os.environ["GITHUB_WORKSPACE"], os.environ["DESTINATION"]) if destination.exists(): raise SystemExit(f"source destination already exists: {destination}") shutil.move(roots[0], destination) - print(f"Downloaded {filename} with SHA-256 {expected}") + print(f"Extracted {archive.name} to {destination}") PY - name: Checkout patches diff --git a/.github/workflows/build-alienplatform.yml b/.github/workflows/build-alienplatform.yml index d659d58b8ec..44d5ca75cc0 100644 --- a/.github/workflows/build-alienplatform.yml +++ b/.github/workflows/build-alienplatform.yml @@ -46,7 +46,6 @@ env: # bump needs this updated by hand the same way (gotcha 103's shape). ALIENPLATFORM_REF: b33b2c81540e1faeee91ef682f3e022039420bac # Matches rust-toolchain.toml at that commit. - RUST_TOOLCHAIN: "nightly-2026-10-03" jobs: setup: @@ -81,7 +80,7 @@ jobs: # there, so no extra workspace checkout step is needed. cibw-before-all-linux: > curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_TOOLCHAIN }} + sh -s -- -y --profile minimal --default-toolchain nightly-2026-10-03 cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" RUSTUP_TOOLCHAIN=nightly-2026-10-03" # Base `import alienplatform` only loads the compiled extension: # grpcio/protobuf are the optional [worker] extra, imported lazily diff --git a/.github/workflows/build-cantera.yml b/.github/workflows/build-cantera.yml index 13c77a88fc3..71b2f32ccb2 100644 --- a/.github/workflows/build-cantera.yml +++ b/.github/workflows/build-cantera.yml @@ -92,7 +92,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: cantera-${{ env.CANTERA_VERSION }}-sdist + name: cantera-${{ matrix.version }}-sdist path: build/python_sdist/dist/*.tar.gz if-no-files-found: error @@ -100,230 +100,206 @@ jobs: needs: [setup, sdist] if: needs.setup.outputs.versions != '[]' name: Build cantera ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 480 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - CANTERA_VERSION: ${{ matrix.version }} - - steps: - - name: Download pre-built sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: cantera-${{ env.CANTERA_VERSION }}-sdist - path: ${{ runner.temp }}/sdist - - - name: Extract the sdist tarball - run: tar -xvf "$RUNNER_TEMP"/sdist/*.tar.gz --strip-components=1 - - - name: Download the test files - run: | - curl -fsSL "https://github.com/Cantera/cantera/archive/refs/tags/v${CANTERA_VERSION}.tar.gz" -o cantera.tar.gz - tar -xzf cantera.tar.gz --strip-components=1 "cantera-${CANTERA_VERSION}/test" - rm cantera.tar.gz - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BUILD_FRONTEND: build - # Upstream builds in ghcr.io/cantera/cantera-base-manylinux_2_28-, which has - # no riscv64 variant, so its Dockerfile and superbuild are replayed here instead. - CIBW_BEFORE_ALL_LINUX: | - set -ex - dnf -y install openblas-devel - pipx install ninja - mkdir -p /tmp/cantera-base - cat > /tmp/cantera-base/CMakeLists.txt <<'EOF' - cmake_minimum_required(VERSION 3.24.0) - - project(cantera-dependency-superbuild) - - include(ExternalProject) - - set(DOWNLOAD_DIR "/cache") - - set(BOOST_VERSION 1.88.0) - ExternalProject_Add( - boost - URL https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz - URL_HASH SHA256=f48b48390380cfb94a629872346e3a81370dc498896f16019ade727ab72eb1ec - CMAKE_GENERATOR Ninja - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DCMAKE_INSTALL_LIBDIR:STRING=lib - -DBOOST_INCLUDE_LIBRARIES:STRING=algorithm;dll;stacktrace;core;math;numeric/ublas;serialization;multi_array - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - set(LIBHDF5_VERSION 1.14.6) - set(ZLIB_VERSION 1.3.1) - set(LIBAEC_VERSION 1.1.4) - ExternalProject_Add( - libhdf5 - URL https://github.com/HDFGroup/hdf5/releases/download/hdf5_${LIBHDF5_VERSION}/hdf5-${LIBHDF5_VERSION}.tar.gz - URL_HASH SHA256=e4defbac30f50d64e1556374aa49e574417c9e72c6b1de7a4ff88c4b1bea6e9b - CMAKE_GENERATOR Ninja - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DCMAKE_INSTALL_PREFIX:STRING=/usr/local - -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON - -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON - -DHDF5_BUILD_EXAMPLES:BOOL=OFF - -DHDF5_BUILD_TOOLS:BOOL=OFF - -DBUILD_TESTING:BOOL=OFF - -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ - -DZLIB_PACKAGE_NAME:STRING=zlib - -DZLIB_TGZ_NAME:STRING=zlib-${ZLIB_VERSION}.tar.gz - -DZLIB_TGZ_ORIGPATH:STRING=https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION} - -DZLIB_USE_LOCALCONTENT:BOOL=OFF - -DLIBAEC_PACKAGE_NAME:STRING=libaec - -DLIBAEC_TGZ_NAME:STRING=libaec-${LIBAEC_VERSION}.tar.gz - -DLIBAEC_TGZ_ORIGPATH:STRING=https://github.com/MathisRosenhauer/libaec/releases/download/v${LIBAEC_VERSION} - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF - -DHDF_PACKAGE_NAMESPACE:STRING=ct - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - set(EIGEN_VERSION 3.4.0) - ExternalProject_Add( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/eigen-${EIGEN_VERSION}.tar.bz2 - URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626 - CMAKE_GENERATOR Ninja - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DEIGEN_BUILD_DOC:BOOL=OFF - -DBUILD_TESTING:BOOL=OFF - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - set(YAML_CPP_VERSION 0.8.0) - ExternalProject_Add( - yamlcpp - URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/${YAML_CPP_VERSION}.tar.gz - URL_HASH SHA256=fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16 - CMAKE_GENERATOR Ninja - CMAKE_ARGS - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DCMAKE_INSTALL_LIBDIR:STRING=lib - -DYAML_CPP_FORMAT_SOURCE:BOOL=OFF - -DBUILD_TESTING:BOOL=OFF - -DBUILD_SHARED_LIBS:BOOL=ON - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - set(SUNDIALS_VERSION 7.4.0) - ExternalProject_Add( - sundials - URL https://github.com/LLNL/sundials/releases/download/v${SUNDIALS_VERSION}/sundials-${SUNDIALS_VERSION}.tar.gz - URL_HASH SHA256=679ddacdd77610110e613164e8297d6d0cd35bae8e9c3afc8e8ff6f99a1c2a7b - CMAKE_GENERATOR Ninja - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DCMAKE_INSTALL_LIBDIR:STRING=lib - -DBUILD_SHARED_LIBS:BOOL=OFF - -DEXAMPLES_ENABLE_C:BOOL=OFF - -DEXAMPLES_INSTALL:BOOL=OFF - -DBUILD_ARKODE:BOOL=OFF - -DBUILD_CVODE:BOOL=OFF - -DBUILD_IDA:BOOL=OFF - -DBUILD_KINSOL:BOOL=OFF - -DBUILD_CPODES:BOOL=OFF - -DENABLE_LAPACK:BOOL=ON - -DBLA_VENDOR:STRING=OpenBLAS - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - set(FMT_VERSION 11.2.0) - ExternalProject_Add( - fmt - URL https://github.com/fmtlib/fmt/releases/download/${FMT_VERSION}/fmt-${FMT_VERSION}.zip - URL_HASH SHA256=203eb4e8aa0d746c62d8f903df58e0419e3751591bb53ff971096eaa0ebd4ec3 - CMAKE_GENERATOR Ninja - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DCMAKE_INSTALL_LIBDIR:STRING=lib - -DFMT_DOC:BOOL=OFF - -DFMT_TEST:BOOL=OFF - -DBUILD_SHARED_LIBS:BOOL=ON - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - - # The dot before the 3 is a typo in the tag on the GitHub repo - set(HIGHFIVE_VERSION .3.1.1) - ExternalProject_Add( - highfive - URL https://github.com/highfive-devs/highfive/archive/refs/tags/v${HIGHFIVE_VERSION}.tar.gz - URL_HASH SHA256=c0bc76b01868a133bf4550a07321923c5582fe3967edc102864b082e40799914 - CMAKE_GENERATOR Ninja - CMAKE_ARGS - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - CMAKE_CACHE_ARGS - -DCMAKE_BUILD_TYPE:STRING=Release - -DHIGHFIVE_UNIT_TESTS:BOOL=OFF - -DHIGHFIVE_USE_BOOST:BOOL=ON - -DHIGHFIVE_USE_EIGEN:BOOL=ON - -DHIGHFIVE_EXAMPLES:BOOL=OFF - -DHIGHFIVE_BUILD_DOCS:BOOL=OFF - -DBoost_NO_BOOST_CMAKE:BOOL=OFF - DEPENDS boost eigen libhdf5 - DOWNLOAD_DIR ${DOWNLOAD_DIR} - ) - EOF - cmake -G Ninja -S /tmp/cantera-base -B /tmp/cantera-base/build - cmake --build /tmp/cantera-base/build - cd /tmp/cantera-base/build - cp boost-prefix/src/boost/LICENSE_1_0.txt {project}/License.boost.txt - cp eigen-prefix/src/eigen/COPYING.MPL2 {project}/License.eigen.txt - cp fmt-prefix/src/fmt/LICENSE {project}/License.fmt.txt - cp libhdf5-prefix/src/libhdf5/COPYING {project}/License.hdf5.txt - cp highfive-prefix/src/highfive/LICENSE {project}/License.highfive.txt - cp libhdf5-prefix/src/libhdf5-build/_deps/szip-src/LICENSE.txt {project}/License.libaec.txt - cp /usr/share/licenses/openblas/LICENSE {project}/License.openblas.txt - cp sundials-prefix/src/sundials/LICENSE {project}/License.sundials.txt - cp yamlcpp-prefix/src/yamlcpp/LICENSE {project}/License.yaml-cpp.txt - cp libhdf5-prefix/src/libhdf5-build/_deps/hdf5_zlib-src/LICENSE {project}/License.zlib.txt - # Upstream mounts the test tree through /host; stage it with test-sources instead. - CIBW_ENVIRONMENT: >- - CT_SKIP_SLOW=1 - CANTERA_TEST_DIR=. - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,pandas - CIBW_TEST_SOURCES: test - # pandas has no free-threaded riscv64 wheel. - CIBW_TEST_EXTRAS: ${{ matrix.python == 'cp314t' && 'units,graphviz' || 'pandas,units,graphviz' }} - - - name: Check the wheel ships the extension and the bundled licences - run: | - python3 - wheelhouse/*.whl <<'EOF' - import sys, zipfile - - names = zipfile.ZipFile(sys.argv[1]).namelist() - assert any(n.startswith("cantera/_cantera.") and n.endswith(".so") for n in names), names - licences = {n.rsplit("/", 1)[1] for n in names if ".dist-info/licenses/" in n} - {""} - deps = {"boost", "eigen", "fmt", "hdf5", "highfive", "libaec", "openblas", - "sundials", "yaml-cpp", "zlib"} - assert licences == {"License.txt"} | {f"License.{d}.txt" for d in deps}, licences - libs = {n.split("/")[1].split("-")[0] for n in names if n.startswith("cantera.libs/")} - {""} - assert libs <= {"libfmt", "libgfortran", "libhdf5", "libopenblas", "libyaml"}, libs - print(sys.argv[1], sorted(libs), "ok") - EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cantera-${{ env.CANTERA_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: cantera + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: cantera-${{ matrix.version }}-sdist + pre-build: |- + curl -fsSL "https://github.com/Cantera/cantera/archive/refs/tags/v${{ matrix.version }}.tar.gz" -o cantera.tar.gz + tar -xzf cantera.tar.gz --strip-components=1 "cantera-${{ matrix.version }}/test" + rm cantera.tar.gz + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' + import sys, zipfile + + names = zipfile.ZipFile(sys.argv[1]).namelist() + assert any(n.startswith("cantera/_cantera.") and n.endswith(".so") for n in names), names + licences = {n.rsplit("/", 1)[1] for n in names if ".dist-info/licenses/" in n} - {""} + deps = {"boost", "eigen", "fmt", "hdf5", "highfive", "libaec", "openblas", + "sundials", "yaml-cpp", "zlib"} + assert licences == {"License.txt"} | {f"License.{d}.txt" for d in deps}, licences + libs = {n.split("/")[1].split("-")[0] for n in names if n.startswith("cantera.libs/")} - {""} + assert libs <= {"libfmt", "libgfortran", "libhdf5", "libopenblas", "libyaml"}, libs + print(sys.argv[1], sorted(libs), "ok") + EOF + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 480 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build-frontend: build + # Upstream builds in ghcr.io/cantera/cantera-base-manylinux_2_28-, which has + # no riscv64 variant, so its Dockerfile and superbuild are replayed here instead. + cibw-before-all-linux: |- + set -ex + dnf -y install openblas-devel + pipx install ninja + mkdir -p /tmp/cantera-base + cat > /tmp/cantera-base/CMakeLists.txt <<'EOF' + cmake_minimum_required(VERSION 3.24.0) + + project(cantera-dependency-superbuild) + + include(ExternalProject) + + set(DOWNLOAD_DIR "/cache") + + set(BOOST_VERSION 1.88.0) + ExternalProject_Add( + boost + URL https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz + URL_HASH SHA256=f48b48390380cfb94a629872346e3a81370dc498896f16019ade727ab72eb1ec + CMAKE_GENERATOR Ninja + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_INSTALL_LIBDIR:STRING=lib + -DBOOST_INCLUDE_LIBRARIES:STRING=algorithm;dll;stacktrace;core;math;numeric/ublas;serialization;multi_array + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + set(LIBHDF5_VERSION 1.14.6) + set(ZLIB_VERSION 1.3.1) + set(LIBAEC_VERSION 1.1.4) + ExternalProject_Add( + libhdf5 + URL https://github.com/HDFGroup/hdf5/releases/download/hdf5_${LIBHDF5_VERSION}/hdf5-${LIBHDF5_VERSION}.tar.gz + URL_HASH SHA256=e4defbac30f50d64e1556374aa49e574417c9e72c6b1de7a4ff88c4b1bea6e9b + CMAKE_GENERATOR Ninja + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_INSTALL_PREFIX:STRING=/usr/local + -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON + -DHDF5_BUILD_EXAMPLES:BOOL=OFF + -DHDF5_BUILD_TOOLS:BOOL=OFF + -DBUILD_TESTING:BOOL=OFF + -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ + -DZLIB_PACKAGE_NAME:STRING=zlib + -DZLIB_TGZ_NAME:STRING=zlib-${ZLIB_VERSION}.tar.gz + -DZLIB_TGZ_ORIGPATH:STRING=https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION} + -DZLIB_USE_LOCALCONTENT:BOOL=OFF + -DLIBAEC_PACKAGE_NAME:STRING=libaec + -DLIBAEC_TGZ_NAME:STRING=libaec-${LIBAEC_VERSION}.tar.gz + -DLIBAEC_TGZ_ORIGPATH:STRING=https://github.com/MathisRosenhauer/libaec/releases/download/v${LIBAEC_VERSION} + -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF + -DHDF_PACKAGE_NAMESPACE:STRING=ct + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + set(EIGEN_VERSION 3.4.0) + ExternalProject_Add( + eigen + URL https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/eigen-${EIGEN_VERSION}.tar.bz2 + URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626 + CMAKE_GENERATOR Ninja + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DEIGEN_BUILD_DOC:BOOL=OFF + -DBUILD_TESTING:BOOL=OFF + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + set(YAML_CPP_VERSION 0.8.0) + ExternalProject_Add( + yamlcpp + URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/${YAML_CPP_VERSION}.tar.gz + URL_HASH SHA256=fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16 + CMAKE_GENERATOR Ninja + CMAKE_ARGS + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_INSTALL_LIBDIR:STRING=lib + -DYAML_CPP_FORMAT_SOURCE:BOOL=OFF + -DBUILD_TESTING:BOOL=OFF + -DBUILD_SHARED_LIBS:BOOL=ON + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + set(SUNDIALS_VERSION 7.4.0) + ExternalProject_Add( + sundials + URL https://github.com/LLNL/sundials/releases/download/v${SUNDIALS_VERSION}/sundials-${SUNDIALS_VERSION}.tar.gz + URL_HASH SHA256=679ddacdd77610110e613164e8297d6d0cd35bae8e9c3afc8e8ff6f99a1c2a7b + CMAKE_GENERATOR Ninja + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_INSTALL_LIBDIR:STRING=lib + -DBUILD_SHARED_LIBS:BOOL=OFF + -DEXAMPLES_ENABLE_C:BOOL=OFF + -DEXAMPLES_INSTALL:BOOL=OFF + -DBUILD_ARKODE:BOOL=OFF + -DBUILD_CVODE:BOOL=OFF + -DBUILD_IDA:BOOL=OFF + -DBUILD_KINSOL:BOOL=OFF + -DBUILD_CPODES:BOOL=OFF + -DENABLE_LAPACK:BOOL=ON + -DBLA_VENDOR:STRING=OpenBLAS + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + set(FMT_VERSION 11.2.0) + ExternalProject_Add( + fmt + URL https://github.com/fmtlib/fmt/releases/download/${FMT_VERSION}/fmt-${FMT_VERSION}.zip + URL_HASH SHA256=203eb4e8aa0d746c62d8f903df58e0419e3751591bb53ff971096eaa0ebd4ec3 + CMAKE_GENERATOR Ninja + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_INSTALL_LIBDIR:STRING=lib + -DFMT_DOC:BOOL=OFF + -DFMT_TEST:BOOL=OFF + -DBUILD_SHARED_LIBS:BOOL=ON + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + + # The dot before the 3 is a typo in the tag on the GitHub repo + set(HIGHFIVE_VERSION .3.1.1) + ExternalProject_Add( + highfive + URL https://github.com/highfive-devs/highfive/archive/refs/tags/v${HIGHFIVE_VERSION}.tar.gz + URL_HASH SHA256=c0bc76b01868a133bf4550a07321923c5582fe3967edc102864b082e40799914 + CMAKE_GENERATOR Ninja + CMAKE_ARGS + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=Release + -DHIGHFIVE_UNIT_TESTS:BOOL=OFF + -DHIGHFIVE_USE_BOOST:BOOL=ON + -DHIGHFIVE_USE_EIGEN:BOOL=ON + -DHIGHFIVE_EXAMPLES:BOOL=OFF + -DHIGHFIVE_BUILD_DOCS:BOOL=OFF + -DBoost_NO_BOOST_CMAKE:BOOL=OFF + DEPENDS boost eigen libhdf5 + DOWNLOAD_DIR ${DOWNLOAD_DIR} + ) + EOF + cmake -G Ninja -S /tmp/cantera-base -B /tmp/cantera-base/build + cmake --build /tmp/cantera-base/build + cd /tmp/cantera-base/build + cp boost-prefix/src/boost/LICENSE_1_0.txt {project}/License.boost.txt + cp eigen-prefix/src/eigen/COPYING.MPL2 {project}/License.eigen.txt + cp fmt-prefix/src/fmt/LICENSE {project}/License.fmt.txt + cp libhdf5-prefix/src/libhdf5/COPYING {project}/License.hdf5.txt + cp highfive-prefix/src/highfive/LICENSE {project}/License.highfive.txt + cp libhdf5-prefix/src/libhdf5-build/_deps/szip-src/LICENSE.txt {project}/License.libaec.txt + cp /usr/share/licenses/openblas/LICENSE {project}/License.openblas.txt + cp sundials-prefix/src/sundials/LICENSE {project}/License.sundials.txt + cp yamlcpp-prefix/src/yamlcpp/LICENSE {project}/License.yaml-cpp.txt + cp libhdf5-prefix/src/libhdf5-build/_deps/hdf5_zlib-src/LICENSE {project}/License.zlib.txt + # Upstream mounts the test tree through /host; stage it with test-sources instead. + cibw-environment-linux: > + CT_SKIP_SLOW=1 + CANTERA_TEST_DIR=. + PIP_ONLY_BINARY=numpy,pandas + cibw-test-sources: test + # pandas has no free-threaded riscv64 wheel. + cibw-test-extras: ${{ matrix.python == 'cp314t' && 'units,graphviz' || 'pandas,units,graphviz' }} gpl_sources: name: Collect GPL sources for cantera ${{ matrix.version }} diff --git a/.github/workflows/build-cchardet.yml b/.github/workflows/build-cchardet.yml index 9b805d86131..29d25818704 100644 --- a/.github/workflows/build-cchardet.yml +++ b/.github/workflows/build-cchardet.yml @@ -98,7 +98,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: cchardet-${{ env.CCHARDET_VERSION }}-sdist + name: cchardet-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -106,118 +106,92 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build cchardet ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - CCHARDET_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: cchardet-${{ env.CCHARDET_VERSION }}-sdist - path: dist/ - - - name: Extract sdist and stage the wheel smoke test - # Upstream's own cibuildwheel config (test-command/test-sources in - # pyproject.toml) runs tools/wheel_smoke.py, but MANIFEST.in doesn't - # ship tools/ in the sdist, so this reproduces that same script here. - run: | - mkdir pkg - tar xzf dist/*.tar.gz --strip-components=1 -C pkg - cat > pkg/riscv64_test_cchardet.py <<'EOF' - import json - import os - import subprocess - import sys - import sysconfig - import tempfile - from pathlib import Path - - import cchardet - - - def main() -> None: - # Upstream only added this assertion in tools/wheel_smoke.py starting at - # v2.3.0; v2.2.0's _cchardet extension doesn't declare free-threading - # support, so CPython 3.14t legitimately re-enables the GIL on import. - version = tuple(int(p) for p in os.environ["CCHARDET_VERSION"].split(".")) - if sysconfig.get_config_var("Py_GIL_DISABLED") and version >= (2, 3, 0): - assert not getattr(sys, "_is_gil_enabled")() - - package_dir = Path(cchardet.__file__).parent - assert (package_dir / "py.typed").is_file() - assert (package_dir / "_cchardet.pyi").is_file() - - expected = cchardet.detect(b"plain ASCII") - assert expected["encoding"] == "ASCII" - assert cchardet.detect(bytearray(b"plain ASCII")) == expected - assert cchardet.detect(memoryview(b"plain ASCII"), max_bytes=32) == expected - - french = ("Français, où êtes-vous ? Voilà l'été.").encode( - "windows-1252" - ) - candidates = cchardet.detect_all(french) - assert candidates - assert candidates[0] == cchardet.detect(french) - assert candidates[0]["language"] == "fr" - - detector = cchardet.UniversalDetector() - detector.feed(french[:10]) - detector.feed(french[10:]) - detector.close() - assert detector.result == candidates[0] - - with tempfile.TemporaryDirectory() as directory: - sample = Path(directory) / "sample.txt" - sample.write_bytes(french) - output = subprocess.check_output( - [sys.executable, "-m", "cchardet", "--json", str(sample)], - text=True, - ) - assert json.loads(output)["language"] == "fr" - - - if __name__ == "__main__": - main() - EOF - - - name: Build and test wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: pkg - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # CIBW_TEST_SOURCES is relative to the cwd, not package-dir, hence "pkg/". - CIBW_TEST_SOURCES: pkg/riscv64_test_cchardet.py - CIBW_TEST_COMMAND: python pkg/riscv64_test_cchardet.py - # A job-level `env:` never reaches the Linux container (gotcha 129), so the - # test script's os.environ["CCHARDET_VERSION"] read needs it via CIBW_ENVIRONMENT. - CIBW_ENVIRONMENT: CCHARDET_VERSION=${{ env.CCHARDET_VERSION }} - - - name: Verify the wheel ships the compiled extension - run: | - python3 - wheelhouse/*.whl <<'EOF' - import sys, zipfile - names = zipfile.ZipFile(sys.argv[1]).namelist() - assert any(n.startswith("cchardet/_cchardet") and n.endswith(".so") for n in names), names - assert any(n.endswith(".dist-info/licenses/COPYING") for n in names), names - print("ok") - EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cchardet-${{ matrix.version }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error - + # Upstream's own cibuildwheel config (test-command/test-sources in + # pyproject.toml) runs tools/wheel_smoke.py, but MANIFEST.in doesn't + # ship tools/ in the sdist, so this reproduces that same script here. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: cchardet + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: cchardet-${{ matrix.version }}-sdist + pre-build: |- + cat > riscv64_test_cchardet.py <<'EOF' + import json + import os + import subprocess + import sys + import sysconfig + import tempfile + from pathlib import Path + + import cchardet + + + def main() -> None: + # Upstream only added this assertion in tools/wheel_smoke.py starting at + # v2.3.0; v2.2.0's _cchardet extension doesn't declare free-threading + # support, so CPython 3.14t legitimately re-enables the GIL on import. + version = tuple(int(p) for p in os.environ["CCHARDET_VERSION"].split(".")) + if sysconfig.get_config_var("Py_GIL_DISABLED") and version >= (2, 3, 0): + assert not getattr(sys, "_is_gil_enabled")() + + package_dir = Path(cchardet.__file__).parent + assert (package_dir / "py.typed").is_file() + assert (package_dir / "_cchardet.pyi").is_file() + + expected = cchardet.detect(b"plain ASCII") + assert expected["encoding"] == "ASCII" + assert cchardet.detect(bytearray(b"plain ASCII")) == expected + assert cchardet.detect(memoryview(b"plain ASCII"), max_bytes=32) == expected + + french = ("Français, où êtes-vous ? Voilà l'été.").encode( + "windows-1252" + ) + candidates = cchardet.detect_all(french) + assert candidates + assert candidates[0] == cchardet.detect(french) + assert candidates[0]["language"] == "fr" + + detector = cchardet.UniversalDetector() + detector.feed(french[:10]) + detector.feed(french[10:]) + detector.close() + assert detector.result == candidates[0] + + with tempfile.TemporaryDirectory() as directory: + sample = Path(directory) / "sample.txt" + sample.write_bytes(french) + output = subprocess.check_output( + [sys.executable, "-m", "cchardet", "--json", str(sample)], + text=True, + ) + assert json.loads(output)["language"] == "fr" + + + if __name__ == "__main__": + main() + EOF + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' + import sys, zipfile + names = zipfile.ZipFile(sys.argv[1]).namelist() + assert any(n.startswith("cchardet/_cchardet") and n.endswith(".so") for n in names), names + assert any(n.endswith(".dist-info/licenses/COPYING") for n in names), names + print("ok") + EOF + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 90 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-test-command: python {project}/riscv64_test_cchardet.py + # A job-level `env:` never reaches the Linux container (gotcha 129), so the + # test script's os.environ["CCHARDET_VERSION"] read needs it via CIBW_ENVIRONMENT. + cibw-environment-linux: CCHARDET_VERSION=${{ matrix.version }} publish: name: Publish cchardet ${{ matrix.version }} needs: [setup, build_sdist, build_wheels] diff --git a/.github/workflows/build-componentize-py.yml b/.github/workflows/build-componentize-py.yml index db863c0dac1..a124383caca 100644 --- a/.github/workflows/build-componentize-py.yml +++ b/.github/workflows/build-componentize-py.yml @@ -37,7 +37,6 @@ permissions: env: MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 - WASI_SDK_VERSION: '33' jobs: setup: @@ -75,9 +74,9 @@ jobs: cibw-before-all-linux: > curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && $HOME/.cargo/bin/rustup target add wasm32-wasip2 && - curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && - tar xf wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && - mv wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux /opt/wasi-sdk + curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-riscv64-linux.tar.gz && + tar xf wasi-sdk-33.0-riscv64-linux.tar.gz && + mv wasi-sdk-33.0-riscv64-linux /opt/wasi-sdk cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" MATURIN_PEP517_ARGS=\"--features pyo3\"" # No wheel-level test suite ships in the source tree: upstream # tests via `cargo test` against wasmtime-cli, never packaged. diff --git a/.github/workflows/build-couchbase.yml b/.github/workflows/build-couchbase.yml index 973f7b8e0fa..6ad66fa10d7 100644 --- a/.github/workflows/build-couchbase.yml +++ b/.github/workflows/build-couchbase.yml @@ -88,7 +88,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: couchbase-${{ env.COUCHBASE_VERSION }}-sdist + name: couchbase-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -96,67 +96,38 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build couchbase ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 1440 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - COUCHBASE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout python-wheels - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - path: python-wheels - persist-credentials: false - - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: couchbase-${{ env.COUCHBASE_VERSION }}-sdist - path: dist/ - - # The patches reach files the git checkout does not have in a patchable - # shape: one lives in the CPM cache only the sdist carries, the other - # inside the couchbase-cxx-client submodule. - - name: Extract and patch couchbase source - run: | - mkdir couchbase-src - tar zxf dist/couchbase-*.tar.gz -C couchbase-src --strip-components=1 - git apply --directory=couchbase-src python-wheels/patches/couchbase/"${COUCHBASE_VERSION}"/00*.patch - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: couchbase-src - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # PYCBC_USE_OPENSSL=OFF is how upstream builds its own wheels: the C++ core - # statically links the vendored BoringSSL instead of the image's OpenSSL. - # CMAKE_POLICY_VERSION_MINIMUM covers the vendored GSL's cmake_minimum_required. - CIBW_ENVIRONMENT: >- - PYCBC_USE_OPENSSL=OFF - PYCBC_CMAKE_PARALLEL_THREADS=$(nproc) - CMAKE_POLICY_VERSION_MINIMUM=3.5 - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - # Upstream's own suite needs a live Couchbase Server, which has no riscv64 - # build, so this drives the C++ core directly instead: a bootstrap against an - # unroutable address has to surface as a Couchbase error, not a crash. - CIBW_TEST_COMMAND: >- - python -c "import importlib.metadata as m; f=[str(p) for p in m.files('couchbase')]; assert any(s.endswith('licenses/LICENSE') for s in f), f; import couchbase; from couchbase.logic.pycbc_core import _core; assert _core.__file__.endswith('.so'), _core.__file__; md = couchbase.get_metadata(); assert md['version'], md; assert 'BoringSSL' in md['openssl_runtime'], md; print(md['version'], md['openssl_runtime'])" && - python -c "import pytest; from datetime import timedelta; from couchbase.auth import PasswordAuthenticator; from couchbase.cluster import Cluster; from couchbase.exceptions import CouchbaseException; from couchbase.options import ClusterOptions, ClusterTimeoutOptions; opts = ClusterOptions(PasswordAuthenticator('u', 'p'), timeout_options=ClusterTimeoutOptions(bootstrap_timeout=timedelta(seconds=15), resolve_timeout=timedelta(seconds=5))); pytest.raises(CouchbaseException, lambda: Cluster.connect('couchbase://192.0.2.1', opts).ping()); print('bootstrap failure surfaced as CouchbaseException')" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: couchbase-${{ env.COUCHBASE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # The patches reach files the git checkout does not have in a patchable + # shape: one lives in the CPM cache only the sdist carries, the other + # inside the couchbase-cxx-client submodule. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: couchbase + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: couchbase-${{ matrix.version }}-sdist + patches: true + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 1440 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + # PYCBC_USE_OPENSSL=OFF is how upstream builds its own wheels: the C++ core + # statically links the vendored BoringSSL instead of the image's OpenSSL. + # CMAKE_POLICY_VERSION_MINIMUM covers the vendored GSL's cmake_minimum_required. + cibw-environment-linux: > + PYCBC_USE_OPENSSL=OFF + PYCBC_CMAKE_PARALLEL_THREADS=$(nproc) + CMAKE_POLICY_VERSION_MINIMUM=3.5 + cibw-test-requires: pytest + # Upstream's own suite needs a live Couchbase Server, which has no riscv64 + # build, so this drives the C++ core directly instead: a bootstrap against an + # unroutable address has to surface as a Couchbase error, not a crash. + cibw-test-command: > + python -c "import importlib.metadata as m; f=[str(p) for p in m.files('couchbase')]; assert any(s.endswith('licenses/LICENSE') for s in f), f; import couchbase; from couchbase.logic.pycbc_core import _core; assert _core.__file__.endswith('.so'), _core.__file__; md = couchbase.get_metadata(); assert md['version'], md; assert 'BoringSSL' in md['openssl_runtime'], md; print(md['version'], md['openssl_runtime'])" && + python -c "import pytest; from datetime import timedelta; from couchbase.auth import PasswordAuthenticator; from couchbase.cluster import Cluster; from couchbase.exceptions import CouchbaseException; from couchbase.options import ClusterOptions, ClusterTimeoutOptions; opts = ClusterOptions(PasswordAuthenticator('u', 'p'), timeout_options=ClusterTimeoutOptions(bootstrap_timeout=timedelta(seconds=15), resolve_timeout=timedelta(seconds=5))); pytest.raises(CouchbaseException, lambda: Cluster.connect('couchbase://192.0.2.1', opts).ping()); print('bootstrap failure surfaced as CouchbaseException')" publish: name: Publish couchbase ${{ matrix.version }} diff --git a/.github/workflows/build-freeze-core.yml b/.github/workflows/build-freeze-core.yml index 8048d798954..1923ef6102a 100644 --- a/.github/workflows/build-freeze-core.yml +++ b/.github/workflows/build-freeze-core.yml @@ -37,10 +37,6 @@ concurrency: permissions: contents: read # to fetch code (actions/checkout) -env: - MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 - MUSLLINUX_RISCV64_IMAGE: quay.io/pypa/musllinux_1_2_riscv64 - jobs: setup: uses: $/.github/workflows/_setup.yml @@ -79,7 +75,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-sdist + name: freeze-core-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -87,41 +83,19 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build freeze-core ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - - env: - FREEZE_CORE_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-sdist - path: dist - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: freeze-core + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: freeze-core-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-musllinux-riscv64-image: quay.io/pypa/musllinux_1_2_riscv64 # Upstream's own tests job runs on bare ubuntu/windows/macos runners, not # inside the manylinux container, installing the just-built wheel from a diff --git a/.github/workflows/build-jq.yml b/.github/workflows/build-jq.yml index 21db547af83..6eac28aaff0 100644 --- a/.github/workflows/build-jq.yml +++ b/.github/workflows/build-jq.yml @@ -86,7 +86,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: jq-${{ env.JQ_VERSION }}-sdist + name: jq-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -94,54 +94,32 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build jq ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - JQ_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: jq-${{ env.JQ_VERSION }}-sdist - path: dist/ - - - name: Extract sdist and stage vendored licence texts - run: | - set -euo pipefail - mkdir src - tar xzf dist/*.tar.gz --strip-components=1 -C src - - # setuptools' default license-files glob (LICEN[CS]E*) picks these up from - # the project root; jq statically links both libjq and oniguruma into the - # extension, so their (both BSD) licence texts need to ship alongside - # jq.py's own LICENSE. - jq_tarball="$(ls src/deps/*.tar.gz)" - jq_dir="$(basename "${jq_tarball}" .tar.gz)" - tar xzf "${jq_tarball}" -O "${jq_dir}/COPYING" > src/LICENSE.jq - tar xzf "${jq_tarball}" -O "${jq_dir}/vendor/oniguruma/COPYING" > src/LICENSE.oniguruma - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: src - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {package}/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: jq-${{ env.JQ_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: jq + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: jq-${{ matrix.version }}-sdist + pre-build: |- + set -euo pipefail + + # setuptools' default license-files glob (LICEN[CS]E*) picks these up from + # the project root; jq statically links both libjq and oniguruma into the + # extension, so their (both BSD) licence texts need to ship alongside + # jq.py's own LICENSE. + jq_tarball="$(ls deps/*.tar.gz)" + jq_dir="$(basename "${jq_tarball}" .tar.gz)" + tar xzf "${jq_tarball}" -O "${jq_dir}/COPYING" > LICENSE.jq + tar xzf "${jq_tarball}" -O "${jq_dir}/vendor/oniguruma/COPYING" > LICENSE.oniguruma + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-test-requires: pytest + cibw-test-command: pytest {package}/tests publish: name: Publish jq ${{ matrix.version }} diff --git a/.github/workflows/build-lgpio.yml b/.github/workflows/build-lgpio.yml index 933735aec95..2f56a8a8248 100644 --- a/.github/workflows/build-lgpio.yml +++ b/.github/workflows/build-lgpio.yml @@ -100,7 +100,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: lgpio-${{ env.LGPIO_VERSION }}-sdist + name: lgpio-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -108,46 +108,25 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build lgpio ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - LGPIO_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: lgpio-${{ env.LGPIO_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PYPI=1 - # Upstream has no test suite and every other call needs a real gpiochip. - CIBW_TEST_COMMAND: >- - python -c "import lgpio, _lgpio; - assert _lgpio.__file__.endswith('.so'), _lgpio.__file__; - assert lgpio.error_text(lgpio.BAD_GPIOCHIP) == 'bad gpiochip'" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: lgpio-${{ env.LGPIO_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: lgpio + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: lgpio-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-environment-linux: PYPI=1 + # Upstream has no test suite and every other call needs a real gpiochip. + cibw-test-command: > + python -c "import lgpio, _lgpio; + assert _lgpio.__file__.endswith('.so'), _lgpio.__file__; + assert lgpio.error_text(lgpio.BAD_GPIOCHIP) == 'bad gpiochip'" publish: name: Publish lgpio ${{ matrix.version }} diff --git a/.github/workflows/build-mercurial.yml b/.github/workflows/build-mercurial.yml index 3ac68ce0ff4..6f8dbf2e531 100644 --- a/.github/workflows/build-mercurial.yml +++ b/.github/workflows/build-mercurial.yml @@ -70,7 +70,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: mercurial-${{ env.MERCURIAL_VERSION }}-sdist + name: mercurial-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -78,46 +78,26 @@ jobs: needs: [setup, fetch_source] if: needs.setup.outputs.versions != '[]' name: Build mercurial ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - MERCURIAL_VERSION: ${{ matrix.version }} - - steps: - - name: Download source - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: mercurial-${{ env.MERCURIAL_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Mirrors upstream's own [tool.cibuildwheel] environment (pyproject.toml); - # the riscv64 image ships no msgfmt (CLAUDE.md gotcha 532). - CIBW_BEFORE_ALL_LINUX: dnf install -y gettext - CIBW_ENVIRONMENT: MERCURIAL_SETUP_FORCE_TRANSLATIONS=1 - CIBW_TEST_COMMAND: >- - hg version -v && - python -c "from mercurial import policy; assert policy.policy == b'c', policy.policy" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: mercurial-${{ env.MERCURIAL_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: mercurial + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: mercurial-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + # Mirrors upstream's own [tool.cibuildwheel] environment (pyproject.toml); + # the riscv64 image ships no msgfmt (CLAUDE.md gotcha 532). + cibw-before-all-linux: dnf install -y gettext + cibw-environment-linux: MERCURIAL_SETUP_FORCE_TRANSLATIONS=1 + cibw-test-command: > + hg version -v && + python -c "from mercurial import policy; assert policy.policy == b'c', policy.policy" publish: name: Publish mercurial ${{ matrix.version }} diff --git a/.github/workflows/build-opendp.yml b/.github/workflows/build-opendp.yml index f5ff98819fc..b0ff7785c11 100644 --- a/.github/workflows/build-opendp.yml +++ b/.github/workflows/build-opendp.yml @@ -96,7 +96,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: opendp-${{ env.OPENDP_VERSION }}-sdist + name: opendp-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -108,54 +108,34 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build opendp ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv # The polars-ffi feature pulls in polars (features=["full"]) plus # polars-python; the riscv64 cargo build alone was still compiling those # 3h54m in when a 240-minute limit cancelled it (twice). Generous margin # as for other heavy Rust/polars ports (gotcha 365, polars-lts-cpu). - timeout-minutes: 1440 - env: - OPENDP_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: opendp-${{ env.OPENDP_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - # One cp3xx-abi3 wheel (setup.cfg's [bdist_wheel] py_limited_api, since the - # cdylib has no CPython linkage at all - see the file header); cibuildwheel - # builds it once and reuses it across the other selectors. manylinux only: - # 'cp3xx-*' also selects musllinux, whose Alpine image has no dnf for - # CIBW_BEFORE_ALL_LINUX, and would rerun the whole multi-hour cargo - # build for an artifact this workflow never uploads. - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # No Rust in the manylinux image; default features pull in a vendored - # OpenSSL build (openssl-src), which needs perl + a C compiler, and - # riscv64's atomics need libatomic explicitly (same packages upstream's - # own CIBW_BEFORE_BUILD_LINUX installs for this exact reason). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y && - dnf install -y perl-core openssl-devel pkgconfig libatomic - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_TEST_COMMAND: python -c "import opendp" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: opendp-${{ matrix.version }}-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # One cp3xx-abi3 wheel (setup.cfg's [bdist_wheel] py_limited_api, since the + # cdylib has no CPython linkage at all - see the file header); cibuildwheel + # builds it once and reuses it across the other selectors. manylinux only: + # 'cp3xx-*' also selects musllinux, whose Alpine image has no dnf for + # CIBW_BEFORE_ALL_LINUX, and would rerun the whole multi-hour cargo + # build for an artifact this workflow never uploads. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: opendp + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: opendp-${{ matrix.version }}-sdist + artifact-tag: manylinux_riscv64 + timeout-minutes: 1440 + cibw-build: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 + # No Rust in the manylinux image; default features pull in a vendored + # OpenSSL build (openssl-src), which needs perl + a C compiler, and + # riscv64's atomics need libatomic explicitly (same packages upstream's + # own CIBW_BEFORE_BUILD_LINUX installs for this exact reason). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y && + dnf install -y perl-core openssl-devel pkgconfig libatomic + cibw-environment-linux: PATH="$PATH:$HOME/.cargo/bin" + cibw-test-command: python -c "import opendp" publish: name: Publish opendp ${{ matrix.version }} diff --git a/.github/workflows/build-opentimelineio.yml b/.github/workflows/build-opentimelineio.yml index 9fd92b28765..e9390fa9dad 100644 --- a/.github/workflows/build-opentimelineio.yml +++ b/.github/workflows/build-opentimelineio.yml @@ -98,7 +98,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: opentimelineio-${{ env.OPENTIMELINEIO_VERSION }}-sdist + name: opentimelineio-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -106,50 +106,27 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build opentimelineio ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - permissions: - contents: read strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - OPENTIMELINEIO_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: opentimelineio-${{ env.OPENTIMELINEIO_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_ARCHS: riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_TEST_SOURCES: tests examples - # docs/ is pruned from the sdist (MANIFEST.in), so the schema-vs-docs - # diff test has nothing to compare against. - CIBW_TEST_ENVIRONMENT: OTIO_DISABLE_SERIALIZED_SCHEMA_TEST=1 - CIBW_TEST_COMMAND: >- - python -c "import opentimelineio._otio as o, opentimelineio._opentime as t; assert o.__file__.endswith('.so'), o.__file__; assert t.__file__.endswith('.so'), t.__file__" && - python -m unittest discover -s {project}/tests -t {project} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: opentimelineio-${{ env.OPENTIMELINEIO_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: opentimelineio + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: opentimelineio-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 90 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-test-sources: tests examples + # docs/ is pruned from the sdist (MANIFEST.in), so the schema-vs-docs + # diff test has nothing to compare against. + cibw-test-environment: OTIO_DISABLE_SERIALIZED_SCHEMA_TEST=1 + cibw-test-command: > + python -c "import opentimelineio._otio as o, opentimelineio._opentime as t; assert o.__file__.endswith('.so'), o.__file__; assert t.__file__.endswith('.so'), t.__file__" && + python -m unittest discover -s {project}/tests -t {project} publish: name: Publish opentimelineio ${{ matrix.version }} diff --git a/.github/workflows/build-passagemath-combinat.yml b/.github/workflows/build-passagemath-combinat.yml index fceae8fb350..d5ac0fd80dd 100644 --- a/.github/workflows/build-passagemath-combinat.yml +++ b/.github/workflows/build-passagemath-combinat.yml @@ -145,7 +145,7 @@ jobs: - name: upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: passagemath-combinat-${{ env.PASSAGEMATH_COMBINAT_VERSION }}-sdist + name: passagemath-combinat-${{ matrix.version }}-sdist path: pkgs/sagemath-combinat/dist/*.tar.gz if-no-files-found: error @@ -153,93 +153,49 @@ jobs: needs: [setup, python_sdist] if: needs.setup.outputs.versions != '[]' name: Build passagemath-combinat ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PASSAGEMATH_COMBINAT_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: passagemath-combinat-${{ env.PASSAGEMATH_COMBINAT_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - # Replays build/pkgs/symmetrica/spkg-install.in's ./configure && - # make install chain against a fixed /usr/local prefix, skipping - # the Sage-specific sdh_* wrappers; gmp/mpc/mpfr (symmetrica's - # fellow setup.py spkgs) are system headers only, needed by - # gmpy2/cysignals, not by symmetrica itself. - CIBW_BEFORE_ALL_LINUX: | - set -euo pipefail - if command -v apk >/dev/null; then - apk add --no-cache gmp-dev mpfr-dev mpc1-dev curl - else - dnf install -y --setopt=install_weak_deps=False gmp-devel mpfr-devel libmpc-devel - fi - curl -fsSLo /tmp/symmetrica.tar.xz https://github.com/sagemath/sage-package/releases/download/tars/symmetrica-${{ env.SYMMETRICA_VERSION }}.tar.xz - echo "${{ env.SYMMETRICA_SHA256 }} /tmp/symmetrica.tar.xz" | sha256sum -c - - tar xJf /tmp/symmetrica.tar.xz -C /tmp - cd /tmp/symmetrica-${{ env.SYMMETRICA_VERSION }} - CFLAGS="-O2 -g -fPIC -DFAST -DALLTRUE" ./configure --prefix=/usr/local --disable-static --enable-shared - make -j"$(nproc)" - make install - ldconfig || true - CIBW_ENVIRONMENT_LINUX: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH - LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - CPATH=/usr/local/include:$CPATH - # sagemath-repl (the real test extra) is unported, so this - # exercises the symmetrica-backed Cython bindings directly, - # same minimal shape as the bliss/mcqd/cliquer sibling ports. - # Goes through sage.libs.symmetrica.all (not the raw symmetrica - # submodule) because that is what calls the library's own start() - # initializer, same as every real caller does. - # - # kostka_number itself only needs Partition/Integer (already live - # via passagemath-categories), so it is safe to test even though - # sage/libs/symmetrica/symmetrica.pxi's own late_import() - a - # separate call site from __init__.py's eager imports patch 0003 - # drops - unconditionally reaches for sage.combinat.sf.sf (and - # sage.matrix.constructor, sage.combinat.schubert_polynomial), - # all three part of the unported passagemath-modules; patch 0004 - # makes that failure quiet instead of a raw traceback, but every - # symmetrica function routes through the same late_import(), so - # the ones that actually need those three (schur.pxi's - # Schur/monomial/power-sum/homogeneous/elementary conversions and - # plethysm, sb.pxi's Schubert polynomial bindings, sc.pxi's - # chartafel/kranztafel) stay unusable on this wheel until - # passagemath-modules is ported - this test deliberately stays - # inside the subset that does not need it. - # 2 (not the nicer-looking 1) is correct here: it is upstream's - # own doctest example for this exact call - # (kostka_number_symmetrica's docstring in kostka.pxi). - CIBW_TEST_COMMAND: >- - python -c "from sage.libs.symmetrica.all import kostka_number; - r=kostka_number([2,1],[1,1,1]); - assert r==2, r; - print('symmetrica ok', r)" - - - name: Check the wheel ships the extension and the vendored licence - run: | - python3 - wheelhouse/*.whl <<'EOF' + # Replays build/pkgs/symmetrica/spkg-install.in's ./configure && + # make install chain against a fixed /usr/local prefix, skipping + # the Sage-specific sdh_* wrappers; gmp/mpc/mpfr (symmetrica's + # fellow setup.py spkgs) are system headers only, needed by + # gmpy2/cysignals, not by symmetrica itself. + # sagemath-repl (the real test extra) is unported, so this + # exercises the symmetrica-backed Cython bindings directly, + # same minimal shape as the bliss/mcqd/cliquer sibling ports. + # Goes through sage.libs.symmetrica.all (not the raw symmetrica + # submodule) because that is what calls the library's own start() + # initializer, same as every real caller does. + # + # kostka_number itself only needs Partition/Integer (already live + # via passagemath-categories), so it is safe to test even though + # sage/libs/symmetrica/symmetrica.pxi's own late_import() - a + # separate call site from __init__.py's eager imports patch 0003 + # drops - unconditionally reaches for sage.combinat.sf.sf (and + # sage.matrix.constructor, sage.combinat.schubert_polynomial), + # all three part of the unported passagemath-modules; patch 0004 + # makes that failure quiet instead of a raw traceback, but every + # symmetrica function routes through the same late_import(), so + # the ones that actually need those three (schur.pxi's + # Schur/monomial/power-sum/homogeneous/elementary conversions and + # plethysm, sb.pxi's Schubert polynomial bindings, sc.pxi's + # chartafel/kranztafel) stay unusable on this wheel until + # passagemath-modules is ported - this test deliberately stays + # inside the subset that does not need it. + # 2 (not the nicer-looking 1) is correct here: it is upstream's + # own doctest example for this exact call + # (kostka_number_symmetrica's docstring in kostka.pxi). + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: passagemath-combinat + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: passagemath-combinat-${{ matrix.version }}-sdist + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' import sys, zipfile for whl in sys.argv[1:]: names = zipfile.ZipFile(whl).namelist() @@ -250,12 +206,33 @@ jobs: assert licences == {"LICENSE", "LICENSE.symmetrica"}, (whl, licences) print(whl, "ok") EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: passagemath-combinat-${{ env.PASSAGEMATH_COMBINAT_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-musllinux-riscv64-image: quay.io/pypa/musllinux_1_2_riscv64 + cibw-before-all-linux: |- + set -euo pipefail + if command -v apk >/dev/null; then + apk add --no-cache gmp-dev mpfr-dev mpc1-dev curl + else + dnf install -y --setopt=install_weak_deps=False gmp-devel mpfr-devel libmpc-devel + fi + curl -fsSLo /tmp/symmetrica.tar.xz https://github.com/sagemath/sage-package/releases/download/tars/symmetrica-3.1.0.tar.xz + echo "2efc4b1d047c6fe036453882a20e906ca2bedecae888356c7626447db2b10fd3 /tmp/symmetrica.tar.xz" | sha256sum -c - + tar xJf /tmp/symmetrica.tar.xz -C /tmp + cd /tmp/symmetrica-3.1.0 + CFLAGS="-O2 -g -fPIC -DFAST -DALLTRUE" ./configure --prefix=/usr/local --disable-static --enable-shared + make -j"$(nproc)" + make install + ldconfig || true + cibw-environment-linux: > + LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH + LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + CPATH=/usr/local/include:$CPATH + cibw-test-command: > + python -c "from sage.libs.symmetrica.all import kostka_number; + r=kostka_number([2,1],[1,1,1]); + assert r==2, r; + print('symmetrica ok', r)" publish: name: Publish passagemath-combinat ${{ matrix.version }} diff --git a/.github/workflows/build-passagemath-graphs.yml b/.github/workflows/build-passagemath-graphs.yml index e626bef34af..9f60462ab10 100644 --- a/.github/workflows/build-passagemath-graphs.yml +++ b/.github/workflows/build-passagemath-graphs.yml @@ -146,7 +146,7 @@ jobs: - name: upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: passagemath-graphs-${{ env.PASSAGEMATH_GRAPHS_VERSION }}-sdist + name: passagemath-graphs-${{ matrix.version }}-sdist path: pkgs/sagemath-graphs/dist/*.tar.gz if-no-files-found: error @@ -154,71 +154,38 @@ jobs: needs: [setup, python_sdist] if: needs.setup.outputs.versions != '[]' name: Build passagemath-graphs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PASSAGEMATH_GRAPHS_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: passagemath-graphs-${{ env.PASSAGEMATH_GRAPHS_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - # spkg-configure.m4's AX_BOOST_BASE([1.83.0]) accepts a system - # Boost, and the manylinux_riscv64 image's own Rocky 10 - # CRB/AppStream repos already carry boost-devel 1.83.0 (same - # package build-ompl.yml/build-cgal.yml dnf-install) - so this - # never falls back to build/pkgs/boost_cropped's from-source cmake - # build. sage/graphs/base/boost_interface.cpp only uses the - # header-only Boost Graph Library algorithms, so headers are - # enough; nothing from Boost itself is linked into the wheel. - CIBW_BEFORE_ALL_LINUX: | - if command -v apk >/dev/null; then - apk add --no-cache boost-dev gmp-dev mpfr-dev mpc1-dev - else - dnf install -y --setopt=install_weak_deps=False boost-devel gmp-devel mpfr-devel libmpc-devel - fi - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # sagemath-repl (the real test extra) is unported, so this exercises - # the Boost-backed connectivity algorithm directly through the - # Cython bindings. Unlike the bliss/mcqd/cliquer sibling ports, a - # minimal duck-typed graph object does NOT work here: both - # boost_graph_from_sage_graph and boost_weighted_graph_from_sage_graph - # (the latter used internally by eccentricity_DHV) do a hard - # `isinstance(g_sage, GenericGraph)` check and raise TypeError - # otherwise (src/sage/graphs/base/boost_graph.pyx at the pinned - # passagemath-10.8.13 tag) - see gotcha 718. Build a real (minimal) - # Graph instead; passagemath-categories, already a hard dependency, - # supplies everything Graph's constructor needs for a plain 5-cycle. - CIBW_TEST_COMMAND: >- - python -c "from sage.graphs.graph import Graph; - from sage.graphs.base.boost_graph import eccentricity_DHV; - G=Graph([(0,1),(1,2),(2,3),(3,4),(4,0)]); - r=eccentricity_DHV(G); - assert r==[2,2,2,2,2], r; - print('boost_graph ok', r)" - - - name: Check the wheel ships the extension and the licences - run: | - python3 - wheelhouse/*.whl <<'EOF' + # spkg-configure.m4's AX_BOOST_BASE([1.83.0]) accepts a system + # Boost, and the manylinux_riscv64 image's own Rocky 10 + # CRB/AppStream repos already carry boost-devel 1.83.0 (same + # package build-ompl.yml/build-cgal.yml dnf-install) - so this + # never falls back to build/pkgs/boost_cropped's from-source cmake + # build. sage/graphs/base/boost_interface.cpp only uses the + # header-only Boost Graph Library algorithms, so headers are + # enough; nothing from Boost itself is linked into the wheel. + # sagemath-repl (the real test extra) is unported, so this exercises + # the Boost-backed connectivity algorithm directly through the + # Cython bindings. Unlike the bliss/mcqd/cliquer sibling ports, a + # minimal duck-typed graph object does NOT work here: both + # boost_graph_from_sage_graph and boost_weighted_graph_from_sage_graph + # (the latter used internally by eccentricity_DHV) do a hard + # `isinstance(g_sage, GenericGraph)` check and raise TypeError + # otherwise (src/sage/graphs/base/boost_graph.pyx at the pinned + # passagemath-10.8.13 tag) - see gotcha 718. Build a real (minimal) + # Graph instead; passagemath-categories, already a hard dependency, + # supplies everything Graph's constructor needs for a plain 5-cycle. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: passagemath-graphs + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: passagemath-graphs-${{ matrix.version }}-sdist + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' import sys, zipfile for whl in sys.argv[1:]: names = zipfile.ZipFile(whl).namelist() @@ -227,12 +194,22 @@ jobs: assert licences == {"LICENSE"}, (whl, licences) print(whl, "ok") EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: passagemath-graphs-${{ env.PASSAGEMATH_GRAPHS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-musllinux-riscv64-image: quay.io/pypa/musllinux_1_2_riscv64 + cibw-before-all-linux: |- + if command -v apk >/dev/null; then + apk add --no-cache boost-dev gmp-dev mpfr-dev mpc1-dev + else + dnf install -y --setopt=install_weak_deps=False boost-devel gmp-devel mpfr-devel libmpc-devel + fi + cibw-test-command: > + python -c "from sage.graphs.graph import Graph; + from sage.graphs.base.boost_graph import eccentricity_DHV; + G=Graph([(0,1),(1,2),(2,3),(3,4),(4,0)]); + r=eccentricity_DHV(G); + assert r==[2,2,2,2,2], r; + print('boost_graph ok', r)" publish: name: Publish passagemath-graphs ${{ matrix.version }} diff --git a/.github/workflows/build-pvxslibs.yml b/.github/workflows/build-pvxslibs.yml index 3ba653c9258..f167a7e78ed 100644 --- a/.github/workflows/build-pvxslibs.yml +++ b/.github/workflows/build-pvxslibs.yml @@ -90,7 +90,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: pvxslibs-${{ env.PVXS_VERSION }}-sdist + name: pvxslibs-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -98,84 +98,55 @@ jobs: needs: [setup, python_sdist] if: needs.setup.outputs.versions != '[]' name: Build pvxslibs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PVXS_VERSION: ${{ matrix.version }} - - steps: - - name: Fetch sdist artifact - id: fetch_sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: pvxslibs-${{ env.PVXS_VERSION }}-sdist - - - name: Extract sdist - run: | - set -euo pipefail - mkdir pvxslibs - tar zxf "${{ steps.fetch_sdist.outputs.download-path }}"/*.tar.gz \ - --strip-components=1 -C pvxslibs - - # libevent's own BSD licence doesn't reach the wheel through setuptools' - # default top-level licence glob; stage it there like the DSO-vendoring - # ports already in this repo do. - - name: Stage the vendored libevent licence - run: cp pvxslibs/bundle/libevent/LICENSE pvxslibs/LICENSE.libevent - - # Upstream builds/tests every interpreter the same way (python.yml's - # manylinux job): setuptools_dso + epicscorelibs must resolve at build - # time (pyproject.toml build-system.requires), and PyPI also carries a - # newer epicscorelibs sdist inside the version range pvxslibs accepts, - # which has no riscv64 wheel - force binary-only resolution so pip - # can't fall back to source-building it. - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - package-dir: pvxslibs - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=${{ env.PIP_EXTRA_INDEX_URL }} - PIP_ONLY_BINARY=epicscorelibs - # libpvxs.so and libpvxsIoc.so link libCom/libdbCore/libdbRecStd from the - # epicscorelibs wheel (the dep-wheel pattern, gotcha 17); auditwheel can't - # resolve them once the build venv is gone, and they're provided by the - # epicscorelibs wheel at runtime via the $ORIGIN/../../epicscorelibs/lib RPATH. - CIBW_REPAIR_WHEEL_COMMAND_LINUX: >- - auditwheel repair -w {dest_dir} {wheel} - --exclude 'libCom.so*' --exclude 'libdbCore.so*' --exclude 'libdbRecStd.so*' - CIBW_TEST_REQUIRES: nose2 - CIBW_TEST_COMMAND: >- - python -c "import pvxslibs; print('IMPORT', pvxslibs.__file__)" - && python -m nose2 -v pvxslibs - - - name: Check the wheel ships the DSOs and both licences - run: | - python3 - wheelhouse/*.whl <<'EOF' - import sys, zipfile - for whl in sys.argv[1:]: - names = zipfile.ZipFile(whl).namelist() - for dso in ("event_core", "pvxs", "pvxsIoc"): - assert any(n == f"pvxslibs/lib/lib{dso}.so" for n in names), (whl, dso) - licences = {n.rsplit("/", 1)[1] - for n in names if ".dist-info/licenses/" in n} - {""} - assert licences >= {"LICENSE", "LICENSE.libevent"}, (whl, licences) - print(whl, "ok") - EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pvxslibs-${{ env.PVXS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # libevent's own BSD licence doesn't reach the wheel through setuptools' + # default top-level licence glob; stage it there like the DSO-vendoring + # ports already in this repo do. + # Upstream builds/tests every interpreter the same way (python.yml's + # manylinux job): setuptools_dso + epicscorelibs must resolve at build + # time (pyproject.toml build-system.requires), and PyPI also carries a + # newer epicscorelibs sdist inside the version range pvxslibs accepts, + # which has no riscv64 wheel - force binary-only resolution so pip + # can't fall back to source-building it. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: pvxslibs + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: pvxslibs-${{ matrix.version }}-sdist + pre-build: cp bundle/libevent/LICENSE LICENSE.libevent + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' + import sys, zipfile + for whl in sys.argv[1:]: + names = zipfile.ZipFile(whl).namelist() + for dso in ("event_core", "pvxs", "pvxsIoc"): + assert any(n == f"pvxslibs/lib/lib{dso}.so" for n in names), (whl, dso) + licences = {n.rsplit("/", 1)[1] + for n in names if ".dist-info/licenses/" in n} - {""} + assert licences >= {"LICENSE", "LICENSE.libevent"}, (whl, licences) + print(whl, "ok") + EOF + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 90 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-environment-linux: > + PIP_ONLY_BINARY=epicscorelibs + # libpvxs.so and libpvxsIoc.so link libCom/libdbCore/libdbRecStd from the + # epicscorelibs wheel (the dep-wheel pattern, gotcha 17); auditwheel can't + # resolve them once the build venv is gone, and they're provided by the + # epicscorelibs wheel at runtime via the $ORIGIN/../../epicscorelibs/lib RPATH. + cibw-repair-wheel-command-linux: > + auditwheel repair -w {dest_dir} {wheel} + --exclude 'libCom.so*' --exclude 'libdbCore.so*' --exclude 'libdbRecStd.so*' + cibw-test-requires: nose2 + cibw-test-command: > + python -c "import pvxslibs; print('IMPORT', pvxslibs.__file__)" + && python -m nose2 -v pvxslibs publish: name: Publish pvxslibs ${{ matrix.version }} diff --git a/.github/workflows/build-pyjoulescope-driver.yml b/.github/workflows/build-pyjoulescope-driver.yml index de7c8272f67..62e1c5cb6a7 100644 --- a/.github/workflows/build-pyjoulescope-driver.yml +++ b/.github/workflows/build-pyjoulescope-driver.yml @@ -94,7 +94,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: pyjoulescope-driver-${{ env.PYJOULESCOPE_DRIVER_VERSION }}-sdist + name: pyjoulescope-driver-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -102,132 +102,109 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build pyjoulescope-driver ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYJOULESCOPE_DRIVER_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: pyjoulescope-driver-${{ env.PYJOULESCOPE_DRIVER_VERSION }}-sdist - path: dist/ - - - name: Extract the sdist and stage the licence-collection script - run: | - mkdir sdist - tar xzf dist/*.tar.gz --strip-components=1 -C sdist - cat > collect-licenses.sh <<'COLLECT_EOF' - #!/bin/bash - # SPDX-FileCopyrightText: 2026 The RISE Project - # SPDX-License-Identifier: MIT - # - # Stage, at the project root, the licence of every shared library - # auditwheel vendors out of the build image alongside libudev. - # The patched setup.cfg's LICENSE.* glob copies them into the wheel. - set -euo pipefail - - project="${1:?usage: collect-licenses.sh }" - - # ldd is transitive, so the linked lib alone covers its whole closure; - # ldd does not list the root itself, so resolve that too. - mapfile -t libs < <( - { - ldd /usr/lib64/libudev.so | tr ' ' '\n' | grep '^/' - readlink -f /usr/lib64/libudev.so - } | sort -u - ) - - # `rpm -qf` reports unowned files on stdout, so keep only bare package names. - # glibc and the gcc runtime are on auditwheel's manylinux allowlist and - # are never vendored into the wheel. - mapfile -t pkgs < <( - rpm -qf --qf '%{NAME}\n' "${libs[@]}" 2>/dev/null | - grep -E '^[A-Za-z0-9._+-]+$' | sort -u | - grep -vE '^(glibc|libgcc|libstdc\+\+|gcc)$' - ) - - for pkg in "${pkgs[@]}"; do - mapfile -t files < <(rpm -q --licensefiles "$pkg" 2>/dev/null || true) - - # Some subpackages leave the licence to a sibling of the same source RPM. - if [ -z "${files[0]:-}" ]; then - srpm=$(rpm -q --qf '%{SOURCERPM}\n' "$pkg") - mapfile -t files < <( - rpm -qa --qf '%{SOURCERPM} %{NAME}\n' | - awk -v s="$srpm" '$1 == s { print $2 }' | - xargs -r rpm -q --licensefiles 2>/dev/null | sort -u - ) - fi - - # Others mark it %doc rather than %license, and the image installs no docs. - if [ -z "${files[0]:-}" ]; then - dnf -y --disablerepo=extras reinstall --setopt=tsflags= "$pkg" >/dev/null - mapfile -t files < <(rpm -qd "$pkg" | grep -iE '/(LICEN[CS]E|COPYING|NOTICE)') - fi - - for f in "${files[@]}"; do - [ -f "$f" ] || continue - cp "$f" "$project/LICENSE.${pkg}.$(basename "$f")" - done - compgen -G "$project/LICENSE.$pkg.*" >/dev/null || - { echo "no licence file found for $pkg" >&2; exit 1; } - done - - ls -1 "$project"/LICENSE.* | sed "s|$project/||" - COLLECT_EOF - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: sdist - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # libudev-devel doesn't exist on Rocky 10; systemd-devel provides libudev.so/libudev.h instead (gotcha 252) - CIBW_BEFORE_ALL_LINUX: >- - dnf install -y systemd-devel && - bash {project}/collect-licenses.sh {package} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest --pyargs pyjoulescope_driver - - - name: Verify the wheel ships the compiled extension and licences - run: | - python3 - wheelhouse/*.whl <<'EOF' - import sys, zipfile - names = zipfile.ZipFile(sys.argv[1]).namelist() - sos = sorted(n for n in names if n.endswith(".so")) - print("\n".join(sos)) - assert any(n.startswith("pyjoulescope_driver/binding.") for n in sos), sos - - lic = sorted(n.split(".dist-info/licenses/", 1)[1] for n in names - if ".dist-info/licenses/" in n and not n.endswith("/")) - print("\n".join(lic)) - expected_files = { - "LICENSE.txt", - "third-party/libusb/COPYING", - "third-party/miniz/LICENSE", - "third-party/tinyprintf/tinyprintf_LICENSE.BSD-new", - } - assert expected_files <= set(lic), expected_files - set(lic) - expected_pkgs = {"libcap", "systemd-libs"} - have_pkgs = {f.split(".", 2)[1] for f in lic if f.startswith("LICENSE.") and f != "LICENSE.txt"} - assert expected_pkgs <= have_pkgs, expected_pkgs - have_pkgs - EOF - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyjoulescope-driver-${{ env.PYJOULESCOPE_DRIVER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: pyjoulescope-driver + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: pyjoulescope-driver-${{ matrix.version }}-sdist + pre-build: |- + cat > collect-licenses.sh <<'COLLECT_EOF' + #!/bin/bash + # SPDX-FileCopyrightText: 2026 The RISE Project + # SPDX-License-Identifier: MIT + # + # Stage, at the project root, the licence of every shared library + # auditwheel vendors out of the build image alongside libudev. + # The patched setup.cfg's LICENSE.* glob copies them into the wheel. + set -euo pipefail + + project="${1:?usage: collect-licenses.sh }" + + # ldd is transitive, so the linked lib alone covers its whole closure; + # ldd does not list the root itself, so resolve that too. + mapfile -t libs < <( + { + ldd /usr/lib64/libudev.so | tr ' ' '\n' | grep '^/' + readlink -f /usr/lib64/libudev.so + } | sort -u + ) + + # `rpm -qf` reports unowned files on stdout, so keep only bare package names. + # glibc and the gcc runtime are on auditwheel's manylinux allowlist and + # are never vendored into the wheel. + mapfile -t pkgs < <( + rpm -qf --qf '%{NAME}\n' "${libs[@]}" 2>/dev/null | + grep -E '^[A-Za-z0-9._+-]+$' | sort -u | + grep -vE '^(glibc|libgcc|libstdc\+\+|gcc)$' + ) + + for pkg in "${pkgs[@]}"; do + mapfile -t files < <(rpm -q --licensefiles "$pkg" 2>/dev/null || true) + + # Some subpackages leave the licence to a sibling of the same source RPM. + if [ -z "${files[0]:-}" ]; then + srpm=$(rpm -q --qf '%{SOURCERPM}\n' "$pkg") + mapfile -t files < <( + rpm -qa --qf '%{SOURCERPM} %{NAME}\n' | + awk -v s="$srpm" '$1 == s { print $2 }' | + xargs -r rpm -q --licensefiles 2>/dev/null | sort -u + ) + fi + + # Others mark it %doc rather than %license, and the image installs no docs. + if [ -z "${files[0]:-}" ]; then + dnf -y --disablerepo=extras reinstall --setopt=tsflags= "$pkg" >/dev/null + mapfile -t files < <(rpm -qd "$pkg" | grep -iE '/(LICEN[CS]E|COPYING|NOTICE)') + fi + + for f in "${files[@]}"; do + [ -f "$f" ] || continue + cp "$f" "$project/LICENSE.${pkg}.$(basename "$f")" + done + compgen -G "$project/LICENSE.$pkg.*" >/dev/null || + { echo "no licence file found for $pkg" >&2; exit 1; } + done + + ls -1 "$project"/LICENSE.* | sed "s|$project/||" + COLLECT_EOF + post-build: |- + python3 - $GITHUB_WORKSPACE/wheelhouse/*.whl <<'EOF' + import sys, zipfile + names = zipfile.ZipFile(sys.argv[1]).namelist() + sos = sorted(n for n in names if n.endswith(".so")) + print("\n".join(sos)) + assert any(n.startswith("pyjoulescope_driver/binding.") for n in sos), sos + + lic = sorted(n.split(".dist-info/licenses/", 1)[1] for n in names + if ".dist-info/licenses/" in n and not n.endswith("/")) + print("\n".join(lic)) + expected_files = { + "LICENSE.txt", + "third-party/libusb/COPYING", + "third-party/miniz/LICENSE", + "third-party/tinyprintf/tinyprintf_LICENSE.BSD-new", + } + assert expected_files <= set(lic), expected_files - set(lic) + expected_pkgs = {"libcap", "systemd-libs"} + have_pkgs = {f.split(".", 2)[1] for f in lic if f.startswith("LICENSE.") and f != "LICENSE.txt"} + assert expected_pkgs <= have_pkgs, expected_pkgs - have_pkgs + EOF + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 90 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + # libudev-devel doesn't exist on Rocky 10; systemd-devel provides libudev.so/libudev.h instead (gotcha 252) + cibw-before-all-linux: > + dnf install -y systemd-devel && + bash {project}/collect-licenses.sh {package} + cibw-environment-linux: PIP_ONLY_BINARY=numpy + cibw-test-requires: pytest + cibw-test-command: pytest --pyargs pyjoulescope_driver gpl_sources: name: Collect GPL sources for pyjoulescope-driver ${{ matrix.version }} diff --git a/.github/workflows/build-symengine.yml b/.github/workflows/build-symengine.yml index 63d85caa9e4..e144a5ff6b2 100644 --- a/.github/workflows/build-symengine.yml +++ b/.github/workflows/build-symengine.yml @@ -42,8 +42,6 @@ env: # The C++ SymEngine release symengine.py's own symengine_version.txt commit # descends from, pinned by symengine-wheels' recipe/meta.yaml alongside a # sha256 for the release tarball. - SYMENGINE_CXX_VERSION: '0.14.0' - SYMENGINE_CXX_SHA256: '11c5f64e9eec998152437f288b8429ec001168277d55f3f5f1df78e3cf129707' jobs: setup: @@ -88,10 +86,10 @@ jobs: cibw-before-all-linux: > dnf -y install gmp-devel mpfr-devel libmpc-devel && cd /tmp && - curl -fsSLO https://github.com/symengine/symengine/releases/download/v${{ env.SYMENGINE_CXX_VERSION }}/symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && - echo "${{ env.SYMENGINE_CXX_SHA256 }} symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz" | sha256sum -c - && - tar xzf symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && - cmake -Bbuild -Ssymengine-${{ env.SYMENGINE_CXX_VERSION }} -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release + curl -fsSLO https://github.com/symengine/symengine/releases/download/v0.14.0/symengine-0.14.0.tar.gz && + echo "11c5f64e9eec998152437f288b8429ec001168277d55f3f5f1df78e3cf129707 symengine-0.14.0.tar.gz" | sha256sum -c - && + tar xzf symengine-0.14.0.tar.gz && + cmake -Bbuild -Ssymengine-0.14.0 -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_FOR_DISTRIBUTION=yes -DBUILD_SHARED_LIBS=no -DWITH_MPC=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no && cmake --build build -j"$(nproc)" && cmake --build build --target install && diff --git a/.github/workflows/build-tblite.yml b/.github/workflows/build-tblite.yml index de3bc7893d2..9688bd96dda 100644 --- a/.github/workflows/build-tblite.yml +++ b/.github/workflows/build-tblite.yml @@ -98,7 +98,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: tblite-${{ env.TBLITE_VERSION }}-sdist + name: tblite-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -106,66 +106,45 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build tblite ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TBLITE_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: tblite-${{ env.TBLITE_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # The subprojects' openmp options yield to python/, not tblite, so -fopenmp still reached - # tblite's loops and libgomp's dynamic schedule faults on the riscv64 runners (#617). - # ddX calls omp_* regardless of its option, hence LDFLAGS=-fopenmp below. - CIBW_CONFIG_SETTINGS: >- - setup-args="-Dtblite:openmp=false" - setup-args="-Ddftd4:openmp=false" - setup-args="-Dmulticharge:openmp=false" - setup-args="-Ds-dftd3:openmp=false" - setup-args="-Dddx:openmp=false" - CIBW_REPAIR_WHEEL_COMMAND_LINUX: 'auditwheel repair -w {dest_dir} {wheel} --exclude libgomp.so.1' - CIBW_BEFORE_ALL_LINUX: yum install -y lapack-devel - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,pillow,matplotlib - LDFLAGS=-fopenmp - # Upstream's wheel smoke test plus the `pytest --pyargs tblite` run of its build.yml. - # ase's own `matplotlib` runtime dep (and matplotlib's `pillow` dep) are newer on - # PyPI than on our registry, so PIP_EXTRA_INDEX_URL alone lets pip pick PyPI's - # sdist-only releases over our riscv64 wheels; pillow's then fails to compile with - # `RequiredDependencyException: jpeg` (no libjpeg headers in the manylinux image). - # CLAUDE.md gotcha 291. - CIBW_TEST_REQUIRES: pytest ase - CIBW_TEST_COMMAND: >- - python -c "import tblite.interface" && - pytest --pyargs tblite -v && - python -c "import importlib.metadata as m; names = [p.name for p in m.files('tblite')]; assert 'LICENSE.lapack' in names and 'COPYING.LESSER' in names, names" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tblite-${{ env.TBLITE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: tblite + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: tblite-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 180 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + # The subprojects' openmp options yield to python/, not tblite, so -fopenmp still reached + # tblite's loops and libgomp's dynamic schedule faults on the riscv64 runners (#617). + # ddX calls omp_* regardless of its option, hence LDFLAGS=-fopenmp below. + cibw-config-settings: > + setup-args="-Dtblite:openmp=false" + setup-args="-Ddftd4:openmp=false" + setup-args="-Dmulticharge:openmp=false" + setup-args="-Ds-dftd3:openmp=false" + setup-args="-Dddx:openmp=false" + cibw-repair-wheel-command-linux: auditwheel repair -w {dest_dir} {wheel} --exclude libgomp.so.1 + cibw-before-all-linux: yum install -y lapack-devel + cibw-environment-linux: > + PIP_ONLY_BINARY=numpy,pillow,matplotlib + LDFLAGS=-fopenmp + # Upstream's wheel smoke test plus the `pytest --pyargs tblite` run of its build.yml. + # ase's own `matplotlib` runtime dep (and matplotlib's `pillow` dep) are newer on + # PyPI than on our registry, so PIP_EXTRA_INDEX_URL alone lets pip pick PyPI's + # sdist-only releases over our riscv64 wheels; pillow's then fails to compile with + # `RequiredDependencyException: jpeg` (no libjpeg headers in the manylinux image). + # CLAUDE.md gotcha 291. + cibw-test-requires: pytest ase + cibw-test-command: > + python -c "import tblite.interface" && + pytest --pyargs tblite -v && + python -c "import importlib.metadata as m; names = [p.name for p in m.files('tblite')]; assert 'LICENSE.lapack' in names and 'COPYING.LESSER' in names, names" gpl_sources: name: Collect GPL sources for tblite ${{ matrix.version }} diff --git a/.github/workflows/build-tilelang.yml b/.github/workflows/build-tilelang.yml index ddbfb8eac34..b4ce30e7c82 100644 --- a/.github/workflows/build-tilelang.yml +++ b/.github/workflows/build-tilelang.yml @@ -97,7 +97,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: tilelang-${{ env.TILELANG_VERSION }}-sdist + name: tilelang-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -105,64 +105,45 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build tilelang ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 600 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TILELANG_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: tilelang-${{ env.TILELANG_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_ARCHS: riscv64 - CIBW_SKIP: '*-musllinux_*' - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BUILD_FRONTEND: build - # Upstream's own [tool.cibuildwheel.linux] always sets USE_CUDA=ON - # and USE_ROCM=ON and installs a CUDA toolkit via dnf; override for - # the CPU-only build upstream documents but never ships itself - # (docs/get_started/Installation.md: "USE_CUDA: ... set to OFF to - # build a CPU version", "USE_LLVM: enable LLVM backend for CPU - # codegen"). USE_LLVM=ON auto-detects llvm-config from PATH. - CIBW_BEFORE_ALL_LINUX: dnf -y --enablerepo=crb install llvm-devel - CIBW_ENVIRONMENT_LINUX: >- - USE_CUDA=OFF USE_ROCM=OFF USE_LLVM=ON - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - UV_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - UV_INDEX_STRATEGY=unsafe-best-match - CIBW_TEST_ENVIRONMENT_LINUX: >- - PIP_ONLY_BINARY=:all: - UV_ONLY_BINARY=:all: - # Mirror upstream's own repair-wheel-command, dropping the - # CUDA-only excludes (no libcuda/CUDA toolkit in a CPU-only build). - # libtvm_ffi.so/libz3.so* come from the apache-tvm-ffi/z3-solver - # dependency wheels, not bundled here. - CIBW_REPAIR_WHEEL_COMMAND_LINUX: >- - auditwheel -v repair --exclude libtvm_ffi.so --exclude 'libz3.so*' -w {dest_dir} {wheel} - CIBW_TEST_COMMAND: 'python -c "import tilelang; print(tilelang.__version__)"' - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tilelang-${{ env.TILELANG_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: tilelang + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: tilelang-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 600 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-skip: "*-musllinux_*" + cibw-build-frontend: build + # Upstream's own [tool.cibuildwheel.linux] always sets USE_CUDA=ON + # and USE_ROCM=ON and installs a CUDA toolkit via dnf; override for + # the CPU-only build upstream documents but never ships itself + # (docs/get_started/Installation.md: "USE_CUDA: ... set to OFF to + # build a CPU version", "USE_LLVM: enable LLVM backend for CPU + # codegen"). USE_LLVM=ON auto-detects llvm-config from PATH. + cibw-before-all-linux: dnf -y --enablerepo=crb install llvm-devel + cibw-environment-linux: > + USE_CUDA=OFF + USE_ROCM=OFF + USE_LLVM=ON + UV_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ + UV_INDEX_STRATEGY=unsafe-best-match + cibw-test-environment-linux: > + PIP_ONLY_BINARY=:all: + UV_ONLY_BINARY=:all: + # Mirror upstream's own repair-wheel-command, dropping the + # CUDA-only excludes (no libcuda/CUDA toolkit in a CPU-only build). + # libtvm_ffi.so/libz3.so* come from the apache-tvm-ffi/z3-solver + # dependency wheels, not bundled here. + cibw-repair-wheel-command-linux: > + auditwheel -v repair --exclude libtvm_ffi.so --exclude 'libz3.so*' -w {dest_dir} {wheel} + cibw-test-command: python -c "import tilelang; print(tilelang.__version__)" publish: name: Publish tilelang ${{ matrix.version }} diff --git a/.github/workflows/build-vaex-core.yml b/.github/workflows/build-vaex-core.yml index b1f6dd8e244..d655d0b9254 100644 --- a/.github/workflows/build-vaex-core.yml +++ b/.github/workflows/build-vaex-core.yml @@ -38,8 +38,6 @@ permissions: env: MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 # Final PCRE1 release; superstrings needs libpcre + libpcrecpp (PCRE1, not PCRE2). - PCRE_VERSION: '8.45' - PCRE_SHA256: '4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09' jobs: setup: @@ -85,11 +83,11 @@ jobs: # package dir. cibw-before-all-linux: > cd /tmp && - curl -fsSL --retry 5 -o pcre-${{ env.PCRE_VERSION }}.tar.gz https://sourceforge.net/projects/pcre/files/pcre/${{ env.PCRE_VERSION }}/pcre-${{ env.PCRE_VERSION }}.tar.gz/download && - echo "${{ env.PCRE_SHA256 }} pcre-${{ env.PCRE_VERSION }}.tar.gz" | sha256sum -c - && - tar xzf pcre-${{ env.PCRE_VERSION }}.tar.gz && - (cd pcre-${{ env.PCRE_VERSION }} && ./configure --prefix=/usr --libdir=/usr/lib64 --disable-static --enable-cpp --enable-utf --enable-unicode-properties && make -j"$(nproc)" && make install) && - cp pcre-${{ env.PCRE_VERSION }}/LICENCE /project/packages/vaex-core/LICENSE.pcre + curl -fsSL --retry 5 -o pcre-8.45.tar.gz https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz/download && + echo "4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09 pcre-8.45.tar.gz" | sha256sum -c - && + tar xzf pcre-8.45.tar.gz && + (cd pcre-8.45 && ./configure --prefix=/usr --libdir=/usr/lib64 --disable-static --enable-cpp --enable-utf --enable-unicode-properties && make -j"$(nproc)" && make install) && + cp pcre-8.45/LICENCE /project/packages/vaex-core/LICENSE.pcre # Upstream's import smoke test, plus a regex search so pcrecpp is # really called, plus a check that the PCRE licence made it in. cibw-test-command: > diff --git a/.github/workflows/build-viennarna.yml b/.github/workflows/build-viennarna.yml index a7e199578ef..a0d8a41504e 100644 --- a/.github/workflows/build-viennarna.yml +++ b/.github/workflows/build-viennarna.yml @@ -154,7 +154,7 @@ jobs: - name: Upload sdist artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: viennarna-${{ env.VIENNARNA_VERSION }}-sdist + name: viennarna-${{ matrix.version }}-sdist path: dist/*.tar.gz if-no-files-found: error @@ -162,47 +162,26 @@ jobs: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' name: Build viennarna ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - VIENNARNA_VERSION: ${{ matrix.version }} - - steps: - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: viennarna-${{ env.VIENNARNA_VERSION }}-sdist - path: dist/ - - - id: sdist_path - run: echo "path=$(echo dist/*.tar.gz)" >> "$GITHUB_OUTPUT" - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ${{ steps.sdist_path.outputs.path }} - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: >- - python -c "import importlib.metadata as md; - got = {p.name for p in md.files('viennarna') if '.dist-info/licenses/' in str(p)}; - assert {'COPYING', 'LICENSE.libsvm', 'LICENSE.dlib', 'LICENSE.json'} <= got, got" && - pytest --datadir {package}/tests/data {package}/tests/python - - - name: Store wheels - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: viennarna-${{ env.VIENNARNA_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: viennarna + version: ${{ matrix.version }} + source: artifact-sdist + source-artifact: viennarna-${{ matrix.version }}-sdist + artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + timeout-minutes: 360 + cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 + cibw-test-requires: pytest + cibw-test-command: > + python -c "import importlib.metadata as md; + got = {p.name for p in md.files('viennarna') if '.dist-info/licenses/' in str(p)}; + assert {'COPYING', 'LICENSE.libsvm', 'LICENSE.dlib', 'LICENSE.json'} <= got, got" && + pytest --datadir {package}/tests/data {package}/tests/python gpl_sources: name: Collect GPL sources for viennarna ${{ matrix.version }}