@@ -1,50 +1,43 @@
1−language: c
1+language: nix
2+nix: 2.2.2
23
3−#ghc:
4−# - "8.4.4"
5−
6−sudo: false
7−
8−dist: xenial
9−#addons:
10−# apt:
11−# sources:
12−# - ppa:hvr/ghc
13−# packages:
14−# - libgirepository1.0-dev
15−# - libwebkit2gtk-4.0-dev,phantomjs
16−
17−cache:
18− directories:
19− - $HOME/.cabal
20− - $HOME/.ghc
21−
22−matrix:
4+jobs:
235 include:
24−# - env: CABALVER=2.0 GHCVER=8.2.2
25−# addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7,libgirepository1.0-dev,libwebkit2gtk-4.0-dev,phantomjs], sources: [hvr-ghc]}}
26− - env: CABALVER=2.2 GHCVER=8.4.4
27− addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.4,happy-1.19.5,alex-3.1.7,libgirepository1.0-dev,libwebkit2gtk-4.0-dev,phantomjs], sources: [hvr-ghc]}}
28−# - env: CABALVER=2.4 GHCVER=8.6.3
29−# addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.3,happy-1.19.5,alex-3.1.7,libgirepository1.0-dev,libwebkit2gtk-4.0-dev,phantomjs], sources: [hvr-ghc]}}
30−# - env: CABALVER=head GHCVER=head
31−# addons: {apt: {packages: [cabal-install-head,ghc-head,happy-1.19.5,alex-3.1.7,libgirepository1.0-dev,libwebkit2gtk-4.0-dev,phantomjs], sources: [hvr-ghc]}}
32− allow_failures:
33− - env: CABALVER=head GHCVER=head
34−
35−before_install:
36− - export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH
6+ - stage: Build
7+ env: OS=linux GHCVER=ghc865
8+ - stage: Build
9+ env: OS=linux GHCVER=ghc881
10+ - env: OS=macos GHCVER=ghc865
11+ os: osx
12+ # Fix OSX, see https://travis-ci.community/t/cannot-use-nix-support-on-osx/2927
13+ language: generic
14+ before_install:
15+ - curl https://nixos.org/nix/install | sh
16+ - source /Users/travis/.nix-profile/etc/profile.d/nix.sh
17+ - env: OS=macos GHCVER=ghc881
18+ os: osx
19+ # Fix OSX, see https://travis-ci.community/t/cannot-use-nix-support-on-osx/2927
20+ language: generic
21+ before_install:
22+ - curl https://nixos.org/nix/install | sh
23+ - source /Users/travis/.nix-profile/etc/profile.d/nix.sh
3724
3825install:
39− - cabal --version
40− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
41− - cabal update
26+- sudo mkdir -p /etc/nix
27+- echo "substituters = https://cache.nixos.org https://hydra.iohk.io" | sudo tee -a /etc/nix/nix.conf > /dev/null
28+- echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" | sudo tee -a /etc/nix/nix.conf > /dev/null
4229
4330script:
44− ./travis/build.sh
31+- nix-build --argstr haskellCompiler $GHCVER -A hsPkgs.jsaddle.components.library
32+- nix-build --argstr haskellCompiler $GHCVER -A hsPkgs.jsaddle-warp.components.library
33+- nix-build --argstr haskellCompiler $GHCVER -A hsPkgs.jsaddle-clib.components.library
34+# TODO try to find how to get working webkitgtk with nix on macOS
35+- |
36+ if [ "$OS" != "macos" ]; then
37+ nix-build --argstr haskellCompiler $GHCVER -A hsPkgs.jsaddle-webkit2gtk.components.library
38+ fi
4539
4640notifications:
4741 irc:
48− channels: "irc.freenode.net#ghcjs"
49− skip_join: true
50− email: true
42+ channels: "irc.freenode.net#gtk2hs"
43+ email: true