Initial commit
[yaffs-website] / node_modules / node-sass / src / libsass / appveyor.yml
1 os: Visual Studio 2013
2
3 environment:
4   CTEST_OUTPUT_ON_FAILURE: 1
5   ruby_version: 22-x64
6   TargetPath: sassc/bin/sassc.exe
7   matrix:
8   - Compiler: msvc
9     Config: Release
10   - Compiler: msvc
11     Config: Debug
12   - Compiler: mingw
13     Build: static
14   - Compiler: mingw
15     Build: shared
16
17 cache:
18   - C:\Ruby%ruby_version%\lib\ruby\gems
19   - C:\mingw64
20
21 install:
22   - git clone https://github.com/sass/sassc.git
23   - git clone https://github.com/sass/sass-spec.git
24   - set PATH=C:\Ruby%ruby_version%\bin;%PATH%
25   - ps: |
26       if(!(gem which minitest 2>$nul)) { gem install minitest --no-ri --no-rdoc }
27       if ($env:Compiler -eq "mingw" -AND -Not (Test-Path "C:\mingw64")) {
28         # Install MinGW.
29         $file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
30         wget https://bintray.com/artifact/download/drewwells/generic/$file -OutFile $file
31         &7z x -oC:\ $file > $null
32       }
33   - set PATH=C:\mingw64\bin;%PATH%
34   - set CC=gcc
35
36 build_script:
37   - ps: |
38       if ($env:Compiler -eq "mingw") {
39         mingw32-make -j4 sassc
40       } else {
41         msbuild /m:4 /p:Configuration=$env:Config sassc\win\sassc.sln
42       }
43
44       # print the branding art
45       mv script/branding script/branding.ps1
46       script/branding.ps1
47
48       # print the version info
49       &$env:TargetPath -v
50       ruby -v
51
52 test_script:
53   - ps: |
54       $PRNR = $env:APPVEYOR_PULL_REQUEST_NUMBER
55       if ($PRNR) {
56         echo "Fetching info for PR $PRNR"
57         wget https://api.github.com/repos/sass/libsass/pulls/$PRNR -OutFile pr.json
58         $json = cat pr.json -Raw
59         $SPEC_PR = [regex]::match($json,'sass\/sass-spec(#|\/pull\/)([0-9]+)').Groups[2].Value
60         if ($SPEC_PR) {
61           echo "Checkout sass spec PR $SPEC_PR"
62           git -C sass-spec fetch -q -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
63           git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
64         }
65       }
66       $env:TargetPath = Join-Path $pwd.Path $env:TargetPath
67       If (Test-Path "$env:TargetPath") {
68         ruby sass-spec/sass-spec.rb -V 3.5 --probe-todo --impl libsass -c $env:TargetPath -s sass-spec/spec
69         if(-not($?)) {
70           echo "sass-spec tests failed"
71           exit 1
72         }
73       } else {
74         echo "spec runner not found (compile error?)"
75         exit 1
76       }
77       Write-Host "Explicitly testing the case when cwd has Cyrillic characters: " -nonewline
78       # See comments in gh-1774 for details.
79       cd sass-spec/spec/libsass/Sáss-UŢF8/
80       &$env:TargetPath ./input.scss 2>&1>$null
81       if(-not($?)) {
82         echo "Failed!"
83         exit 1
84       } else {
85         echo "Success!"
86       }
87