Try to do a `stack build` in CI.
language: nix
nix: 2.1.3
+cache:
+ directories:
+ - $HOME/.ghc
+ - $HOME/.cabal
+ - $HOME/.stack
+ - $TRAVIS_BUILD_DIR/.stack-work
+
install:
- - nix-env -iA cachix -f https://cachix.org/api/v1/install
before_install:
- git lfs pull
+ # King Haskell
+ # Using compiler above sets CC to an invalid value, so unset it
+ - unset CC
+ - CABALARGS=""
+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH
+ - | # Install stack
+ mkdir -p ~/.local/bin
+ # travis_retry curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
+ travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
+ # Use the more reliable S3 mirror of Hackage
+ mkdir -p $HOME/.cabal
+ echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
+ echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
+
+install:
+ - nix-env -iA cachix -f https://cachix.org/api/v1/install
+
+ # King Haskell
+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
+ - SAVED_OPTIONS=$(set +o)
+ - set -ex
+ - stack --no-terminal --install-ghc build king --only-dependencies
+ - eval "$SAVED_OPTIONS"
+
script:
- cachix use urbit2
- ./sh/cachix || true
@@ -16,6 +46,12 @@ script:
- sh/ci-tests
+ # King Haskell
+ - export PATH="${PATH}:$(pwd)/bin"
+ - stack build --fast --copy-bins --local-bin-path ./bin
+ # otool -L ./bin/king-linux64-demo
+ - mv bin/king release/king-linux64-demo
+
deploy:
- skip_cleanup: true
provider: gcs
