forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (117 loc) · 4.2 KB
/
windows.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Windows
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
release:
types:
- created
jobs:
test-windows:
strategy:
matrix:
ghc:
- "8.6.5"
- "8.10.4"
name: test ghc-${{ matrix.ghc }}
runs-on: windows-latest
steps:
- uses: actions/[email protected]
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
cabal --version
ghc --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/cache@v1
with:
path: C:\SR
key: windows-store-meta
- uses: actions/checkout@v2
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: Cabal unit-tests
run: |
cabal v2-test Cabal-tests
- name: cabal-install memory-usage-tests
run: |
cd cabal-install
cabal v2-run cabal-install:memory-usage-tests
- name: cabal-install long-tests
run: |
cd cabal-install
cabal v2-run cabal-install:long-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
- name: cabal-install integration-tests2
run: |
cd cabal-install
cabal v2-run cabal-install:integration-tests2
- name: cabal-install unit-tests
run: |
cd cabal-install
cabal v2-run cabal-install:unit-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
- name: cabal-tests
# Using only one job, -j1, to fail less.
run: cabal v2-run cabal-testsuite:cabal-tests -- -j1 --with-cabal=dist-newstyle\build\x86_64-windows\ghc-${{ matrix.ghc }}\cabal-install-3.7.0.0\x\cabal\build\cabal\cabal.exe
# TODO: store the exe from above as artifact and re-use it here instead of building anew
test-windows-dogfood:
strategy:
matrix:
ghc:
- "8.6.5"
- "8.10.4"
name: test ghc-${{ matrix.ghc }} dogfood
runs-on: windows-latest
steps:
- uses: actions/[email protected]
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
cabal --version
ghc --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/cache@v1
with:
path: C:\SR
key: windows-store-meta
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: wipe out cabal store
run: Remove-Item -Recurse -Force C:\SR
- name: eat its own dogfood by building own Cabal source with itself
run: |
cp $(cabal list-bin exe:cabal) ./cabal-exe-current
./cabal-exe-current --version
./cabal-exe-current v2-build Cabal
shell: bash
- name: eat its own dogfood by building all deps with itself
run: ./cabal-exe-current v2-build cabal-install --only-dependencies
shell: bash
- name: eat its own dogfood by building own source with itself
run: ./cabal-exe-current v2-build all
shell: bash