-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
585 additions
and
120 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ci/multibuild"] | ||
path = ci/multibuild | ||
url = https://github.com/matthew-brett/multibuild |
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,81 @@ | ||
env: | ||
global: | ||
- REPO_DIR=. | ||
# Commit from your-project that you want to build | ||
#- BUILD_COMMIT=v0.1.0 | ||
# pip dependencies to _build_ your project | ||
#- BUILD_DEPENDS="Cython numpy" | ||
# pip dependencies to _test_ your project. Include any dependencies | ||
# that you need, that are also specified in BUILD_DEPENDS, this will be | ||
# a separate install. | ||
- TEST_DEPENDS="pytest" | ||
- PLAT=x86_64 | ||
- CONFIG_PATH="ci/multibuild_config.sh" | ||
|
||
language: python | ||
# The travis Python version is unrelated to the version we build and test | ||
# with. This is set with the MB_PYTHON_VERSION variable. | ||
python: 3.5 | ||
sudo: required | ||
dist: trusty | ||
services: docker | ||
|
||
cache: | ||
directories: | ||
- $HOME/.ccache | ||
|
||
matrix: | ||
exclude: | ||
# Exclude the default Python 3.5 build | ||
- python: 3.5 | ||
include: | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
- PLAT=i686 | ||
- USE_CCACHE=1 | ||
- FREETYPEPY_BUNDLE_FT=1 | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
- USE_CCACHE=1 | ||
- FREETYPEPY_BUNDLE_FT=1 | ||
- os: linux # No bundling. | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
- USE_CCACHE=1 | ||
- os: osx | ||
language: generic | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
- FREETYPEPY_BUNDLE_FT=1 | ||
|
||
before_install: | ||
- source ci/multibuild/common_utils.sh | ||
- source ci/multibuild/travis_steps.sh | ||
- before_install | ||
|
||
install: | ||
- build_wheel $REPO_DIR $PLAT | ||
|
||
script: | ||
- install_run $PLAT | ||
|
||
after_success: | ||
# copy compiled wheels to dist/ where Travis `dpl` tool can find them and | ||
# upload to PyPI | ||
- if [ -n "$TRAVIS_TAG" ]; then mkdir -p dist; cp wheelhouse/*.whl dist; fi | ||
|
||
deploy: | ||
# Deploy to PyPI on tags. Since the hard work of building wheels is already | ||
# done, we need to defeat some of Travis' automation. | ||
provider: pypi | ||
on: | ||
repo: rougier/freetype-py # Prevent triggering from forks. | ||
tags: true | ||
all_branches: true | ||
user: xxx | ||
password: | ||
secure: xxx | ||
skip_cleanup: true # Prevent deletion of dist/*. | ||
distributions: check # Dummy argument so dists aren't rebuilt by dpl. |
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
environment: | ||
global: | ||
PACKAGE_NAME: freetype-py | ||
FREETYPEPY_BUNDLE_FT: 1 | ||
# PyPI username and encrypted password | ||
TWINE_USERNAME: xxx | ||
TWINE_PASSWORD: | ||
secure: xxx | ||
matrix: | ||
- PYTHON: C:\Python27 | ||
PYTHON_VERSION: 2.7 | ||
PYTHON_ARCH: '32' | ||
|
||
- PYTHON: C:\Python36-x64 | ||
PYTHON_VERSION: 3.6 | ||
PYTHON_ARCH: '64' | ||
|
||
init: | ||
- ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH% | ||
|
||
install: | ||
# If there is a newer build queued for the same PR, cancel this one. | ||
# The AppVeyor 'rollout builds' option is supposed to serve the same | ||
# purpose but it is problematic because it tends to cancel builds pushed | ||
# directly to master instead of just PR builds (or the converse). | ||
# credits: JuliaLang developers. | ||
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` | ||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` | ||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` | ||
throw "There are newer queued builds for this pull request, failing early." } | ||
|
||
# checkout git sub-modules | ||
- git submodule update --init --recursive | ||
|
||
# prepend Python to the PATH | ||
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% | ||
|
||
# check that we have the expected version and architecture for Python | ||
- python --version | ||
- python -c "import struct; print(struct.calcsize('P') * 8)" | ||
|
||
# install/upgrade python setup requirements | ||
- python -m pip install --disable-pip-version-check --upgrade pip | ||
- pip --version | ||
- pip install --upgrade setuptools wheel virtualenv | ||
|
||
build_script: | ||
# build the wheel in the default 'dist/' folder | ||
- python setup.py bdist_wheel | ||
|
||
test_script: | ||
# create test env | ||
- python -m virtualenv test_env | ||
- test_env\Scripts\activate | ||
- where python | ||
- pip install pytest | ||
|
||
# install from wheel | ||
- pip install --no-index --find-links dist %PACKAGE_NAME% | ||
|
||
# run tests from installed wheel | ||
- cd tests | ||
- pytest | ||
|
||
artifacts: | ||
# archive the generated packages in the ci.appveyor.com build report | ||
- path: dist\*.whl | ||
|
||
on_success: | ||
# deploy wheels on tags to PyPI | ||
- ps: >- | ||
if($env:APPVEYOR_REPO_TAG -eq 'true') { | ||
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...") | ||
pip install --upgrade twine | ||
# If powershell ever sees anything on stderr it thinks it's a fail. | ||
# So we use cmd to redirect stderr to stdout before PS can see it. | ||
cmd /c 'twine upload dist\*.whl 2>&1' | ||
} else { | ||
Write-Output "Not deploying as this is not a tagged commit" | ||
} |
Submodule multibuild
added at
cba6a4
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,15 @@ | ||
# Define custom utilities | ||
# Test for OSX with [ -n "$IS_OSX" ] | ||
|
||
# function pre_build { | ||
# # Any stuff that you need to do before you start building the wheels | ||
# # Runs in the root directory of this repository. | ||
# | ||
# } | ||
|
||
function run_tests { | ||
# The function is called from an empty temporary directory. | ||
cd ../tests | ||
python -c "import freetype; print('Using FreeType version ', freetype.version())" | ||
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.