Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow upload on upgraded hackage #472

Merged
merged 28 commits into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5893542
Bump version to 0.24.1.1
swamp-agr Jan 8, 2021
5d3cb67
Allow upload on upgraded hackage: Bump cabal version in cabal file
swamp-agr Jan 8, 2021
48b0799
Bump cabal to 3.0, allow autogen-modules
swamp-agr Jan 8, 2021
1dd0f38
Fix `cabal-version` position and `license` value
swamp-agr Jan 9, 2021
9b586a4
Update Travis CI with `haskell-ci` tool and adjust tests
swamp-agr Jan 9, 2021
3ae5734
Remove test execution from `install` section of Travis config
swamp-agr Jan 9, 2021
ab9f71f
Add path to compiler explicitly, build fay-base library separately
swamp-agr Jan 9, 2021
ec233e4
Add `fay-base` in autogenerated cabal.project for Travis CI
swamp-agr Jan 9, 2021
f2efcb4
Resolve parser error, fix indentation in Tests.Compile module
swamp-agr Jan 9, 2021
4f2e842
Explicitly specify fay and fay-base in `script` section
swamp-agr Jan 9, 2021
44cbd92
Fix paths for fay and fay-base in autogenerated haskell-ci flow
swamp-agr Jan 9, 2021
eae749f
Add travis_retry --only-dependencies to fix circular deps
swamp-agr Jan 9, 2021
042e3f2
Build fay-base after fay, then install fay-tests
swamp-agr Jan 9, 2021
0d91130
Remove `autogen-modules` from executable targets in Cabal file
swamp-agr Jan 9, 2021
dceba17
Add build target for cabal
swamp-agr Jan 9, 2021
c1d0823
Navigate to PKGDIR_fay for running tests
swamp-agr Jan 9, 2021
0932983
Add path to package-db in Travis environment
swamp-agr Jan 9, 2021
44b38e8
Fix ghc version part of filepath to package-db dir
swamp-agr Jan 9, 2021
ff166d1
Changing package-db dir from relative to absolute path
swamp-agr Jan 9, 2021
3244826
Add explicit fay-base path as argument for fay-tests
swamp-agr Jan 9, 2021
380cff4
Downgrade Travis CI pipeline to v1-style
swamp-agr Jan 10, 2021
f8fbe3e
Fix 'compiler is missing'
swamp-agr Jan 10, 2021
bfaa0db
Remove ${WITHCOMPILER} flag from `v1-exec` command args
swamp-agr Jan 10, 2021
f489ad8
Remove cabal v1-exec, since it is confusing tests launch
swamp-agr Jan 10, 2021
5830115
Downgrade spec-version to 2.0, restore support for < 8.8 compilers
swamp-agr Jan 10, 2021
3f87f73
Hide autogen-modules stanza for GHC 8.0
swamp-agr Jan 10, 2021
649eb0d
Drop 8.0.x support
swamp-agr Jan 10, 2021
fe9091a
Fix Tested-with stanza
swamp-agr Jan 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 92 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,94 @@
language: "haskell"
sudo: required
dist: trusty
ghc:
- "8.0"
- "8.2"
- "8.4"
- "8.6"
# This Travis job script has been generated by a script via
#
# haskell-ci 'fay.cabal' '--output' '.travis.yml'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.10.3
#
version: ~> 1.0
language: c
os: linux
dist: xenial
git:
# whether to recursively clone submodules
submodules: false
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $HOME/.hlint
before_cache:
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
- rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $CABALHOME/packages/head.hackage
jobs:
include:
- compiler: ghc-8.8.3
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
os: linux
- compiler: ghc-8.6.5
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
os: linux
- compiler: ghc-8.4.4
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
os: linux
before_install:
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
- WITHCOMPILER="-w $HC"
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
- HCPKG="$HC-pkg"
- unset CC
- CABAL=/opt/ghc/bin/cabal
- CABALHOME=$HOME/.cabal
- export PATH="$CABALHOME/bin:$PATH"
- TOP=$(pwd)
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
- CABAL="$CABAL -vnormal+nowrap"
- set -o pipefail
- TEST=--enable-tests
- BENCH=--enable-benchmarks
- HEADHACKAGE=false
- rm -f $CABALHOME/config
- |
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
echo "write-ghc-environment-files: always" >> $CABALHOME/config
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
install:
- "travis_retry cabal install 'cpphs >= 1.18.3' 'happy >= 1.19.5'"
- "cabal install --dry-run -v3"
- "travis_retry cabal install --force-reinstalls --only-dependencies -ftest"
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- |
echo "program-default-options" >> $CABALHOME/config
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
- cat $CABALHOME/config
- travis_retry ${CABAL} v1-update -v
- "travis_retry ${CABAL} v1-install $WITHCOMPILER 'cpphs >= 1.18.3' 'happy >= 1.19.5'"
- "${CABAL} v1-install $WITHCOMPILER --dry-run -v3"
- "travis_retry ${CABAL} v1-install $WITHCOMPILER --force-reinstalls --only-dependencies -ftest"
script:
- cabal install . fay-base/ --jobs=1 -ftest
- cabal exec fay-tests -- --num-threads=4 -random 20
- npm install
- npm test
notifications:
email:
recipients: adam@bergmark.nl
on_success: change
on_failure: change
- "${CABAL} v1-install $WITHCOMPILER . fay-base/ --jobs=1 -ftest"
- "fay-tests --num-threads=4 -random 20"
# REGENDATA ("0.10.3",["fay.cabal","--output",".travis.yml"])
# EOF
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

See full history at: <https://github.com/faylang/fay/commits>

### 0.24.1.1 (2021-01-08)

* Relax boundaries for aeson, tasty, base-compat. Allow builds for Gentoo (#469).

### 0.24.1.0 (2020-03-26)

* GHC 8.10.1 support.
Expand Down
4 changes: 4 additions & 0 deletions fay-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

## 0.21.1.2 (2020-02-09)

* Cabal-version upgraded to 3.0.

## 0.21.1.1 (2019-05-01)

* Added `Show` instance for `Text` (#453).
Expand Down
4 changes: 2 additions & 2 deletions fay-base/fay-base.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cabal-version: 2.0
name: fay-base
version: 0.21.1.1
version: 0.21.1.2
synopsis: The base package for Fay.
description: The base package for Fay.
This package amongst others exports Prelude and FFI which you probably want to use with Fay.
Expand All @@ -12,7 +13,6 @@ bug-reports: https://github.com/faylang/fay/issues
copyright: 2012 Chris Done
category: Development, Fay
build-type: Simple
cabal-version: >=1.8
extra-source-files:
LICENSE
README.md
Expand Down
10 changes: 8 additions & 2 deletions fay.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cabal-version: 2.0
name: fay
version: 0.24.1.0
version: 0.24.1.1
synopsis: A compiler for Fay, a Haskell subset that compiles to JavaScript.
description: Fay is a proper subset of Haskell which is type-checked
with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad,
Expand All @@ -22,7 +23,7 @@ maintainer: adam@bergmark.nl
copyright: 2012 Chris Done, Adam Bergmark
category: Development, Web, Fay
build-type: Custom
cabal-version: >=1.8
Tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.3
data-files:
src/Fay/FFI.hs
extra-source-files:
Expand Down Expand Up @@ -77,10 +78,13 @@ custom-setup
, Cabal

library
default-language: Haskell2010
ghc-options: -O2 -Wall
hs-source-dirs:
src
src/haskell-names
autogen-modules:
Paths_fay
exposed-modules:
Fay
Fay.Compiler
Expand Down Expand Up @@ -174,6 +178,7 @@ library
build-depends: tagged

executable fay
default-language: Haskell2010
hs-source-dirs: src/main
ghc-options: -O2 -Wall
main-is: Main.hs
Expand All @@ -187,6 +192,7 @@ executable fay
Paths_fay

executable fay-tests
default-language: Haskell2010
ghc-options: -O2 -Wall -threaded -with-rtsopts=-N
hs-source-dirs: src/tests
main-is: Tests.hs
Expand Down
11 changes: 6 additions & 5 deletions src/tests/Test/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ assertPretty cfg flagName = do
case res of
Left l -> assertFailure $ "Should compile, but failed with: " ++ show l
Right js -> do
writeFile ("tests/Compile/" ++ flagName ++ suffix) js
(err, out) <- either id id <$> runScriptFile isTs ("tests/Compile/" ++ flagName ++ suffix)
when (err /= "") $ assertFailure err
expected <- readFile $ "tests/Compile/" ++ flagName ++ ".res"
assertEqual (flagName ++ " node stdout") expected out
writeFile ("tests/Compile/" ++ flagName ++ suffix) js
(err, out) <- either id id <$> runScriptFile isTs
("tests/Compile/" ++ flagName ++ suffix)
when (err /= "") $ assertFailure err
expected <- readFile $ "tests/Compile/" ++ flagName ++ ".res"
assertEqual (flagName ++ " node stdout") expected out

case_pretty :: Assertion
case_pretty = do
Expand Down