mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 07:12:28 +00:00
Set up Azure Pipelines
Use free Azure Pipelines to do Linux, Windows, and Mac build and test and to generate Windows binary distributions.
This commit is contained in:
parent
e7adaff786
commit
4628461383
@ -1,3 +1,8 @@
|
||||
2018-10-11 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* Add build in Azure Pipelines, now that it is free for open
|
||||
source projects.
|
||||
|
||||
2018-08-18 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* 8.2.1: release
|
||||
|
@ -1,7 +1,12 @@
|
||||
# QPDF [![Build Status](https://travis-ci.org/qpdf/qpdf.svg?branch=master)](https://travis-ci.org/qpdf/qpdf)
|
||||
|
||||
# QPDF
|
||||
|
||||
[![QPDF](logo/qpdf.svg)](http://qpdf.sourceforge.net)
|
||||
|
||||
[![Build status]()]
|
||||
|
||||
[![Build status](https://dev.azure.com/qpdf/qpdf/_apis/build/status/qpdf?branchName=master)](https://dev.azure.com/qpdf/qpdf/_build?definitionId=3&branchName=master) [![Travis Build Status](https://travis-ci.org/qpdf/qpdf.svg?branch=master)](https://travis-ci.org/qpdf/qpdf)
|
||||
|
||||
This is the QPDF package. Information about it can be found at http://qpdf.sourceforge.net. The source code repository is hosted at github: https://github.com/qpdf/qpdf.
|
||||
|
||||
QPDF is copyright (c) 2005-2018 Jay Berkenbilt
|
||||
|
62
azure-pipelines.yml
Normal file
62
azure-pipelines.yml
Normal file
@ -0,0 +1,62 @@
|
||||
jobs:
|
||||
- job: Linux
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
- script: azure-pipelines/build-linux
|
||||
displayName: 'Generate, build, and test'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(System.DefaultWorkingDirectory)/distfiles.zip'
|
||||
artifactName: distfiles
|
||||
displayName: 'Upload extra distribution files'
|
||||
- job: Windows
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
strategy:
|
||||
matrix:
|
||||
msvc32:
|
||||
wordsize: 32
|
||||
tool: msvc
|
||||
msvc64:
|
||||
wordsize: 64
|
||||
tool: msvc
|
||||
mingw32:
|
||||
wordsize: 32
|
||||
tool: mingw
|
||||
mingw64:
|
||||
wordsize: 64
|
||||
tool: mingw
|
||||
maxParallel: 4
|
||||
steps:
|
||||
- bash: git config --global core.autocrlf input
|
||||
displayName: 'Disable git autocrlf'
|
||||
- checkout: self
|
||||
displayName: 'Get sources'
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: 'Download distribution files'
|
||||
inputs:
|
||||
artifactName: distfiles
|
||||
downloadPath: $(System.DefaultWorkingDirectory)
|
||||
- script: azure-pipelines/build-windows.bat $(wordsize) $(tool)
|
||||
displayName: 'Build, test, generate binary distributions'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(System.DefaultWorkingDirectory)/installers'
|
||||
artifactName: installers
|
||||
displayName: 'Upload binary distributions'
|
||||
dependsOn: Linux
|
||||
condition: succeeded()
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: macOS-10.13
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: 'Download distribution files'
|
||||
inputs:
|
||||
artifactName: distfiles
|
||||
downloadPath: $(System.DefaultWorkingDirectory)
|
||||
- script: azure-pipelines/build-mac
|
||||
displayName: 'Mac build and test'
|
||||
dependsOn: Linux
|
||||
condition: succeeded()
|
12
azure-pipelines/build-linux
Executable file
12
azure-pipelines/build-linux
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install \
|
||||
autoconf build-essential zlib1g-dev libjpeg-dev \
|
||||
docbook-xsl fop xsltproc libxml2-utils inkscape imagemagick
|
||||
./autogen.sh
|
||||
./configure --enable-werror --enable-doc-maintenance \
|
||||
--enable-show-failed-test-output
|
||||
make -j$(nproc)
|
||||
make -k check
|
||||
make distfiles.zip
|
13
azure-pipelines/build-mac
Executable file
13
azure-pipelines/build-mac
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
curl -L https://www.ijg.org/files/jpegsrc.v9c.tar.gz -o jpegsrc.v9c.tar.gz
|
||||
tar xzf jpegsrc.v9c.tar.gz
|
||||
cd jpeg-9c
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
unzip distfiles/distfiles.zip
|
||||
./configure --enable-werror --enable-show-failed-test-output
|
||||
make -j$(nproc)
|
||||
make -k check
|
40
azure-pipelines/build-windows
Executable file
40
azure-pipelines/build-windows
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
cd $(dirname $0)/..
|
||||
wordsize=$1
|
||||
tool=$2
|
||||
|
||||
if [[ $tool == mingw ]]; then
|
||||
pacman -Sy --noconfirm make base-devel tar zip unzip
|
||||
if [[ $wordsize == 64 ]]; then
|
||||
pacman -Sy --noconfirm mingw-w64-x86_64-toolchain
|
||||
PATH="/c/tools/msys64/mingw64/bin:$PATH"
|
||||
else
|
||||
pacman -Sy --noconfirm mingw-w64-i686-toolchain
|
||||
PATH="/c/tools/msys64/mingw32/bin:$PATH"
|
||||
fi
|
||||
g++ -v
|
||||
elif [[ $tool == msvc ]]; then
|
||||
cl
|
||||
fi
|
||||
unzip distfiles/distfiles.zip
|
||||
curl -L https://downloads.sourceforge.net/project/qpdf/external-libs/2017-08-21/qpdf-external-libs-bin.zip -o qpdf-external-libs-bin.zip
|
||||
unzip qpdf-external-libs-bin.zip
|
||||
cwd=`pwd`
|
||||
PATH=$cwd/libqpdf/build:$PATH
|
||||
|
||||
installdir=install-$tool$wordsize
|
||||
rm -rf $installdir
|
||||
./config-$tool --with-windows-wordsize=$wordsize --enable-show-failed-test-output
|
||||
make -j$(nproc)
|
||||
# XXX Fix test fragility -- it's always check status in the content preservation tests.
|
||||
make -k check || echo "WARNING: TESTS FAILED"
|
||||
make install
|
||||
|
||||
v=`(cd $installdir; ls -d qpdf-*)`
|
||||
cp -p README-windows-install.txt $installdir/$v/README.txt
|
||||
mkdir installers
|
||||
(cd $installdir; zip -r ../installers/$v-bin-$tool$wordsize.zip $v)
|
||||
|
||||
set +x
|
||||
ls -l installers
|
16
azure-pipelines/build-windows.bat
Normal file
16
azure-pipelines/build-windows.bat
Normal file
@ -0,0 +1,16 @@
|
||||
@echo on
|
||||
@rem Usage: build-windows {32|64} {msvc|mingw}
|
||||
if %2 == msvc (
|
||||
if %1 == 64 (
|
||||
call "%VS140COMNTOOLS%\..\..\VC\bin\amd64\vcvars64.bat"
|
||||
) else (
|
||||
call "%VS140COMNTOOLS%\..\..\VC\bin\vcvars32.bat"
|
||||
)
|
||||
choco install zip
|
||||
bash ./azure-pipelines/build-windows %1 %2
|
||||
) else (
|
||||
@rem The vs2017-win2016 pool has an ancient 64-bit-only mingw.
|
||||
@rem Install msys2 so we can get current gcc toolchains.
|
||||
choco install msys2
|
||||
C:\tools\msys64\usr\bin\env.exe MSYSTEM=MINGW64 /bin/bash -l %CD%/azure-pipelines/build-windows %1 %2
|
||||
)
|
Loading…
Reference in New Issue
Block a user