forked from OpenSC/OpenSC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
127 lines (119 loc) · 7.3 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: 0.26.0.{build}
platform:
- x86
- x64
configuration:
- Release
- Light
environment:
GH_TOKEN:
secure: jeReA6BNx/dXVMGfroKadgE9ByKAE/tAGcb2z+dIVZGAN29X1Pu22wi1TuVOy9ZugqBzjvFV4knwHJSGi0+U6Yj1fTfa2CYpeCBym4JOXqPis/GpKfSeBV9IrmJGT/Av
PATH: C:\cygwin\bin;%PATH%
OPENPACE_VER: 1.1.3
ZLIB_VER_DOT: 1.3.1
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VCVARSALL: "%ProgramFiles(x86)%/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat"
DO_PUSH_ARTIFACT: yes
OPENSSL_VER: "1.1.1"
OPENSSL_DIR: "C:\\OpenSSL-v111"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VCVARSALL: "%ProgramFiles(x86)%/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat"
OPENSSL_DIR: "C:\\OpenSSL-v30"
OPENSSL_FLAGS: "/DHAVE_EVP_PKEY_DUP"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
VCVARSALL: "%ProgramFiles%/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat"
OPENSSL_DIR: "C:\\OpenSSL-v30"
OPENSSL_FLAGS: "/DHAVE_EVP_PKEY_DUP"
init:
# Fixes "fatal: detected dubious ownership in repository at '/cygdrive/c/projects/opensc'" with recent images
- git config --global --add safe.directory /cygdrive/c/projects/opensc
install:
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- ps: $env:PACKAGE_NAME=(git describe --tags --abbrev=0)
- ps: $env:OPENSSL_PF = If ($env:Platform -eq "x86") { "Win32" } Else { "Win64" }
- ps: $env:ARTIFACT="OpenSC-${env:PACKAGE_NAME}_${env:OPENSSL_PF}"
- ps: >-
If ($env:Configuration -Like "*Light*") {
$env:ARTIFACT+="-Light"
} Else {
If (!(Test-Path C:\zlib )) {
appveyor DownloadFile "https://github.com/madler/zlib/archive/v${env:ZLIB_VER_DOT}.zip" -FileName zlib.zip
7z x zlib.zip -oC:\
Rename-Item -path "c:\zlib-${env:ZLIB_VER_DOT}" -newName "zlib"
}
If (!(Test-Path C:\openpace )) {
appveyor DownloadFile "https://github.com/frankmorgner/openpace/archive/${env:OPENPACE_VER}.zip" -FileName openpace.zip
7z x openpace.zip -oC:\
Rename-Item -path "c:\openpace-${env:OPENPACE_VER}" -newName "openpace"
}
}
If (!(Test-Path cpdksetup.exe )) {
appveyor DownloadFile "https://download.microsoft.com/download/1/7/6/176909B0-50F2-4DF3-B29B-830A17EA7E38/CPDK_RELEASE_UPDATE/cpdksetup.exe"
}
- cpdksetup.exe /quiet
build_script:
- echo "Using %APPVEYOR_BUILD_WORKER_IMAGE% with %VCVARSALL%"
- call "%VCVARSALL%" %Platform%
- ps: >-
if (!($env:Configuration -Like "*Light*")) {
If (!(Test-Path -Path "C:\zlib-${env:OPENSSL_PF}" )) {
# build zlib.lib as a static library
xcopy C:\zlib C:\zlib-${env:OPENSSL_PF} /e /i /y /s
cd C:\zlib-${env:OPENSSL_PF}
(Get-Content win32/Makefile.msc).replace('-MD', '-MT') | Set-Content win32/Makefile.msc
nmake /nologo -f win32/Makefile.msc zlib.lib
}
If (!(Test-Path -Path "C:\openpace-${env:OPENSSL_PF}" )) {
# build libeac.lib as a static library
xcopy C:\openpace C:\openpace-${env:OPENSSL_PF} /e /i /y /s
cd C:\openpace-${env:OPENSSL_PF}\src
cl /nologo /I${env:OPENSSL_DIR}-${env:OPENSSL_PF}\include /I. /DX509DIR=\`"/\`" /DCVCDIR=\`"/\`" /W3 /D_CRT_SECURE_NO_DEPRECATE /DWIN32_LEAN_AND_MEAN /GS /MT /DHAVE_ASN1_STRING_GET0_DATA=1 /DHAVE_DECL_OPENSSL_ZALLOC=1 /DHAVE_DH_GET0_KEY=1 /DHAVE_DH_GET0_PQG=1 /DHAVE_DH_SET0_KEY=1 /DHAVE_DH_SET0_PQG=1 /DHAVE_ECDSA_SIG_GET0=1 /DHAVE_ECDSA_SIG_SET0=1 /DHAVE_EC_KEY_METHOD=1 /DHAVE_RSA_GET0_KEY=1 /DHAVE_RSA_SET0_KEY=1 /DHAVE_EC_POINT_GET_AFFINE_COORDINATES=1 /DHAVE_EC_POINT_SET_AFFINE_COORDINATES=1 ${env:OPENSSL_FLAGS} /c ca_lib.c cv_cert.c cvc_lookup.c x509_lookup.c eac_asn1.c eac.c eac_ca.c eac_dh.c eac_ecdh.c eac_kdf.c eac_lib.c eac_print.c eac_util.c misc.c pace.c pace_lib.c pace_mappings.c ri.c ri_lib.c ta.c ta_lib.c objects.c ssl_compat.c
lib /nologo /out:libeac.lib ca_lib.obj cv_cert.obj cvc_lookup.obj x509_lookup.obj eac_asn1.obj eac.obj eac_ca.obj eac_dh.obj eac_ecdh.obj eac_kdf.obj eac_lib.obj eac_print.obj eac_util.obj misc.obj pace.obj pace_lib.obj pace_mappings.obj ri.obj ri_lib.obj ta.obj ta_lib.obj objects.obj ssl_compat.obj
cd ${env:APPVEYOR_BUILD_FOLDER}
}
$env:ZLIBSTATIC_DEF="/DENABLE_ZLIB_STATIC"
$env:ZLIB_INCL_DIR="/IC:\zlib-${env:OPENSSL_PF}"
$env:ZLIB_LIB="C:\zlib-${env:OPENSSL_PF}\zlib.lib"
$env:OPENSSL_DEF="/DENABLE_OPENSSL"
$env:OPENSSL_DIR="${env:OPENSSL_DIR}-${env:OPENSSL_PF}"
$env:OPENSSL_EXTRA_CFLAGS="/DOPENSSL_SECURE_MALLOC_SIZE=65536"
$env:OPENPACE_DEF="/DENABLE_OPENPACE"
$env:OPENPACE_DIR="C:\openpace-${env:OPENSSL_PF}"
}
- bash -c "exec 0</dev/null && if [ \"$APPVEYOR_REPO_BRANCH\" == \"master\" -a -z \"$APPVEYOR_PULL_REQUEST_NUMBER\" ]; then ./bootstrap; fi"
- bash -c "exec 0</dev/null && if [ \"$APPVEYOR_REPO_BRANCH\" == \"master\" -a -n \"$APPVEYOR_PULL_REQUEST_NUMBER\" ]; then ./bootstrap.ci -s \"-pr$APPVEYOR_PULL_REQUEST_NUMBER\"; fi"
- bash -c "exec 0</dev/null && if [ \"$APPVEYOR_REPO_BRANCH\" != \"master\" -a -z \"$APPVEYOR_PULL_REQUEST_NUMBER\" ]; then ./bootstrap.ci -s \"-$APPVEYOR_REPO_BRANCH\"; fi"
- bash -c "exec 0</dev/null && if [ \"$APPVEYOR_REPO_BRANCH\" != \"master\" -a -n \"$APPVEYOR_PULL_REQUEST_NUMBER\" ]; then ./bootstrap.ci -s \"-$APPVEYOR_REPO_BRANCH-prAPPVEYOR_PULL_REQUEST_NUMBER\"; fi"
# disable features to speed up the script
- bash -c "exec 0</dev/null && ./configure --with-cygwin-native --disable-openssl --disable-readline --disable-zlib || cat config.log"
- nmake /nologo /f Makefile.mak opensc.msi
- move win32\OpenSC.msi %ARTIFACT%.msi
# put all pdb files for dump analysis, but this consumes approx 100 MB per build
- md %ARTIFACT%-Debug
- ps: >-
Get-ChildItem -recurse ${env:APPVEYOR_BUILD_FOLDER} -exclude vc*.pdb *.pdb | % {
7z a -tzip ${env:ARTIFACT}-Debug.zip $_.FullName
}
- appveyor PushArtifact %ARTIFACT%.msi
- appveyor PushArtifact %ARTIFACT%-Debug.zip
# keep in sync with .travis.yml
- bash -c "git config --global user.email '[email protected]'"
- bash -c "git config --global user.name 'AppVeyor'"
- bash -c "if [ \"$DO_PUSH_ARTIFACT\" = yes -a -z \"$APPVEYOR_PULL_REQUEST_NUMBER\" -a \"$APPVEYOR_REPO_NAME\" = \"OpenSC/OpenSC\" ]; then .github/push_artifacts.sh \"AppVeyor build ${APPVEYOR_BUILD_NUMBER}.${APPVEYOR_JOB_NUMBER}\"; fi"
deploy:
- provider: Webhook
url: https://app.signpath.io/API/v1/8d2463fe-39bd-4a41-bb72-f008b4b1fe17/Integrations/AppVeyor?ProjectSlug=OpenSC&SigningPolicySlug=release-signing&ArtifactConfigurationSlug=initial
authorization:
secure: 73Qvk9MbD7M7ZcoO6NnSH7zDA+9wSKZqNc602b1UeA5v6GsDyEvpCOlzJ9VvBcUuePTKBRsZ+uGQYKsddABgQA==
cache:
- C:\zlib -> .appveyor.yml
- C:\zlib-Win32 -> .appveyor.yml
- C:\zlib-Win64 -> .appveyor.yml
- C:\openpace -> .appveyor.yml
- C:\openpace-Win32 -> .appveyor.yml
- C:\openpace-Win64 -> .appveyor.yml
- cpdksetup.exe -> .appveyor.yml