From 2cb87feb327888acf057599fc08448a46051cc7b Mon Sep 17 00:00:00 2001 From: Grant Ramsay Date: Fri, 28 Feb 2025 12:39:05 +0000 Subject: [PATCH] try fix the musl and x86 darwin builds --- .github/workflows/release.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5b9e20..33922f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: binary_target: x86_64-unknown-linux-gnu - os: windows-latest binary_target: x86_64-pc-windows-msvc - - os: macos-latest + - os: macos-13 binary_target: x86_64-apple-darwin - os: macos-latest binary_target: aarch64-apple-darwin @@ -30,9 +30,31 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install musl tools + - name: Install musl tools and OpenSSL if: matrix.binary_target == 'x86_64-unknown-linux-musl' - run: sudo apt-get install -y musl-tools + run: | + sudo apt-get update + sudo apt-get install -y musl-tools musl-dev pkg-config linux-headers-generic + # Install and configure OpenSSL for MUSL + sudo apt-get install -y wget + OPENSSL_VERSION=3.4.1 + wget https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz + tar xvf openssl-$OPENSSL_VERSION.tar.gz + cd openssl-$OPENSSL_VERSION + # Configure OpenSSL for MUSL + CC="musl-gcc -fPIC" ./Configure no-shared no-async linux-x86_64 + make -j$(nproc) + sudo make install + cd .. + # Set OpenSSL env vars for the build + echo "OPENSSL_DIR=/usr/local" >> $GITHUB_ENV + echo "OPENSSL_STATIC=1" >> $GITHUB_ENV + + - name: Install macOS dependencies (x86_64) + if: matrix.binary_target == 'x86_64-apple-darwin' + run: | + brew install openssl@3 + echo 'export OPENSSL_DIR=$(brew --prefix openssl@3)' >> $GITHUB_ENV - name: Install target run: rustup target add ${{ matrix.binary_target }}