mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
I tested this in macos so I am adding it to macos build, no need to do the same in all the platforms, but we should move it to linux, it is the job that finishes earlier.
77 lines
2.8 KiB
YAML
77 lines
2.8 KiB
YAML
# aka.ms/yaml
|
|
# TODO: reuse steps
|
|
trigger:
|
|
- master
|
|
- develop
|
|
|
|
jobs:
|
|
- job: Linux
|
|
pool:
|
|
vmImage: 'ubuntu-16.04'
|
|
steps:
|
|
- script: |
|
|
sudo add-apt-repository 'deb http://download.opensuse.org/repositories/home:/selmf/xUbuntu_16.04/ /'
|
|
sudo add-apt-repository ppa:kubuntu-ppa/backports
|
|
sudo apt-get update
|
|
sudo apt-get install -y --allow-unauthenticated qt-default qt5-qmake \
|
|
qtbase5-dev qtmultimedia5-dev libpoppler-qt5-dev qtscript5-dev \
|
|
libqt5opengl5-dev libglu1-mesa-dev libunarr-dev qtdeclarative5-dev
|
|
displayName: 'Install dependencies'
|
|
- script: |
|
|
qmake CONFIG+="unarr"
|
|
make
|
|
displayName: 'Build'
|
|
- job: MacOS
|
|
pool:
|
|
vmImage: 'macOS-10.14'
|
|
steps:
|
|
- script: |
|
|
brew install qt
|
|
brew link qt --force
|
|
brew install create-dmg
|
|
brew install clang-format
|
|
wget "https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2" -P $(Build.SourcesDirectory)/compressed_archive
|
|
tar xjf $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02_src_all.tar.bz2 -C $(Build.SourcesDirectory)/compressed_archive
|
|
mv $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02 $(Build.SourcesDirectory)/compressed_archive/libp7zip
|
|
displayName: 'Install dependencies'
|
|
- script: |
|
|
cd $(Build.SourcesDirectory)
|
|
find . \( -name '*.h' -or -name '*.cpp' -or -name '*.c' -or -name '*.mm' -or -name '*.m' \) -print0 | xargs -0 clang-format -style=file -i
|
|
if [ "$(git diff $(Build.SourceVersion))" != "" ]; then exit 1; fi
|
|
displayName: 'Check format'
|
|
- script: |
|
|
cd $(Build.SourcesDirectory)
|
|
VERSION="$(cat common/yacreader_global.h | grep '#define VERSION "' | tr -d '#define VERSION' | tr -d '"' )"
|
|
./compileOSX.sh $VERSION
|
|
mkdir output
|
|
ls -alh
|
|
cp *.dmg ./output
|
|
displayName: 'Build'
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
contents: 'output/**'
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
artifactName: dmg
|
|
- job: Windows
|
|
pool:
|
|
vmImage: 'vs2017-win2016'
|
|
steps:
|
|
- script: |
|
|
pip install aqtinstall
|
|
mkdir C:\Qt
|
|
python -m aqt install -O c:\Qt 5.12.4 windows desktop win64_msvc2017_64
|
|
choco install -y wget
|
|
wget "https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805-src.7z" -P $(Build.SourcesDirectory)\compressed_archive
|
|
7z x $(Build.SourcesDirectory)\compressed_archive\7z1805-src.7z -o$(Build.SourcesDirectory)\compressed_archive\lib7zip
|
|
displayName: 'Install dependencies'
|
|
- script: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
set PATH=%PATH%;C:\Qt\Qt5.12.4\5.12.4\msvc2017_64\bin
|
|
qmake CONFIG+="7zip"
|
|
nmake
|
|
displayName: 'Build'
|
|
|