mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-06 08:34:01 +00:00
114 lines
3.7 KiB
YAML
114 lines
3.7 KiB
YAML
version: '{build}'
|
|
pull_requests:
|
|
do_not_increment_build_number: true
|
|
# branches:
|
|
# only:
|
|
# - master
|
|
# - /\d\.[0-9x](\.[0-9x])?/
|
|
skip_branch_with_pr: true
|
|
image:
|
|
- Visual Studio 2019
|
|
- Visual Studio 2015
|
|
environment:
|
|
CHROMAPRINT_FPCALC_VERSION: 1.4.3
|
|
DISCID_VERSION: 0.6.2
|
|
matrix:
|
|
- PYTHON: C:\Python37-x64
|
|
DEPLOY: true
|
|
- PYTHON: C:\Python36-x64
|
|
- PYTHON: C:\Python35-x64
|
|
- PYTHON: C:\Python37-x64
|
|
TEST_PIP_INSTALL: true
|
|
matrix:
|
|
exclude:
|
|
- image: Visual Studio 2019
|
|
TEST_PIP_INSTALL: true
|
|
- image: Visual Studio 2019
|
|
PYTHON: C:\Python36-x64
|
|
- image: Visual Studio 2019
|
|
PYTHON: C:\Python35-x64
|
|
|
|
init:
|
|
- cmd: |
|
|
SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64
|
|
SET PYTHON_SITE=%PYTHON%\lib\site-packages
|
|
FOR /F "tokens=*" %%a IN ('python -c "import sys;print('%%s.%%s.%%s' %% sys.version_info[0:3])"') do (SET PYTHON_VERSION=%%a)
|
|
ECHO %PYTHON% %PYTHON_VERSION%
|
|
ECHO fpcalc %CHROMAPRINT_FPCALC_VERSION%
|
|
ECHO libdiscid %DISCID_VERSION%
|
|
|
|
install:
|
|
- cmd: |
|
|
appveyor DownloadFile https://github.com/metabrainz/libdiscid/releases/download/v%DISCID_VERSION%/libdiscid-%DISCID_VERSION%-win64.zip -FileName libdiscid.zip
|
|
7z x libdiscid.zip -y
|
|
copy /Y discid.dll %PYTHON%
|
|
pip3 install pytest pytest-randomly awscli
|
|
pip3 install -r requirements-build.txt
|
|
pip3 install -r requirements-win.txt
|
|
|
|
before_build:
|
|
- cmd: |
|
|
appveyor DownloadFile https://github.com/acoustid/chromaprint/releases/download/v%CHROMAPRINT_FPCALC_VERSION%/chromaprint-fpcalc-%CHROMAPRINT_FPCALC_VERSION%-windows-x86_64.zip -FileName fpcalc.zip
|
|
7z x fpcalc.zip -y
|
|
copy /Y chromaprint-fpcalc-%CHROMAPRINT_FPCALC_VERSION%-windows-x86_64\fpcalc.exe fpcalc.exe
|
|
IF "%APPVEYOR_REPO_TAG%" == "false" python setup.py patch_version --platform=%APPVEYOR_BUILD_NUMBER%.python%PYTHON_VERSION%
|
|
- ps: |
|
|
if ($Env:CODESIGN_PFX_URL -And $Env:CODESIGN_PFX_PASSWORD) {
|
|
echo "Preparing code signing certificate"
|
|
aws s3 cp "$Env:CODESIGN_PFX_URL" .\codesign.pfx
|
|
$CertPassword = ConvertTo-SecureString -String $Env:CODESIGN_PFX_PASSWORD -Force -AsPlainText
|
|
Import-PfxCertificate -CertStoreLocation Cert:\CurrentUser\My -FilePath .\codesign.pfx -Password $CertPassword
|
|
}
|
|
|
|
build_script:
|
|
- ps: |
|
|
$Certificate = @(Get-ChildItem cert:\CurrentUser\My -codesign)[0]
|
|
& .\scripts\package\win-package-portable.ps1 -BuildNumber $env:APPVEYOR_BUILD_NUMBER -Certificate $Certificate
|
|
Push-AppveyorArtifact dist\*.exe
|
|
& .\scripts\package\win-package-installer.ps1 -BuildNumber $env:APPVEYOR_BUILD_NUMBER -Certificate $Certificate
|
|
Push-AppveyorArtifact installer\*.exe
|
|
|
|
test_script:
|
|
- ps: |
|
|
pytest -ra --junitxml=test-results.xml
|
|
$wc = New-Object 'System.Net.WebClient'
|
|
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-results.xml))
|
|
If ($LastExitCode -ne 0) {
|
|
Throw "Tests failed"
|
|
}
|
|
- dist\picard\fpcalc -version
|
|
|
|
for:
|
|
-
|
|
matrix:
|
|
only:
|
|
- TEST_PIP_INSTALL: true
|
|
install:
|
|
echo Skipped install
|
|
before_build:
|
|
echo Skipped before_build
|
|
build_script:
|
|
pip3 install .
|
|
test_script:
|
|
echo Skipped test_script
|
|
-
|
|
matrix:
|
|
only:
|
|
- image: Visual Studio 2019
|
|
build_script:
|
|
- ps: |
|
|
$Certificate = @(Get-ChildItem cert:\CurrentUser\My -codesign)[0]
|
|
& .\scripts\package\win-package-appx.ps1 -BuildNumber $env:APPVEYOR_BUILD_NUMBER -Certificate $Certificate
|
|
Push-AppveyorArtifact dist\*.msix
|
|
|
|
deploy:
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: bEUedqYteaHx/e64i8Wy16O/o/2WE/O0VNkTAgWCDTYeuiQvkZa3UqyaFaO2k8vk
|
|
repository: metabrainz/picard
|
|
artifact: /.*\.(exe|msix)/
|
|
force_update: true
|
|
on:
|
|
APPVEYOR_REPO_TAG: true
|
|
DEPLOY: true
|