Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsousa committed Sep 7, 2018
2 parents 4b41e08 + c2ef995 commit f0a340a
Show file tree
Hide file tree
Showing 4,615 changed files with 445,993 additions and 355,708 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
89 changes: 59 additions & 30 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,81 @@
image: Visual Studio 2017

environment:
TWINE_USERNAME: "afdko-travis"
TWINE_PASSWORD:
secure: myMd6E3niwjGvxEHeChOlg==
global:
CIBW_SKIP: cp33-* cp34-* cp35-* cp37-* *-win_amd64
CIBW_TEST_REQUIRES: pytest-cov==2.5.1 codecov subprocess32
CIBW_TEST_COMMAND: cd {project} && pytest --cov -v && coverage combine && codecov && pip uninstall --yes afdko
TWINE_USERNAME: afdko-travis
# Note: TWINE_PASSWORD is set in AppVeyor settings

matrix:
fast_finish: true

matrix:
- PYTHON_HOME: "C:\\Python27-x64"
- PYTHON_HOME: "C:\\Python27"
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true

# scripts that run after cloning repository
install:
- set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%"
# - python --version
# - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- python -m pip install -U -r requirements-dev.txt
- python -m pip install pytest
- python setup.py bdist_wheel
- for %%f in (dist\*.whl) do (set "WHEEL=%%f")
- python -m pip install -U --force-reinstall %WHEEL%
- pip install flake8 cpplint

build: false
# scripts to run before build
before_build:
- flake8 setup.py
- flake8 tests\*.py
- flake8 python\afdko\buildcff2vf.py
- flake8 python\afdko\buildmasterotfs.py
- flake8 python\afdko\checkoutlinesufo.py
- flake8 python\afdko\convertfonttocid.py
- flake8 python\afdko\fdkutils.py
- flake8 python\afdko\makeinstancesufo.py
- flake8 python\afdko\makeotf.py
- flake8 python\afdko\otfpdf.py
- flake8 python\afdko\pdfmetrics.py
- flake8 python\afdko\ttfcomponentizer.py
- flake8 python\afdko\ttxn.py
- flake8 python\afdko\ufotools.py
- cpplint --recursive --quiet c\autohint
- cpplint --recursive --quiet c\detype1
- cpplint --recursive --quiet c\makeotf\makeotf_lib\source
- cpplint --recursive --quiet c\makeotf\makeotf_lib\api
- cpplint --recursive --quiet c\makeotf\makeotf_lib\resource
- cpplint --recursive --quiet c\makeotf\source
- cpplint --recursive --quiet c\mergefonts
- cpplint --recursive --quiet c\public
- cpplint --recursive --quiet c\rotatefont
- cpplint --recursive --quiet c\sfntdiff
- cpplint --recursive --quiet c\sfntedit
- cpplint --recursive --quiet c\spot
- cpplint --recursive --quiet c\tx
- cpplint --recursive --quiet c\type1

test_script:
- python -m pytest -v
- python -m pip uninstall --yes afdko
# to run your custom scripts instead of automatic MSBuild
build_script:
# our setup.py requires 'wheel', which may not be already installed
- pip install git+https://github.com/adobe-type-tools/cibuildwheel wheel
- cibuildwheel --output-dir wheelhouse

artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*.whl
name: release_wheel
- path: wheelhouse\*.whl
name: Wheels

# Deploy wheel on tags to PyPI
on_success:
# deploy wheels to PyPI on tags
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq 'true') {
if ($env:APPVEYOR_REPO_TAG -eq "true") {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
pip install --upgrade twine
twine upload dist\*.whl
} else {
Write-Output "Not deploying as this is not a tagged commit"
python -m pip install twine
python -m twine upload wheelhouse/*.whl
}
# Deploy wheel on tags to GitHub
deploy:
# deploy wheels to GitHub on tags
provider: GitHub
auth_token:
secure: UyKfsObr/shlpP+0U5Zb3EPvmXt0kyKYu940CFNFdNZ8J7Fu54k415R0UNP78t0j
artifact: release_wheel
artifact: Wheels
draft: false
prerelease: false
prerelease: true
on:
branch: $(APPVEYOR_REPO_TAG_NAME)
appveyor_repo_tag: true
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 0 # i.e. don't break long lines
SortIncludes: false # because sorting the includes breaks builds
13 changes: 10 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
# measure 'branch' coverage in addition to 'statement' coverage
# See: http://coverage.readthedocs.io/en/coverage-4.5.1/branch.html
branch = True
parallel = True

# list of directories or packages to measure
source =
afdko/Tools/SharedData/FDKScripts
Tests
afdko
tests

omit =
*/__init__.py
Tests/*_test.py
tests/*_test.py

# these are treated as equivalent when combining data
[paths]
source =
python/afdko
*/site-packages/afdko

[report]
# Regexes for lines to exclude from consideration
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.pdf binary
*.pfa text eol=lf
*.pfb binary
*.plist text eol=lf
29 changes: 27 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,39 @@

# temporary wheel build directories
afdko.egg-info/
build/
dist/
build/*
dist/*
.eggs/

# PyCharm directory
.idea/

# coverage data
# DO NOT use '.coverage*' because that matches '.coveragerc'
.coverage
.coverage.*
htmlcov
.pytest_cache

# ignore the OSX and linux compiled programs
c/build_all/*
!c/build_all/this_folder_intentionally_left_empty

# ignore the temp build directories and files
*.o
*.a
*.exe
*.pyc
exe/

# Xcode files
project.xcworkspace/
xcuserdata/
**/xcode4/build/


# Windows build directories
*vcxproj.user
**/visualstudio/Debug/*
**/visualstudio/Release/*
*.lib
179 changes: 78 additions & 101 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,83 @@
sudo: required
matrix:
include:
- os: linux
env: NAME=Linux
if: type = pull_request
python: 2.7
install:
- sudo apt-get install g++-multilib
- sudo -H pip install --upgrade pip
- pip install --user --upgrade setuptools setuptools_scm wheel cython
script:
- python setup.py bdist_wheel
- pip install --user dist/*.whl
- pip uninstall --yes afdko
language: python

- os: osx
env: NAME=OSX
if: type = pull_request
language: generic
install:
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py --user
- python -m pip install --user virtualenv
- python -m virtualenv .venv/
- source .venv/bin/activate
- pip install -U -r requirements-dev.txt
before_script:
- export PYTHONPATH=$PYTHONPATH:$(pwd)
script:
- flake8 setup.py
- flake8 Tests/*.py
- pushd afdko/Tools/SharedData/FDKScripts
- flake8 buildCFF2VF.py
- flake8 buildMasterOTFs.py
- flake8 CheckOutlinesUFO.py
- flake8 ConvertFontToCID.py
- flake8 FDKUtils.py
- flake8 MakeOTF.py
- flake8 ttfcomponentizer.py
- flake8 ufoTools.py
- popd
- python setup.py bdist_wheel
- deactivate
- export PATH=$PATH:'/Users/travis/Library/Python/2.7/bin'
- python -m pip install --user -U --force-reinstall dist/*.whl
- python -m pip install --user -r requirements-dev.txt
- pytest --cov
- python -m pip uninstall --yes afdko
after_success:
- codecov
env:
global:
- CIBW_SKIP="cp34-* cp35-* cp37-* *i686"
- CIBW_BEFORE_BUILD_LINUX="yum install -y glibc-devel.i386 libgcc_s.so.1"
- CIBW_ENVIRONMENT_LINUX="CODECOV_TOKEN=e0067bac-3ded-4432-83c8-667217c76660"
- CIBW_TEST_REQUIRES="pytest-cov==2.5.1 codecov subprocess32"
- CIBW_TEST_COMMAND="cd {project} && pytest --cov -v && coverage combine && codecov && pip uninstall --yes afdko"
- TWINE_USERNAME="afdko-travis"
# Note: TWINE_PASSWORD is set in Travis settings

matrix:
fast_finish: true
include:
- os: linux
sudo: required
services:
- docker
services: docker
env:
- NAME=Linux-deploy
- DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
- BUILD_DIST=true
if: type = push
language: python
python: 2.7
# skip default 'install' and 'script' steps: all the work is in
# before_deploy
install: true
script: true
- NAME=Linux
- PIP=pip

- os: osx
osx_image: xcode6.4
env:
- NAME=OSX-deploy
- BUILD_DIST=true
if: type = push
language: generic
env:
- NAME=OSX
- PIP=pip2

cache:
- pip
- directories:
- $HOME/.pyenv_cache
install:
- $PIP install flake8 cpplint

# Only build for *pushes* to 'master', 'develop' and 'release',
# not for pushes to other branches
# (build for PRs from any branch).
# The regex below is because Travis treats a tag on the master branch as if it
# were a different branch. The regex below is meant to match:
# digit(s).digit(s).digit(s) plus optional additional characters.
branches:
only:
- master
- /^\d+\.\d+\.\d+.*$/
- develop
- release
before_script:
- flake8 setup.py
- flake8 tests/*.py
- pushd python/afdko
- flake8 buildcff2vf.py
- flake8 buildmasterotfs.py
- flake8 checkoutlinesufo.py
- flake8 convertfonttocid.py
- flake8 fdkutils.py
- flake8 makeinstancesufo.py
- flake8 makeotf.py
- flake8 otfpdf.py
- flake8 pdfmetrics.py
- flake8 ttfcomponentizer.py
- flake8 ttxn.py
- flake8 ufotools.py
- popd
- cpplint --recursive --quiet c/autohint
- cpplint --recursive --quiet c/detype1
- cpplint --recursive --quiet c/makeotf/makeotf_lib/source
- cpplint --recursive --quiet c/makeotf/makeotf_lib/api
- cpplint --recursive --quiet c/makeotf/makeotf_lib/resource
- cpplint --recursive --quiet c/makeotf/source
- cpplint --recursive --quiet c/mergefonts
- cpplint --recursive --quiet c/public
- cpplint --recursive --quiet c/rotatefont
- cpplint --recursive --quiet c/sfntdiff
- cpplint --recursive --quiet c/sfntedit
- cpplint --recursive --quiet c/spot
- cpplint --recursive --quiet c/tx
- cpplint --recursive --quiet c/type1

notifications:
slack: typekit:TRAVIS_SLACK_TOKEN
email:
on_success: change
on_failure: always
script:
# - $PIP install cibuildwheel
- $PIP install git+https://github.com/adobe-type-tools/cibuildwheel
- cibuildwheel --output-dir wheelhouse

before_deploy:
- ./.travis/before_deploy.sh
after_success:
# create source distribution
# and deploy to PyPI on tags
- |
if [[ $TRAVIS_TAG ]]; then
python -m pip install twine
python -m twine upload wheelhouse/*.whl
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
python setup.py sdist
python -m twine upload dist/*.tar.gz
fi
fi
deploy:
# deploy to Github Releases on tags
Expand All @@ -108,16 +86,15 @@ deploy:
secure: JYAxvC7A46oY0mmhEknUzJ5iTeLwBWyV0ZnNXlx3t6uhKmmPadxSSkTR4uI87DXfYQBlvNnw+VDHaTeaaaXZOUXmcLn7UIjHsBqdhCGKWMKQ2Z0HpSMvYEUVUezHsLteZvdeL1i4c/q7Iaf2SuNuzOlnNvWomxC24yI/cSzRpqP0wumyXh8Qewod7B5/X2mBO8ICxkEETJBFlwHiWyN8p0lF/aaRIOmujHTqQCBy7xN81rGUcsmY5EaU4ojdwybUaa9e1XRNwwWxO3XOVMsSrlAOb8+PLlegi+LY5vi6e2udVHcRtm/2f0RZuKKjfQ6RMPumqkcCerKE5IdZr2NK0P74HXIrqJ4YX8dSIDk8IVEWgZxiYqBpAtXJvq40V90Mh0atR5318WtcUhPzZftVp5JajU+EU1FmyusNdjnHSYosNKVjCEkwqf3fySLk2uxqiDnyIwMUBsvmewwWCMw0NUOFHyG5uOKqRO4n5NWDnrqaUgcenbB/EZtIE/jrGddW7OgHCVS1jcqcTFK0yfz7X98ej6V1OJqEIwLZe2ZDNTGspcIsP83mtahJFF4lLuyfa5/cN7t/1Gc3rC0qNYa3diMK4gV8K3r1c7yjAy5d3siXspx/2Rb7u7jdbI8JLzWGfuByJj9MuN1RRP7nkqMkxpyDzib4QEG169Lb5Rus+Aw=
skip_cleanup: true
file_glob: true
file: "dist/*"
on:
tags: true
repo: adobe-type-tools/afdko
condition: "$BUILD_DIST == true"
# deploy to PyPI on tags
- provider: script
script: bash ./.travis/deploy.sh
skip_cleanup: true
file:
- wheelhouse/*.whl
- dist/*.tar.gz
prerelease: true
on:
tags: true
repo: adobe-type-tools/afdko
condition: "$BUILD_DIST == true"

notifications:
slack: typekit:TRAVIS_SLACK_TOKEN
email:
on_success: change
on_failure: always
Loading

0 comments on commit f0a340a

Please sign in to comment.