-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squash-merge azure pipelines (currently without twine)
- Loading branch information
James R. Barlow
committed
Jul 16, 2019
1 parent
a73cdea
commit 77e82c9
Showing
5 changed files
with
119 additions
and
2 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 |
---|---|---|
|
@@ -175,3 +175,8 @@ install: | |
|
||
script: | ||
- python3 -m pytest | ||
|
||
branches: | ||
except: | ||
- docs | ||
- azure-pipelines |
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,102 @@ | ||
variables: | ||
qpdf_version: "8.4.2" | ||
qpdf_release: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}.tar.gz', variables.qpdf_version) }} | ||
cibw_skip: "cp27-* cp34-*" | ||
cibw_test_command: "pytest -nauto {project}/tests" | ||
cibw_test_requires: "-r requirements/test.txt" | ||
cibuildwheel_version: "0.11.1" | ||
cibw_before_build: "pip install pybind11" | ||
|
||
jobs: | ||
- job: linux_sdist | ||
pool: {vmImage: 'Ubuntu-16.04'} | ||
steps: | ||
- task: UsePythonVersion@0 | ||
- bash: | | ||
mkdir qpdf && wget -q $QPDF_RELEASE -O - | tar xz -C qpdf --strip-components=1 | ||
cd qpdf/ | ||
./configure | ||
make -j 2 | ||
sudo make install | ||
cd .. | ||
displayName: "Build QPDF" | ||
- bash: | | ||
python -m pip install --upgrade pip | ||
python setup.py sdist | ||
python -m pip install pybind11 | ||
python -m pip install --verbose dist/*.tar.gz | ||
python -m pip install -r requirements/test.txt | ||
displayName: "Build sdist" | ||
- bash: | | ||
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | ||
python -m pytest -nauto | ||
displayName: "Test" | ||
- task: PublishBuildArtifacts@1 | ||
inputs: {pathtoPublish: 'dist'} | ||
- job: linux | ||
pool: {vmImage: 'Ubuntu-16.04'} | ||
variables: | ||
cibw_before_build: >- # yaml: folded newlines to spaces, no newline at end | ||
yum install -y libjpeg-devel zlib-devel && | ||
cd qpdf && | ||
./autogen.sh && | ||
./configure && | ||
make install && | ||
cd .. && | ||
pip install pybind11 | ||
steps: | ||
- task: UsePythonVersion@0 | ||
- bash: | | ||
mkdir qpdf && wget -q $QPDF_RELEASE -O - | tar xz -C qpdf --strip-components=1 | ||
- bash: source azure-pipelines/build.bash | ||
- task: PublishBuildArtifacts@1 | ||
inputs: {pathtoPublish: 'wheelhouse'} | ||
- job: macos | ||
pool: {vmImage: 'macOS-10.13'} | ||
variables: | ||
cibw_before_build: >- | ||
pip install pybind11 && | ||
brew install qpdf | ||
steps: | ||
- task: UsePythonVersion@0 | ||
- bash: source azure-pipelines/build.bash | ||
- task: PublishBuildArtifacts@1 | ||
inputs: {pathtoPublish: 'wheelhouse'} | ||
- job: windows64 | ||
pool: {vmImage: 'vs2017-win2016'} | ||
variables: | ||
qpdf_windows: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}-bin-msvc64.zip', variables.qpdf_version) }} | ||
qpdf_dll: "qpdf21.dll" | ||
cibw_skip: "cp27-* cp34-* cp35-win32* cp36-win32* cp37-win32*" | ||
cibw_environment: >- | ||
INCLUDE="$INCLUDE;c:\\qpdf\\include" | ||
LIB="$LIB;c:\\qpdf\\lib" | ||
LIBPATH="$LIBPATH;c:\\qpdf\\lib" | ||
steps: | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.5', architecture: x64}} | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x64}} | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}} | ||
- powershell: azure-pipelines/win-download-qpdf.ps1 | ||
displayName: "Download QPDF" | ||
- bash: source azure-pipelines/build.bash | ||
- task: PublishBuildArtifacts@1 | ||
inputs: {pathtoPublish: 'wheelhouse'} | ||
- job: windows32 | ||
pool: {vmImage: 'vs2017-win2016'} | ||
variables: | ||
qpdf_windows: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}-bin-msvc32.zip', variables.qpdf_version) }} | ||
qpdf_dll: "qpdf21.dll" | ||
cibw_skip: "cp27-* cp34-* cp35-win_amd64* cp36-win_amd64* cp37-win_amd64*" | ||
cibw_environment: >- | ||
INCLUDE="$INCLUDE;c:\\qpdf\\include" | ||
LIB="$LIB;c:\\qpdf\\lib" | ||
LIBPATH="$LIBPATH;c:\\qpdf\\lib" | ||
steps: | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.5', architecture: x86}} | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x86}} | ||
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x86}} | ||
- powershell: azure-pipelines/win-download-qpdf.ps1 | ||
displayName: "Download QPDF" | ||
- bash: source azure-pipelines/build.bash | ||
- task: PublishBuildArtifacts@1 | ||
inputs: {pathtoPublish: 'wheelhouse'} |
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,5 @@ | ||
#!/bin/bash | ||
set -ex | ||
python -m pip install --upgrade pip | ||
pip install cibuildwheel==$CIBUILDWHEEL_VERSION | ||
cibuildwheel --output-dir wheelhouse . |
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,5 @@ | ||
Invoke-WebRequest -Uri $env:QPDF_WINDOWS -OutFile "qpdf-release.zip" | ||
7z x "qpdf-release.zip" -oc:\ | ||
$qpdfdir = Get-ChildItem c:\qpdf-* | ||
Move-Item -Path $qpdfdir -Destination c:\qpdf | ||
cp c:\qpdf\bin\$env:QPDF_DLL src\pikepdf |
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