summaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: dbb01f9799cc6c0b79b6ff173f09246f27f530df (plain)
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
# http://www.appveyor.com/docs/build-configuration

# version format
version: 1.0.{build}

# branches to build
branches:
  # whitelist
  only:
    - appveyor

# Operating system (build VM template)
#os: Windows Server 2012 R2
# Get image with cygwin
os: Unstable

# scripts that are called at very beginning, before repo cloning
init:
  - echo Building Raptor for Windows
  - git config --global core.autocrlf input

# GIT clone directory
clone_folder: c:\projects\raptor

platform: x64
configuration: Release

environment:
  CYG_ROOT: C:/cygwin
  CYG_SETUP_URL: http://www.cygwin.com/setup-x86.exe
  CYG_MIRROR: http://cygwin.mirror.constant.com
  CYG_CACHE: C:/cygwin/var/cache/setup
  DEST: "c:/projects/dest"
  CMAKE_GENERATOR_STRING: '"Visual Studio 12 Win64"'

install:
  - ps:  echo "Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe"
  - ps:  Invoke-WebRequest $env:CYG_SETUP_URL -OutFile $env:CYG_ROOT/setup-x86.exe
  - cmd: 'echo Installing Perl, Bison and Flex from Cygwin'
  - cmd: '%CYG_ROOT%\setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P perl -P bison -P flex > NUL'
  - cmd: 'echo Check Cygwin setup'
  - cmd: '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
  - cmd: 'echo Done setting up Cygwin'
  - cmd: '%CYG_ROOT%/bin/flex -V'
  - cmd: '%CYG_ROOT%/bin/bison --version'
  - cmd: '%CYG_ROOT%/bin/perl -v'

before_build:
  #- cmd: 'echo Running Flex and Bison to generate sources'
  #- cmd: 'cd c:\projects\raptor\src'
  #- cmd: '%CYG_ROOT%/bin/flex -oturtle_lexer.c turtle_lexer.l'
  #- cmd: '%CYG_ROOT%/bin/perl ../scripts/fix-flex.pl turtle_lexer.c > turtle_lexer.t'
  #- cmd: '%CYG_ROOT%/bin/mv -f turtle_lexer.t turtle_lexer.c'
  #- cmd: '%CYG_ROOT%/bin/bison -o turtle_parser.c turtle_parser.y'
  #- cmd: '%CYG_ROOT%/bin/perl ../scripts/fix-bison.pl turtle_parser.c'
  #- cmd: '%CYG_ROOT%/bin/bison -o parsedate.c parsedate.y'
  #- cmd: '%CYG_ROOT%/bin/perl ../scripts/fix-bison.pl parsedate.c'
  - cmd: 'md c:\projects\dest'
  - cmd: 'md c:\projects\raptor\bld'
  - cmd: 'md c:\projects\raptor\bldstatic'

# custom build script
build_script:
  - cmd: 'cd c:\projects\raptor\bldstatic'
  - cmd: 'cmake -G %CMAKE_GENERATOR_STRING% -DBISON_EXECUTABLE=%CYG_ROOT%/bin/bison -DFLEX_EXECUTABLE=%CYG_ROOT%/bin/flex -DPERL_EXECUTABLE=%CYG_ROOT%/bin/perl -DCMAKE_INSTALL_PREFIX=%DEST%static ..'
  - cmd: 'cmake --build . --config Release --target INSTALL'
  - cmd: 'cd %DEST%static'
  - cmd: 'dir /s'
  - cmd: 'cd c:\projects\raptor\bld'
  - cmd: 'cmake -G %CMAKE_GENERATOR_STRING% -DBISON_EXECUTABLE=%CYG_ROOT%/bin/bison -DFLEX_EXECUTABLE=%CYG_ROOT%/bin/flex -DPERL_EXECUTABLE=%CYG_ROOT%/bin/perl -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_PREFIX=%DEST% ..'
  - cmd: 'cmake --build . --config Release --target INSTALL'
  - cmd: 'cd %DEST%'
  - cmd: 'dir /s'