|
49 | 49 | command: sdist |
50 | 50 | args: -o dist |
51 | 51 | before-script-linux: | |
52 | | - yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev |
| 52 | + sudo apt-get update && sudo apt-get install -y libssl-dev |
53 | 53 |
|
54 | 54 | - name: Upload sdist |
55 | 55 | uses: actions/upload-artifact@v4 |
|
78 | 78 | args: --release -o dist |
79 | 79 | manylinux: ${{ matrix.manylinux || 'auto' }} |
80 | 80 | before-script-linux: | |
81 | | - yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev |
| 81 | + # Install OpenSSL for x86_64 (manylinux2014 with OpenSSL 1.1) |
| 82 | + if [ "${{ matrix.target }}" = "x86_64" ]; then |
| 83 | + yum install -y openssl11-devel |
| 84 | + # Create symlinks so pkg-config finds openssl11 as openssl |
| 85 | + ln -sf /usr/lib64/pkgconfig/openssl11.pc /usr/lib64/pkgconfig/openssl.pc |
| 86 | + ln -sf /usr/lib64/pkgconfig/libssl11.pc /usr/lib64/pkgconfig/libssl.pc |
| 87 | + ln -sf /usr/lib64/pkgconfig/libcrypto11.pc /usr/lib64/pkgconfig/libcrypto.pc |
| 88 | + fi |
| 89 | +
|
| 90 | + # Install precompiled OpenSSL from Debian packages for aarch64 |
| 91 | + if [ "${{ matrix.target }}" = "aarch64" ]; then |
| 92 | + set -e |
| 93 | + echo "Installing OpenSSL for aarch64 from Debian packages..." |
| 94 | +
|
| 95 | + (cd /tmp |
| 96 | + # Debian Bullseye arm64 packages (OpenSSL 1.1.1) |
| 97 | + DEBIAN_MIRROR="http://ftp.debian.org/debian/pool/main/o/openssl" |
| 98 | + curl -sLO "${DEBIAN_MIRROR}/libssl1.1_1.1.1w-0+deb11u1_arm64.deb" |
| 99 | + curl -sLO "${DEBIAN_MIRROR}/libssl-dev_1.1.1w-0+deb11u1_arm64.deb" |
| 100 | +
|
| 101 | + # Extract .deb packages (ar format) |
| 102 | + for deb in *.deb; do |
| 103 | + ar x "$deb" |
| 104 | + tar xf data.tar.* |
| 105 | + rm -f debian-binary control.tar.* data.tar.* |
| 106 | + done |
| 107 | +
|
| 108 | + # Install to maturin's expected location |
| 109 | + TARGET_DIR="/usr/aarch64-unknown-linux-gnu" |
| 110 | + mkdir -p "${TARGET_DIR}/include/openssl" "${TARGET_DIR}/lib" |
| 111 | +
|
| 112 | + # Copy main OpenSSL headers (architecture-independent) |
| 113 | + cp -r usr/include/openssl/* "${TARGET_DIR}/include/openssl/" |
| 114 | +
|
| 115 | + # Overwrite with architecture-specific headers |
| 116 | + cp -f usr/include/aarch64-linux-gnu/openssl/configuration.h "${TARGET_DIR}/include/openssl/" || true |
| 117 | + cp -f usr/include/aarch64-linux-gnu/openssl/opensslconf.h "${TARGET_DIR}/include/openssl/" || true |
| 118 | +
|
| 119 | + # Copy libraries |
| 120 | + cp -a usr/lib/aarch64-linux-gnu/libssl* "${TARGET_DIR}/lib/" |
| 121 | + cp -a usr/lib/aarch64-linux-gnu/libcrypto* "${TARGET_DIR}/lib/" |
| 122 | +
|
| 123 | + # Verify |
| 124 | + echo "✓ OpenSSL installed" |
| 125 | + ls "${TARGET_DIR}/lib/libssl.a" && echo "✓ libssl.a found" |
| 126 | + ls "${TARGET_DIR}/include/openssl/opensslv.h" && echo "✓ opensslv.h found" |
| 127 | + ls "${TARGET_DIR}/include/openssl/opensslconf.h" && echo "✓ opensslconf.h found" |
| 128 | + ) # End subshell |
| 129 | +
|
| 130 | + # Fix ring crate build: define ARM architecture version for aarch64 |
| 131 | + export CFLAGS_aarch64_unknown_linux_gnu="-D__ARM_ARCH=8" |
| 132 | + fi |
82 | 133 |
|
83 | 134 | - name: Upload wheels |
84 | 135 | uses: actions/upload-artifact@v4 |
|
0 commit comments