Skip to content

Commit

Permalink
It's 2018.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalikov committed Aug 6, 2018
1 parent 6bc626e commit 0754b7e
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ lastfm.credentials
result
env.nix
Gemfile.lock
.stack-work
dist-newstyle
50 changes: 24 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
language: c

sudo: false

matrix:
include:
- env: CABALVER=1.16 GHCVER=7.6.3
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
- env: CABALVER=1.18 GHCVER=7.8.4
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.3
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3],sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1],sources: [hvr-ghc]}}
- env: CABALVER=head GHCVER=head
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}

allow_failures:
- env: CABALVER=head GHCVER=head

before_install:
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
env:
matrix:
- GHCVER=8.0 STACK_YAML=stack-8.0.yaml
- GHCVER=8.2 STACK_YAML=stack-8.2.yaml
- GHCVER=8.4 STACK_YAML=stack.yaml

install:
- cabal update
- cabal install --enable-tests --only-dependencies -ftest-api liblastfm.cabal example/liblastfm-examples.cabal
# stack
- mkdir -p ~/.local/bin
- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- export PATH=~/.local/bin:$PATH
- stack --no-terminal --version

script:
- cabal install --enable-tests --only-dependencies -ftest-api liblastfm.cabal example/liblastfm-examples.cabal
- cabal sdist && cabal install --enable-tests dist/liblastfm-*.tar.gz
- stack setup --no-terminal
- stack update --no-terminal
- stack build -j2 --fast --no-terminal
- travis_wait 45 sleep 1800 &
- stack test --fast --no-terminal

cache:
timeout: 2000
directories:
- $HOME/.cabal
- $HOME/.ghc
- $HOME/.stack
- .stack-work/
apt: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2012-2017 Matvey Aksenov, Dmitry Malikov
Copyright (C) 2012-2018 Matvey Aksenov, Dmitry Malikov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
3 changes: 0 additions & 3 deletions example/sort-friends.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ scores conn xs = zip xs <$> forConcurrently xs (\x -> do
where
score = folded.key "comparison".key "result".key "score"._String

forConcurrently :: [a] -> (a -> IO b) -> IO [b]
forConcurrently = flip mapConcurrently

pretty :: [(Text, Score)] -> IO ()
pretty = mapM_ (\(n,s) -> Text.putStrLn $ n <> ": " <> s) . take 5 . sortBy (flip compare `on` snd)

Expand Down
13 changes: 13 additions & 0 deletions stack-8.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resolver: lts-9.21
packages:
- '.'
- 'example'
allow-newer: true
extra-deps:
- blaze-html-0.9.1.1
- blaze-markup-0.8.2.1
- conduit-1.2.13.1
- hspec-expectations-lens-0.4.0
- resourcet-1.1.11
- xml-conduit-1.7.1.2
- xml-html-conduit-lens-0.3.2.1
17 changes: 17 additions & 0 deletions stack-8.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resolver: lts-11.19
packages:
- '.'
- 'example'
allow-newer: true
extra-deps:
- blaze-html-0.9.1.1
- blaze-markup-0.8.2.1
- conduit-1.2.13.1
- conduit-extra-1.2.3.2
- hspec-expectations-lens-0.4.0
- html-conduit-1.2.1.2
- resourcet-1.1.11
- xml-conduit-1.7.1.2
- xml-html-conduit-lens-0.3.2.1
ghc-options:
"$locals": -fhide-source-paths
18 changes: 18 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resolver: lts-12.4
packages:
- '.'
- 'example'
allow-newer: true
extra-deps:
- blaze-html-0.9.1.1
- blaze-markup-0.8.2.1
- conduit-1.2.13.1
- conduit-extra-1.2.3.2
- hspec-expectations-lens-0.4.0
- html-conduit-1.2.1.2
- resourcet-1.1.11
- streaming-commons-0.1.17
- xml-conduit-1.7.1.2
- xml-html-conduit-lens-0.3.2.1
ghc-options:
"$locals": -fhide-source-paths

0 comments on commit 0754b7e

Please sign in to comment.