Skip to content

Commit 5f49d0c

Browse files
committed
Try adding Appveyor support.
Have no idea if this will work...
1 parent 862f7c6 commit 5f49d0c

File tree

4 files changed

+53
-13
lines changed

4 files changed

+53
-13
lines changed

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ sudo: true
33

44
# Add new environments to the build here:
55
env:
6-
- GHCVER=7.10.3 CABALVER=1.22
7-
- GHCVER=8.0.2 CABALVER=1.24
8-
- GHCVER=8.2.1 CABALVER=2.0
9-
- GHCVER=head CABALVER=head
6+
- GHCVER=7.10.3 CABALVER=1.22
7+
- GHCVER=8.0.2 CABALVER=1.24
8+
- GHCVER=8.2.1 CABALVER=2.0
9+
- GHCVER=head CABALVER=head
1010

1111
# Allow for develop branch to break
1212
matrix:
1313
allow_failures:
14-
- env: GHCVER=head CABALVER=head
14+
- env: GHCVER=head CABALVER=head
1515

1616
# Manually install ghc and cabal
1717
before_install:
@@ -22,12 +22,12 @@ before_install:
2222
- export PATH=$HOME/.cabal/bin:$PATH
2323
- travis_retry cabal update
2424

25-
# install happy and alex first, see: https://github.com/jameysharp/corrode/issues/57
25+
# Install Happy and Alex first, before installing
2626
install:
2727
- echo $PATH
2828
- cabal --version
2929
- ghc --version
30-
- cabal install happy
30+
- cabal install happy --constraint 'happy >= 1.19.8'
3131
- cabal install alex
3232
- cabal install --verbose --enable-tests
3333
- cabal configure

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
# Parser and pretty printer for the Rust language [![Build Status][4]][5]
1+
# Parser and pretty printer for Rust [![Build Status][4]][5] [![Windows build status][7]][8]
22

33
`language-rust` aspires to efficiently and accurately parse and pretty-print the [Rust language][0].
44
The underlying AST structures are also intended to be as similar as possible to the AST `rustc` uses
55
itself. When `language-rust` and `rustc` have diverging AST, the divergence should be detailed in
66
the documentation.
77

8-
## Building with Stack
8+
## Building
9+
10+
## Cabal
11+
12+
With Cabal and GHC, you should only need to run
13+
14+
cabal install happy --constraint 'happy >= 1.19.8'
15+
cabal install alex
16+
cabal configure
17+
cabal build
18+
19+
## Stack
920

1021
With the [Stack][1] tool installed, you should only need to run
1122

1223
stack init
13-
stack install
24+
stack build
1425

1526
The second command is responsible for pulling in all of the dependencies (including executable
1627
tools like [Alex][2], [Happy][3], and GHC itself) and then compiling everything.
@@ -47,3 +58,5 @@ pretty-printing.
4758
[4]: https://travis-ci.org/harpocrates/language-rust.svg?branch=master
4859
[5]: https://travis-ci.org/harpocrates/language-rust
4960
[6]: https://github.com/rust-lang-nursery/fmt-rfcs
61+
[7]: https://ci.appveyor.com/api/projects/status/um8dxklqmubvn091/branch/master?svg=true
62+
[8]: https://ci.appveyor.com/project/harpocrates/language-rust/branch/master

appveyor.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Clone location
2+
clone_folder: c:\language-rust
3+
4+
# Add new environments to the build here:
5+
environment:
6+
matrix:
7+
# - resolver: lts-6.35 # ghc-7.10.3
8+
# - resolver: lts-7.24 # ghc-8.0.1
9+
- resolver: lts-9.8 # ghc-8.0.2
10+
11+
# Manually fetch stack
12+
install:
13+
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
14+
- curl --output stack.zip --location --insecure http://www.stackage.org/stack/windows-x86_64
15+
- dir
16+
- 7z x stack.zip stack.exe
17+
- stack --no-terminal init --resolver %resolver% > nul
18+
- stack --no-terminal setup --resolver %resolver% > nul
19+
20+
# Install Happy and Alex first, before installing
21+
build_script:
22+
- stack --no-terminal install --resolver %resolver% happy-1.19.8
23+
- stack --no-terminal install --resolver %resolver% alex
24+
25+
test_script:
26+
- stack --no-terminal test --resolver %resolver% :unit-tests
27+

language-rust.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ test-suite rustc-tests
136136
type: exitcode-stdio-1.0
137137
default-language: Haskell2010
138138

139-
build-depends: base >=4.9 && <5.0
139+
build-depends: base >=4.8 && <5.0
140140
, process >= 1.3
141141
, prettyprinter >=1.1
142142
, bytestring >=0.10
@@ -162,7 +162,7 @@ benchmark timing-benchmarks
162162
type: exitcode-stdio-1.0
163163
default-language: Haskell2010
164164
build-depends: base >=4.8 && <5.0
165-
, process >= 1.4.3
165+
, process >= 1.3
166166
, bytestring >=0.10
167167
, directory >= 1.2.5.0
168168
, filepath >= 1.4.0.0
@@ -182,7 +182,7 @@ benchmark allocation-benchmarks
182182
type: exitcode-stdio-1.0
183183
default-language: Haskell2010
184184
build-depends: base >=4.8 && <5.0
185-
, process >= 1.4.3
185+
, process >= 1.3
186186
, bytestring >=0.10
187187
, directory >= 1.2.5.0
188188
, filepath >= 1.4.0.0

0 commit comments

Comments
 (0)