Skip to content

Commit

Permalink
Fix the MacOS wheel build
Browse files Browse the repository at this point in the history
  • Loading branch information
rlouf committed Dec 5, 2024
1 parent 617a2c8 commit 51eb2c9
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/release_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
release:
types:
- created
pull_request:
branches: [main]

jobs:
build_wheels:
Expand Down Expand Up @@ -37,8 +39,6 @@ jobs:
toolchain: stable
override: true

- run: rustup target add x86_64-apple-darwin

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
Expand All @@ -48,24 +48,14 @@ jobs:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BEFORE_ALL_LINUX: |
curl -sSf https://sh.rustup.rs | sh -s -- -y
# From https://github.com/Intreecom/scyllapy/blob/05fdab32dd7468c26533de5fdfe9627fa3e38445/.github/workflows/release.yaml#L38
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
elif command -v apt &> /dev/null; then
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi
apt update -y && apt-get install -y pkg-config libssl-dev
CIBW_BEFORE_ALL_MACOS: |
curl -sSf https://sh.rustup.rs | sh -s -- -y
rustup target add aarch64-apple-darwin x86_64-apple-darwin
CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc
CIBW_BEFORE_BUILD: pip install setuptools-rust
CIBW_ENVIRONMENT: PATH="$HOME/.cargo/bin:$PATH"
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12
CIBW_TEST_COMMAND: python -c "import outlines_core; print(outlines_core.__version__)"
CMAKE_PREFIX_PATH: ./dist

Expand Down

0 comments on commit 51eb2c9

Please sign in to comment.