Skip to content

Commit

Permalink
try fix the musl and x86 darwin builds
Browse files Browse the repository at this point in the history
  • Loading branch information
seapagan committed Feb 28, 2025
1 parent c368b3b commit 2cb87fe
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 2cb87fe

Please sign in to comment.