forked from Erotemic/flann
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Homebrew building and updated ciwheelbuild
- Loading branch information
1 parent
8ccfc77
commit 7bd9baa
Showing
23 changed files
with
287 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,10 @@ jobs: | |
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.7] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -24,26 +25,14 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: macOS - Prepare MacPorts - Prefer Xcode 11.5 | ||
if: ${{ runner.os == 'macOS' }} | ||
run: | | ||
xcode-select -p | ||
xcodebuild -version | ||
sudo xcode-select -s /Applications/Xcode_11.5.app/Contents/Developer | ||
xcodebuild -version | ||
- name: macOS - Install MacPorts | ||
if: ${{ runner.os == 'macOS' }} | ||
uses: WildbookOrg/wbia-pypkg-build/actions/[email protected] | ||
|
||
- name: Build wheel | ||
env: | ||
CIBW_SKIP: cp27-* pp27-* pp36-* *-win32 *-win_amd64 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x | ||
CIBW_BEFORE_BUILD_LINUX: bash scripts/ci_prepare_centos_for_build.sh | ||
CIBW_SKIP: pp* cp36-* *_i686 *_ppc64le *_s390x cp36-musllinux_* cp37-musllinux_* cp38-musllinux_* cp39-musllinux_* cp310-musllinux_* | ||
CIBW_BEFORE_BUILD_LINUX: bash scripts/ci_prepare_linux_for_build.sh | ||
CIBW_BEFORE_BUILD_MACOS: bash scripts/ci_prepare_macos_for_build.sh | ||
CIBW_TEST_COMMAND: python -c "import pyflann; from pyflann.__main__ import main; main()" | ||
run: | | ||
python -m pip install cibuildwheel==1.4.2 | ||
python -m pip install cibuildwheel | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v2 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Testing | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.8' | ||
|
||
# Lint things before going any further | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --show-source --statistics | ||
# exit-zero treats all errors as warnings. | ||
flake8 . --count --exit-zero --max-complexity=10 --statistics | ||
test: | ||
name: Test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, ubuntu-18.04, macos-latest, macos-11] | ||
python-version: [3.7, 3.8, 3.9, '3.10'] | ||
|
||
steps: | ||
# Checkout and env setup | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies (Linux) | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
sudo bash scripts/ci_prepare_linux_for_build.sh | ||
- name: Install dependencies (macOS) | ||
if: ${{ runner.os == 'macOS' }} | ||
run: | | ||
bash scripts/ci_prepare_macos_for_build.sh | ||
- name: Build project | ||
run: | | ||
bash run_developer_setup.sh | ||
# Install and test | ||
- name: Install project | ||
run: | | ||
pip install -e .[tests] | ||
- name: Test project | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
############################################################################### | ||
# Find LZ4 | ||
# | ||
# This sets the following variables: | ||
# LZ4_FOUND - True if LZ4 was found. | ||
# LZ4_INCLUDE_DIRS - Directories containing the LZ4 include files. | ||
# LZ4_LIBRARIES - Libraries needed to use LZ4. | ||
# LZ4_LIBRARY - Library needed to use LZ4. | ||
# LZ4_LIBRARY_DIRS - Library needed to use LZ4. | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
# If found, LZ$_* variables will be defined | ||
pkg_check_modules(LZ4 REQUIRED liblz4) | ||
|
||
if(NOT LZ4_FOUND) | ||
find_path(LZ4_INCLUDE_DIR lz4.h | ||
HINTS "${LZ4_ROOT}" "$ENV{LZ4_ROOT}" | ||
PATHS "$ENV{PROGRAMFILES}/lz4" "$ENV{PROGRAMW6432}/lz4" | ||
PATH_SUFFIXES include) | ||
|
||
find_library(LZ4_LIBRARY | ||
NAMES lz4 lz4_static | ||
HINTS "${LZ4_ROOT}" "$ENV{LZ4_ROOT}" | ||
PATHS "$ENV{PROGRAMFILES}/lz4" "$ENV{PROGRAMW6432}/lz4" | ||
PATH_SUFFIXES lib) | ||
|
||
if(LZ4_LIBRARY) | ||
set(LZ4_LIBRARIES ${LZ4_LIBRARY}) | ||
get_filename_component(LZ4_LIBRARY_DIRS ${LZ4_LIBRARY} DIRECTORY) | ||
endif() | ||
else() | ||
find_library(LZ4_LIBRARY | ||
NAMES lz4 lz4_static | ||
PATHS ${LZ4_LIBRARY_DIRS} | ||
NO_DEFAULT_PATH) | ||
endif() | ||
|
||
mark_as_advanced(LZ4_LIBRARY LZ4_INCLUDE_DIRS LZ4_LIBRARY_DIRS LZ4_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "scikit-build", "cmake", "ninja"] | ||
requires = ["setuptools", "wheel", "setuptools_scm[toml]", "scikit-build", "cmake", "ninja"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cmake | ||
ninja | ||
scikit-build | ||
setuptools>=42 | ||
setuptools_scm[toml]>=3.4 | ||
setuptools | ||
setuptools_scm[toml] | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
brunette | ||
codecov >= 2.0.15 | ||
coverage >= 4.3.4 | ||
pytest >= 5.4.3 | ||
codecov | ||
coverage | ||
pytest | ||
pytest-cov | ||
xdoctest >= 0.3.0 | ||
xdoctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
pip install -r requirements/build.txt | ||
|
||
if command -v yum &> /dev/null | ||
then | ||
yum install -y \ | ||
pkgconfig \ | ||
boost \ | ||
boost-thread \ | ||
boost-devel \ | ||
libgomp \ | ||
hdf5-openmpi \ | ||
lz4-devel | ||
else | ||
apt-get install \ | ||
pkg-config \ | ||
libboost-all-dev \ | ||
libopenmpi-dev \ | ||
libomp5 \ | ||
libomp-dev \ | ||
libhdf5-openmpi-dev \ | ||
liblz4-dev | ||
fi |
Oops, something went wrong.