aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.appveyor.yml
blob: 4c586021a4037a35c14338e788d33cb5f58fcd87 (plain) (blame)
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
version: '{build}'

environment:
  install_dir: C:\Projects\install\windows-env
  global_env: HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  user_env: HKCU:\Environment

platform:
  - i386
  - x86_64

matrix:
  fast_finish: true

before_build:
  - choco.exe install haskell-stack

build_script:
  - >-
    stack.exe
    build
    --install-ghc
    --copy-bins
    --local-bin-path "%install_dir%"
    --arch "%PLATFORM%"

after_build:
  - 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%.zip" "%install_dir%"
  - appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%.zip"

# I a PS noob, don't know a simpler/more elegant way :-(
test_script:
  - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
  - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';')   | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb")
  - '"%install_dir%\addpath.exe" -y C:\dumb'
  - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
  - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';')   | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb")
  - '"%install_dir%\addpath.exe" -g -y C:\dumb'
  - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "Global PATH should contain C:\dumb")
  - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';')   | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb")
  - '"%install_dir%\delpath.exe" -g -y C:\dumb'
  - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
  - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';')   | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb")