Skip to content

Commit 68a8763

Browse files
hvrMitsutoshi Aoe
authored andcommitted
Modernise Appveyor CI script
This allows to build artifacts for more than one GHC version and uses a more state-of-the-art way of building Threadscope.
1 parent 3a829f2 commit 68a8763

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

appveyor.yml

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,52 @@
1-
platform: x64
1+
version: "{build}"
22
shallow_clone: true
3+
clone_folder: "c:/WORK"
4+
5+
platform: x64
6+
37
environment:
48
global:
5-
STACK_ROOT: c:\sr
9+
APPVEYOR_SAVE_CACHE_ON_ERROR: true
10+
CABOPTS: "--store-dir=c:/SR --http-transport=plain-http"
11+
# C_INCLUDE_PATH: "c:/msys64/mingw64/include"
12+
# LIBRARY_PATH: "c:/msys64/mingw64/lib;c:/msys64/mingw64/bin"
13+
matrix:
14+
- GHCVER: "8.0.2"
15+
- GHCVER: "8.2.2"
16+
# - GHCVER: "7.10.3.2"
17+
618
cache:
7-
- c:\sr -> appveyor.yml
8-
- c:\msys64\var\cache\pacman\pkg -> appveyor.yml
19+
- "c:/SR"
20+
#- c:\msys64\var\cache\pacman\pkg -> appveyor.yml
21+
922
install:
10-
- set HOME=.
11-
- set "PATH=c:\msys64\usr\bin;%PATH%"
12-
- curl -ostack.zip -LsS --insecure https://www.stackage.org/stack/windows-x86_64
13-
- 7z x stack.zip stack.exe
14-
- stack setup > nul
15-
- stack exec -- pacman --noconfirm --needed --ask 20 -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel
16-
- stack exec -- pacman --noconfirm -Syu
17-
- stack exec -- pacman --noconfirm -Syuu
18-
- stack exec -- pacman --noconfirm -S base-devel mingw-w64-x86_64-pkg-config mingw-w64-x86_64-toolchain mingw-w64-x86_64-gtk2
19-
- stack exec -- pacman --noconfirm -Sc
23+
- "choco install -y ghc --version %GHCVER%"
24+
- "refreshenv"
25+
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
26+
- "pacman --noconfirm -Sy mingw-w64-x86_64-gtk2"
27+
- "cabal --version"
28+
- "ghc --version"
29+
- "cabal %CABOPTS% update -vverbose+nowrap"
30+
2031
build_script:
21-
- stack --no-terminal build --only-dependencies
32+
- "cabal %CABOPTS% new-build -vnormal+nowrap --dry all"
33+
- ps: "Push-AppveyorArtifact dist-newstyle\\cache\\plan.json"
34+
- "cabal %CABOPTS% new-build -j -vnormal+nowrap all --dep"
35+
2236
test_script:
23-
- stack --no-terminal build --ghc-options -Werror
24-
- stack sdist
25-
version: '{build}'
37+
- "cabal %CABOPTS% new-build -j1 -vnormal+nowrap all"
38+
#- "cabal %CABOPTS% new-test -j1 -vnormal+nowrap all"
39+
2640
after_test:
27-
- ps: cp "$(./stack.exe path --local-install-root)/bin/threadscope.exe" threadscope.exe
28-
- 7z a threadscope.windows.%PLATFORM%.zip threadscope.exe
29-
artifacts:
30-
- path: threadscope.windows.%PLATFORM%.zip
41+
- bash -c "cp -v $(find -name threadscope.exe) ./threadscope.exe"
42+
- 7z a threadscope.windows.%PLATFORM%.ghc-%GHCVER%.zip threadscope.exe
43+
- ps: "Push-AppveyorArtifact threadscope.windows.$($env:PLATFORM).ghc-$($env:GHCVER).zip"
44+
3145
deploy:
32-
- provider: GitHub
33-
auth_token:
34-
secure: IbU7Tokqkdq4bI5PT+HvzG0hO4O8t2Lxq3GamSuAzWsQWt4vZahOGL9StxIXIe94
35-
artifact: threadscope.windows.$(platform).zip
36-
release: $(appveyor_repo_tag_name)
37-
on:
38-
appveyor_repo_tag: true
46+
- provider: GitHub
47+
auth_token:
48+
secure: IbU7Tokqkdq4bI5PT+HvzG0hO4O8t2Lxq3GamSuAzWsQWt4vZahOGL9StxIXIe94
49+
artifact: threadscope.windows.$(platform).ghc-$(GHCVER).zip
50+
release: $(appveyor_repo_tag_name)
51+
on:
52+
appveyor_repo_tag: true

cabal.project

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- see http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html for more information
2+
3+
packages: .

0 commit comments

Comments
 (0)