This repository has been archived by the owner on Mar 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
appveyor.yml
57 lines (52 loc) · 2.09 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
version: "{build}"
platform: x64
image:
- Visual Studio 2015
- Visual Studio 2017
clone_folder: c:\gopath\src\github.com\bblfsh\libuast
environment:
GOPATH: c:\gopath
GOVERSION: "1.12.4"
GO111MODULE: "on"
PREFIX: c:\opt
CYG_ROOT: C:\cygwin64
VS150COMNTOOLS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools"
MINGWPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
matrix:
- BUILD: mingw
# - BUILD: msvc
matrix:
exclude:
- image: Visual Studio 2017
BUILD: mingw
- image: Visual Studio 2015
BUILD: msvc
install:
# Install the specific Go version.
- rmdir c:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.msi
- msiexec /i go%GOVERSION%.windows-amd64.msi /q
- set PATH=c:\go\bin;c:\gopath\bin;%PATH%
- go version
- go env
# Use preinstalled mingw 6.3.0, note that using 7.3.0 causes problems with
# the compiled libraries when linking against them, at least when cross-compiling
# from older GCC. Test these scenarios if you consider upgrading mingw here.
- if %BUILD% == mingw copy %MINGWPATH%\bin\mingw32-make.exe %MINGWPATH%\bin\make.exe
- if %BUILD% == mingw set PATH=%MINGWPATH%\bin;%PATH%
- if %BUILD% == msvc call "%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvarsall.bat" amd64
build_script:
# Workaround for CMake+MinGW conflicting with sh.exe in PATH
- if %BUILD% == mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- cd c:\gopath\src\github.com\bblfsh\libuast
# We need a proper Bash to run a makefile, so switch to Cygwin temporarily
- set PATH_BCK=%PATH%
- set PATH=%PATH%;%CYG_ROOT%\bin
- make build
- set PATH=%PATH_BCK%
# try to build an example to check that we can link to the library
- cd examples
- if %BUILD% == mingw cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%PREFIX% -DDISABLE_EXAMPLES=1 .
- if %BUILD% == msvc cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_INSTALL_PREFIX=%PREFIX% -DDISABLE_EXAMPLES=1 .
- if %BUILD% == mingw make
- if %BUILD% == msvc cmake --build . --target install --config Release