Skip to content

Commit

Permalink
chore: Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 31, 2023
1 parent 5a3626d commit 9ac13ff
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,36 +178,48 @@ jobs:
with:
python-version: "3.10"

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_SKIP: "*-macosx_arm64"
CIBW_REPAIR_WHEEL_COMMAND: |
export MACOSX_DEPLOYMENT_TARGET=12.0
export MACOS_DEPLOYMENT_TARGET=12.0
run: |
export MACOSX_DEPLOYMENT_TARGET=12.0
export MACOS_DEPLOYMENT_TARGET=12.0
PREFIX="/usr/local/Cellar/openssl@3/3.1.3"
ls $PREFIX
export CFLAGS="$CFLAGS -Wno-implicit-function-declaration -I$PREFIX/include"
export CXXFLAGS="$CXXFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -Wl,-S -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -lssl -lcrypto"
DYLD_LIBRARY_PATH="$LIBRARY_PATH" python -m cibuildwheel --output-dir wheelhouse
echo "Target delocate archs: {delocate_archs}"
echo "Target delocate archs: {delocate_archs}"
ORIGINAL_WHEEL={wheel}
ORIGINAL_WHEEL={wheel}
echo "Running delocate-listdeps to list linked original wheel dependencies"
delocate-listdeps --all $ORIGINAL_WHEEL
echo "Running delocate-listdeps to list linked original wheel dependencies"
delocate-listdeps --all $ORIGINAL_WHEEL
echo "Renaming .whl file when architecture is 'macosx_arm64'"
RENAMED_WHEEL=${ORIGINAL_WHEEL//x86_64/arm64}
echo "Renaming .whl file when architecture is 'macosx_arm64'"
RENAMED_WHEEL=${ORIGINAL_WHEEL//x86_64/arm64}
echo "Wheel will be renamed to $RENAMED_WHEEL"
mv $ORIGINAL_WHEEL $RENAMED_WHEEL
echo "Wheel will be renamed to $RENAMED_WHEEL"
mv $ORIGINAL_WHEEL $RENAMED_WHEEL
echo "Running delocate-wheel command on $RENAMED_WHEEL"
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v $RENAMED_WHEEL
echo "Running delocate-wheel command on $RENAMED_WHEEL"
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v $RENAMED_WHEEL
echo "Running delocate-listdeps to list linked wheel dependencies"
WHEEL_SIMPLE_FILENAME="${RENAMED_WHEEL##*/}"
delocate-listdeps --all {dest_dir}/$WHEEL_SIMPLE_FILENAME
echo "DONE."
echo "Running delocate-listdeps to list linked wheel dependencies"
WHEEL_SIMPLE_FILENAME="${RENAMED_WHEEL##*/}"
delocate-listdeps --all {dest_dir}/$WHEEL_SIMPLE_FILENAME
echo "DONE."
- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 9ac13ff

Please sign in to comment.