forked from ghostunnel/ghostunnel
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.appveyor.yml
45 lines (40 loc) · 1.36 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
version: '{build}-{branch}'
os: 'Visual Studio 2015'
environment:
matrix:
- ARCH: x64
MSYS2_ARCH: x86_64
MSYS2_DIR: msys64
MSYSTEM: MINGW64
GOPATH: c:\gopath
GOROOT: c:\go
GOARCH: amd64
EXTLD: x86_64-w64-mingw32-gcc
- ARCH: x86
MSYS2_ARCH: i686
MSYS2_DIR: msys64
MSYSTEM: MINGW32
GOPATH: c:\gopath
GOROOT: c:\go
GOARCH: 386
EXTLD: i686-w64-mingw32-gcc
clone_folder: C:\gopath\src\github.com\square\ghostunnel
before_build:
# Go paths
- set PATH=%GOROOT%\bin;C:\%GOPATH%\bin;%PATH%
# MSYS paths
- set PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH%
# Install build deps
- bash -lc "for n in `seq 1 3`; do pacman --noconfirm -S mingw-w64-%MSYS2_ARCH%-libtool && break || sleep 15; done"
build_script:
- git describe > version
- set /p GIT_VERSION= < version
# Build without PKCS11 enabled
- set CGO_ENABLED=0
- go build -o ghostunnel-%GIT_VERSION%-windows-%GOARCH%-without-pkcs11.exe -i .
- sha256sum ghostunnel-%GIT_VERSION%-windows-%GOARCH%-without-pkcs11.exe > ghostunnel-%GIT_VERSION%-windows-%GOARCH%-without-pkcs11.exe.sha256sum
# Build with PKCS11 enabled
- set CGO_ENABLED=1
- go build -o ghostunnel-%GIT_VERSION%-windows-%GOARCH%-with-pkcs11.exe -ldflags "-w -extldflags \"-static\" -extld=%EXTLD%" -i .
# Execute tests
- go test -v ./...