-
Notifications
You must be signed in to change notification settings - Fork 5
/
appveyor.yml
84 lines (66 loc) · 2.75 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
version: 1.0.{build}
shallow_clone: true
branches:
only:
- master
skip_tags: true
os: Windows Server 2012 R2
platform:
- x86
# Add x64 platform later
# - x64
configuration:
- Release
# Add debug configuration later
# - Debug
environment:
global:
MSYS_ROOT: C:/MinGW/msys/1.0
build:
verbosity: detailed
init:
- git config --global core.autocrlf input
- 'echo Building version %version% for Windows'
- 'echo System architecture: %PLATFORM%'
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
install:
- set PATH=C:\cygwin\bin;%PATH%;C:\MinGW\msys\1.0\bin;C:\MinGW\bin
- set CYG_ROOT=C:/MinGW/msys/1.0
- set OPENSSL_VERSION=1_0_2d
# Re-add OpenSSL support later
# - ps: >-
# If ($env:Platform -Match "x86") {
# $env:OPENSSL_PLATFORM="Win32"
# } Else {
# $env:OPENSSL_PLATFORM="Win64"
# }
# Start-FileDownload https://slproweb.com/download/Win32OpenSSL-${env:OPENSSL_VERSION}.exe -FileName C:\WinOpenSSL.exe
# - C:\WinOpenSSL.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
build_script:
- cmd: if %PLATFORM%==x86 SET OPENSSL_PLATFORM=Win32
- cmd: if %PLATFORM%==x64 SET OPENSSL_PLATFORM=Win64
- cmd: 'echo Cygwin root is: %CYG_ROOT%'
- cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
- cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
- cmd: 'echo OpenSSL Platform is: %OPENSSL_PLATFORM%'
- cmd: 'echo "C:\MinGW /mingw" >%CYG_ROOT%/etc/fstab'
- cmd: 'C:\MinGW\bin\mingw-get install autotools autoconf automake libtool'
- cmd: 'echo Autogen running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; mount C:/MinGW /mingw"'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; autoreconf -i"'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; CFLAGS=\"-D_GNU_SOURCE -D_cdecl=__cdecl -Doff_t=_off_t -Doff64_t=_off64_t\" ./configure --with-pkcs11-module=\"C:\\Program Files (x86)\\Mozilla Firefox\\softokn3.dll\""'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; make V=1"'
- cmd: 'echo Installation'
- cmd: 'mkdir %APPVEYOR_BUILD_FOLDER%\dist'
- cmd: '%CYG_ROOT%/bin/bash -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\dist\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
artifacts:
- path: dist
name: pkcs11-util
type: zip
# Re-add OpenSSL later
# - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; CFLAGS=\"-D_GNU_SOURCE\" ./configure --with-openssl=C:/OpenSSL-%OPENSSL_PLATFORM%"'
# cache:
# - C:\OpenSSL-Win32
# - C:\OpenSSL-Win64