Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wheel publishing and minor clean up #23

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 33 additions & 61 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,84 +11,56 @@ jobs:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
MACOSX_DEPLOYMENT_TARGET: "10.15"
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
cibw_archs: ["auto"]
os: [ubuntu-20.04, macos-11, windows-latest]
cibw_archs: ["auto64"]
cibw_build: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]

steps:
- uses: actions/checkout@v2
name: Check out
- uses: actions/checkout@v3
name: Check out


- uses: actions/setup-python@v3
- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel delvewheel

- name: Build wheels for CPython 3.10
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp310-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BEFORE_BUILD_MACOS: brew install gcc@8
CIBW_ARCHS_WINDOWS: "auto64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
python -m pip install cibuildwheel==2.12.1 delvewheel wheel

- name: Build wheels for CPython 3.9
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp39-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BEFORE_BUILD_MACOS: brew install gcc@8
CIBW_ARCHS_WINDOWS: "auto64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}

- name: Build wheels for CPython 3.8
- name: Building wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp38-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BEFORE_BUILD_MACOS: brew install gcc@8
CIBW_ARCHS_WINDOWS: "auto64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: "*musllinux*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_MACOS: brew install llvm &&
bash ci-utils/install_prereq_linux.sh &&
mkdir -p /tmp/filepattern_bld &&
cp -r local_install /tmp/filepattern_bld
CIBW_BEFORE_ALL_LINUX: bash ci-utils/install_prereq_linux.sh &&
mkdir -p /tmp/filepattern_bld &&
cp -r local_install /tmp/filepattern_bld
CIBW_BEFORE_ALL_WINDOWS: ci-utils\install_prereq_win.bat &&
xcopy /E /I /y local_install C:\TEMP\filepattern_bld\local_install

- name: Build wheels for CPython 3.7
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp37-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BEFORE_BUILD_MACOS: brew install gcc@8
CIBW_ARCHS_WINDOWS: "auto64"
CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/filepattern_bld/local_install/lib:/tmp/filepattern_bld/local_install/lib64" ON_GITHUB="TRUE" PATH="$(brew --prefix llvm)/bin:$PATH" COMPILER="/usr/local/opt/llvm/bin/clang++" CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include" CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include" LDFLAGS="-L /usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" CXX="/usr/local/opt/llvm/bin/clang++" CC="/usr/local/opt/llvm/bin/clang" FILEPATTERN_DEP_DIR="/tmp/filepattern_bld/local_install"
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/filepattern_bld/local_install/lib:/tmp/filepattern_bld/local_install/lib64:$LD_LIBRARY_PATH" ON_GITHUB="TRUE" FILEPATTERN_DEP_DIR="/tmp/filepattern_bld/local_install"
CIBW_ENVIRONMENT_WINDOWS: PATH="$TEMP\\filepattern\\bin;$PATH" ON_GITHUB="TRUE" FILEPATTERN_DEP_DIR="C:\\TEMP\\filepattern_bld\\local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/tests/

- name: Build wheels for CPython 3.6
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp36-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BEFORE_BUILD_MACOS: brew install gcc@8
CIBW_ARCHS_WINDOWS: "auto64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}

- name: Install Dependencies
run: python -m pip install --upgrade twine requests
Expand All @@ -98,4 +70,4 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY: pypi
TWINE_REPOSITORY: pypi
10 changes: 0 additions & 10 deletions build-wheels-mac.sh

This file was deleted.

11 changes: 0 additions & 11 deletions build-wheels.sh

This file was deleted.

10 changes: 5 additions & 5 deletions ci-utils/install_prereq_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ if [ -z "$1" ]
then
echo "No path to the Filepattern source location provided"
echo "Creating local_install directory"
Z5_INSTALL_DIR="local_install"
LOCAL_INSTALL_DIR="local_install"
else
Z5_INSTALL_DIR=$1
LOCAL_INSTALL_DIR=$1
fi

mkdir -p $Z5_INSTALL_DIR
mkdir -p $Z5_INSTALL_DIR/include
mkdir -p $LOCAL_INSTALL_DIR
mkdir -p $LOCAL_INSTALL_DIR/include

git clone https://github.com/pybind/pybind11.git
cd pybind11
mkdir build_man
cd build_man/
cmake -DCMAKE_INSTALL_PREFIX=../../$Z5_INSTALL_DIR/ -DPYBIND11_TEST=OFF ..
cmake -DCMAKE_INSTALL_PREFIX=../../$LOCAL_INSTALL_DIR/ -DPYBIND11_TEST=OFF ..
make install -j4
cd ../../
12 changes: 0 additions & 12 deletions install_win_filepattern.bat

This file was deleted.