Update CI/CD

This optimizes the execution time of macOS builds and adds initial
(no-op) support for Windows.  Documentation now admits the issues with
macOS wheels.

Because of GH-63, CI/CD for Python 3.8 on macOS is temporarily dropped.

Build reference for upcoming v0.1.3
This commit is contained in:
Nguyễn Gia Phong 2020-04-10 20:19:35 +07:00
parent c9134b31e1
commit e674ade7e4
4 changed files with 45 additions and 22 deletions

24
.appveyor.yml Normal file
View File

@ -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

View File

@ -3,7 +3,7 @@ language: python
branches:
only:
- master
- /\d+\.\d+\.\d+$/
- /^\d+(\.\d+)+((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/
env:
global:
@ -23,24 +23,19 @@ 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*
- os: osx
language: shell
env: CIBW_BUILD=cp38-macosx*
env: CIBW_BUILD=cp37-macosx_x86_64
- services: docker
env: CIBW_BUILD=cp36-manylinux_x86_64
- services: docker
@ -48,7 +43,7 @@ jobs:
- 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

View File

@ -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
@ -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
@ -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

View File

@ -26,12 +26,14 @@ from distutils.file_util import copy_file
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:
@ -82,7 +84,7 @@ setup(cmdclass=dict(build_ext=BuildAlure2Ext, clean=CleanCppToo),
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')))