Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
Update CI/CD
Browse files Browse the repository at this point in the history
This optimizes the execution time of macOS builds and adds initial
(no-op) support for Windows.  Documentation now admit the issues with
macOS wheels.
  • Loading branch information
McSinyx committed Apr 21, 2020
1 parent 6e95bf4 commit 3f1e473
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 20 deletions.
24 changes: 24 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
branches:
only:
- master
- /^\d+(\.\d+)+((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/

environment:
global:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
Alure2_DIR: C:\Program Files (x86)\alure\lib\cmake\Alure2
matrix:
- CIBW_BUILD: cp36-win_amd64
- CIBW_BUILD: cp37-win_amd64
- CIBW_BUILD: cp38-win_amd64

install:
- curl "https://openal-soft.org/openal-binaries/openal-soft-1.20.1-bin.zip" -o openal-soft-1.20.1-bin.zip
- 7z x -o%APPVEYOR_BUILD_FOLDER%\.. openal-soft-1.20.1-bin.zip
- set OPENALDIR=%APPVEYOR_BUILD_FOLDER%\..\openal-soft-1.20.1-bin
- git clone https://github.com/kcat/alure %APPVEYOR_BUILD_FOLDER%\..\alure
- cmake -A x64 -S %APPVEYOR_BUILD_FOLDER%\..\alure -B %APPVEYOR_BUILD_FOLDER%\..\alure\build
- cmake --build %APPVEYOR_BUILD_FOLDER%\..\alure\build --config Release --target install
- py -3 -m pip install cibuildwheel

build_script: echo py -3 -m cibuildwheel --output-dir wheelhouse
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: python
branches:
only:
- master
- /\d+\.\d+\.\d+$/
- /^\d+(\.\d+)+((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/

env:
global:
Expand All @@ -23,32 +23,31 @@ addons:
- libvorbis
- opusfile
- libsndfile
update: true

install: pip install twine cibuildwheel

git:
depth: 1
install: python3 -m pip install twine cibuildwheel

jobs:
include:
- os: osx
osx_image: xcode11.3
language: shell
env: CIBW_BUILD=cp36-macosx*
env: CIBW_BUILD=cp36-macosx_x86_64
- os: osx
osx_image: xcode11.3
language: shell
env: CIBW_BUILD=cp37-macosx*
env: CIBW_BUILD=cp37-macosx_x86_64
- os: osx
osx_image: xcode11.3
language: shell
env: CIBW_BUILD=cp38-macosx*
env: CIBW_BUILD=cp38-macosx_x86_64
- services: docker
env: CIBW_BUILD=cp36-manylinux_x86_64
- services: docker
env: CIBW_BUILD=cp37-manylinux_x86_64
- services: docker
env: CIBW_BUILD=cp38-manylinux_x86_64

script: cibuildwheel --output-dir=dist
script: python3 -m cibuildwheel --output-dir=dist

deploy:
skip_cleanup: true
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ Palace can be install from the [Python Package Index][PyPI] via simply

pip install palace

Wheel distributions are only built for GNU/Linux and macOS on amd64
at the time of writing. If you want to help out, please head to
GitHub issue [#1][GH-1].

*Note: [Wheels built for macOS have yet to include shared libraries][GH-63],
so it still requires [alure] and its dependencies to be installed.*
Wheel distributions are built exclusively for amd64. Currently, only GNU/Linux
is properly supported. If you want to help packaging for Windows and macOS,
see [GH-1] and [GH-63] respectively on our issues tracker on GitHub.

### From source
Aside from the build dependencies listed in `pyproject.toml`, one will
Expand All @@ -44,10 +41,14 @@ Palace can then be compiled and installed by running

## Usage
One may start with the `examples` for sample usage of palace.
For further information, Python's `help` is your friend.
For further information, Python's `help` is your friend and
the API is also available for [online reference][API].

## License and Credits
Palace is released under the [GNU LGPL version 3 or later][LGPLv3+].
Palace is free software: you can redistribute it and/or modify it
under the terms of the [GNU Lesser General Public License][LGPLv3+]
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

To ensure that palace can run without any dependencies outside of the [pip]
toolchain, the wheels are bundled with dynamically linked libraries from
Expand All @@ -70,7 +71,8 @@ the build machine, which is similar to static linking:
[GH-1]: https://github.com/McSinyx/palace/issues/1
[GH-63]: https://github.com/McSinyx/palace/issues/63
[CMake]: https://cmake.org/
[API]: https://mcsinyx.github.io/palace/html/reference.html
[LGPLv3+]: https://www.gnu.org/licenses/lgpl-3.0.en.html
[Vorbis]: https://xiph.org/vorbis/
[Opus]: http://opus-codec.org/
[libsndfile]: http://www.mega-nerd.com/libsndfile/
[LGPLv3+]: https://www.gnu.org/licenses/lgpl-3.0.en.html
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
from operator import methodcaller
from os import environ, unlink
from os.path import dirname, join
from platform import system
from subprocess import DEVNULL, PIPE, run

from Cython.Build import cythonize
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext

CPPSTD = '/std:c++14' if system() == 'Windows' else '-std=c++14'
try:
TRACE = int(environ['CYTHON_TRACE'])
except KeyError:
Expand Down Expand Up @@ -82,7 +84,7 @@ def run(self) -> None:
ext_modules=cythonize(
Extension(name='palace', sources=[src('palace.pyx')],
define_macros=[('CYTHON_TRACE', TRACE)],
extra_compile_args=["-std=c++14"], language='c++'),
extra_compile_args=[CPPSTD], language='c++'),
compiler_directives=dict(
binding=True, linetrace=TRACE, language_level='3str',
c_string_type='str', c_string_encoding='utf8')))

0 comments on commit 3f1e473

Please sign in to comment.