diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f663790..041f72a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -11,7 +11,7 @@ on: - main - master tags: - - '*' + - "*" pull_request: workflow_dispatch: @@ -48,7 +48,46 @@ jobs: manylinux: 2_28 # needed for rocksdb before-script-linux: | - yum install -y clang llvm-devel + # Install go within the docker container - only used for manylinux builds + # since they need an isolated docker context. The other build pipelines + # just run within the host so use the global worker's go install. + # Determine the machine architecture + echo "Raw architecture: $(uname -m)" + + # Log the current glibc version + ldd --version + + # System configs + uname -a + cat /etc/os-release + cat /proc/version + + # Determine distribution from /etc/os-release + DISTRO=$(grep ^ID= /etc/os-release | cut -d= -f2 | tr -d '"') + + # Install necessary packages based on the distribution + if [ "$DISTRO" = "centos" ]; then + # CentOS specific package installation + yum -y install wget llvm-toolset-7 centos-release-scl + export PATH=/opt/rh/llvm-toolset-7/root/usr/bin:/opt/rh/llvm-toolset-7/root/usr/sbin:/opt/rh/devtoolset-10/root/usr/bin:$PATH + export LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ + elif [ "$DISTRO" = "ubuntu" ]; then + # Ubuntu specific package installation + # Clang is already installed as part of the base image + apt-get update + apt-get -y install wget + + # The maturin environment includes the gcc cross-compilers for aarch64, but it + # doesn't include the necessary headers + # This causes issues when rust / bindgen tries to run clang, which will fail with + # missing headers like 'bits/libc-header-start.h' file not found + # We install the headers here to fix this issue + apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + find /usr -name libc-header-start.h + else + echo "Unsupported distribution: $DISTRO" + exit 1 + fi # - name: Upload wheels # uses: actions/upload-artifact@v4