File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,33 @@ jobs:
130130 steps :
131131 - uses : actions/checkout@v2
132132
133- - name : Install ghcjs
133+ - name : Install ghcjs and tools
134134 run : |
135135 sudo add-apt-repository ppa:hvr/ghcjs
136136 sudo apt-get update -y
137137 sudo apt-get install ghcjs-8.4
138+ sudo apt-get install cabal-install
139+ cabal --version
140+ # Override cabal.project with the lightweight GHCJS one
141+ cp cabal.ghcjs.project cabal.project
142+ cat cabal.project
143+
144+ export PATH=/opt/ghcjs/8.4.4/bin:$PATH
145+ export PATH="$HOME/.cabal/bin:$PATH"
146+ cabal v2-update
147+ ls /opt
148+ ls /opt/ghcjs/8.4/bin
149+ # cabal v2-install --ghcjs -w /opt/ghcjs/8.4/bin/ghcjs --ignore-project hspec-discover
150+ cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project cabal-plan --constraint='cabal-plan ^>=0.6.0.0' --constraint='cabal-plan +exe'
151+ cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project hspec-discover
152+
153+ - name : Build
154+ run : |
155+ export PATH=/opt/ghcjs/8.4.4/bin:$PATH
156+ export PATH="$HOME/.cabal/bin:$PATH"
157+ cabal v2-build --ghcjs -w /opt/ghcjs/8.4/bin/ghcjs --enable-tests --enable-benchmarks all
158+
159+ - name : Run tests
160+ run : |
161+ export PATH="$HOME/.cabal/bin:$PATH"
162+ cabal-plan list-bins '*:test:*' | while read -r line; do testpkg=$(echo "$line" | perl -pe 's/:.*//'); testexe=$(echo "$line" | awk '{ print $2 }'); echo "testing $textexe in package $textpkg"; (cd "$(pkgdir $testpkg)" && nodejs "$testexe".jsexe/all.js); done
Original file line number Diff line number Diff line change 33packages:
44 servant/
55 servant-client-core/
6- servant-jsaddle/
76
87-- we need to tell cabal we are using GHCJS
98compiler: ghcjs
You can’t perform that action at this time.
0 commit comments