Blame appveyor.yml

Packit Service 7770af
os: Visual Studio 2013
Packit Service 7770af
Packit Service 7770af
environment:
Packit Service 7770af
  CTEST_OUTPUT_ON_FAILURE: 1
Packit Service 7770af
  ruby_version: 22-x64
Packit Service 7770af
  TargetPath: sassc/bin/sassc.exe
Packit Service 7770af
  matrix:
Packit Service 7770af
  - Compiler: msvc
Packit Service 7770af
    Config: Release
Packit Service 7770af
    Platform: Win32
Packit Service 7770af
  - Compiler: msvc
Packit Service 7770af
    Config: Debug
Packit Service 7770af
    Platform: Win32
Packit Service 7770af
  - Compiler: msvc
Packit Service 7770af
    Config: Release
Packit Service 7770af
    Platform: Win64
Packit Service 7770af
  - Compiler: mingw
Packit Service 7770af
    Build: static
Packit Service 7770af
  - Compiler: mingw
Packit Service 7770af
    Build: shared
Packit Service 7770af
Packit Service 7770af
cache:
Packit Service 7770af
  - C:\Ruby%ruby_version%\lib\ruby\gems
Packit Service 7770af
  - C:\mingw64
Packit Service 7770af
Packit Service 7770af
install:
Packit Service 7770af
  - git clone https://github.com/sass/sassc.git
Packit Service 7770af
  - git clone https://github.com/sass/sass-spec.git
Packit Service 7770af
  - set PATH=C:\Ruby%ruby_version%\bin;%PATH%
Packit Service 7770af
  - ps: |
Packit Service 7770af
      if(!(gem which minitest 2>$nul)) { gem install minitest --no-ri --no-rdoc }
Packit Service 7770af
      if ($env:Compiler -eq "mingw" -AND -Not (Test-Path "C:\mingw64")) {
Packit Service 7770af
        # Install MinGW.
Packit Service 7770af
        $file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
Packit Service 7770af
        wget https://bintray.com/artifact/download/drewwells/generic/$file -OutFile $file
Packit Service 7770af
        &7z x -oC:\ $file > $null
Packit Service 7770af
      }
Packit Service 7770af
  - set PATH=C:\mingw64\bin;%PATH%
Packit Service 7770af
  - set CC=gcc
Packit Service 7770af
Packit Service 7770af
build_script:
Packit Service 7770af
  - ps: |
Packit Service 7770af
      if ($env:Compiler -eq "mingw") {
Packit Service 7770af
        mingw32-make -j4 sassc
Packit Service 7770af
      } else {
Packit Service 7770af
        msbuild /m:4 /p:"Configuration=$env:Config;Platform=$env:Platform" sassc\win\sassc.sln
Packit Service 7770af
      }
Packit Service 7770af
Packit Service 7770af
      # print the branding art
Packit Service 7770af
      mv script/branding script/branding.ps1
Packit Service 7770af
      script/branding.ps1
Packit Service 7770af
Packit Service 7770af
      # print the version info
Packit Service 7770af
      &$env:TargetPath -v
Packit Service 7770af
      ruby -v
Packit Service 7770af
Packit Service 7770af
test_script:
Packit Service 7770af
  - ps: |
Packit Service 7770af
      $PRNR = $env:APPVEYOR_PULL_REQUEST_NUMBER
Packit Service 7770af
      if ($PRNR) {
Packit Service 7770af
        echo "Fetching info for PR $PRNR"
Packit Service 7770af
        wget https://api.github.com/repos/sass/libsass/pulls/$PRNR -OutFile pr.json
Packit Service 7770af
        $json = cat pr.json -Raw
Packit Service 7770af
        $SPEC_PR = [regex]::match($json,'sass\/sass-spec(#|\/pull\/)([0-9]+)').Groups[2].Value
Packit Service 7770af
        if ($SPEC_PR) {
Packit Service 7770af
          echo "Checkout sass spec PR $SPEC_PR"
Packit Service 7770af
          git -C sass-spec fetch -q -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
Packit Service 7770af
          git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
Packit Service 7770af
        }
Packit Service 7770af
      }
Packit Service 7770af
      $env:TargetPath = Join-Path $pwd.Path $env:TargetPath
Packit Service 7770af
      If (Test-Path "$env:TargetPath") {
Packit Service 7770af
        ruby sass-spec/sass-spec.rb -V 3.4 --probe-todo --impl libsass -c $env:TargetPath -s sass-spec/spec
Packit Service 7770af
        if(-not($?)) {
Packit Service 7770af
          echo "sass-spec tests failed"
Packit Service 7770af
          exit 1
Packit Service 7770af
        }
Packit Service 7770af
      } else {
Packit Service 7770af
        echo "spec runner not found (compile error?)"
Packit Service 7770af
        exit 1
Packit Service 7770af
      }
Packit Service 7770af
      Write-Host "Explicitly testing the case when cwd has Cyrillic characters: " -nonewline
Packit Service 7770af
      # See comments in gh-1774 for details.
Packit Service 7770af
      cd sass-spec/spec/libsass/Sáss-UŢF8/
Packit Service 7770af
      &$env:TargetPath ./input.scss 2>&1>$null
Packit Service 7770af
      if(-not($?)) {
Packit Service 7770af
        echo "Failed!"
Packit Service 7770af
        exit 1
Packit Service 7770af
      } else {
Packit Service 7770af
        echo "Success!"
Packit Service 7770af
      }