Add comments.
[ghc.git] / .travis.yml
index 5e169fa..9547914 100644 (file)
@@ -1,32 +1,82 @@
 sudo: false
 
 matrix:
-  include:
-    - env: CABALVER=1.22 GHCVER=7.10.3
-      addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,zlib1g-dev,terminfo-dev],  sources: [hvr-ghc]}}
+    include:
+        - os: linux
+          env: CABALVER=1.22 GHCVER=7.10.3 TARGET=
+          addons:
+              apt:
+                  packages:
+                      - ghc-7.10.3
+                      - alex-3.1.4
+                      - happy-1.19.5
+                      - cabal-install-1.22
+                      - zlib1g-dev
+                  sources: hvr-ghc
+          before_install:
+              - PATH="/opt/ghc/$GHCVER/bin:$PATH"
+              - PATH="/opt/cabal/$CABALVER/bin:$PATH"
+              - PATH="$HOME/.cabal/bin:$PATH"
+              - export PATH
+              - cabal update
 
-before_install:
+        - os: osx
+          env: TARGET=utils/ghc-pkg/stage1/build/tmp/ghc-pkg
+          before_install:
+              - brew update
+              - brew install ghc cabal-install
+              - cabal update
+              - cabal install alex happy
+              - PATH="$HOME/.cabal/bin:$PATH"
+              - export PATH
 
-    - PATH="$HOME/.cabal/bin:$PATH"
-    - PATH="/opt/ghc/$GHCVER/bin:$PATH"
-    - PATH="/opt/cabal/$CABALVER/bin:$PATH"
-    - export PATH
+install:
+    - env
+    - ghc --version
+    - cabal --version
+    - alex --version
+    - happy --version
 
-    - .travis/print-env.sh
+    - git config --global url."git://github.com/ghc/packages-".insteadOf     git://github.com/ghc/packages/
+    - git config --global url."http://github.com/ghc/packages-".insteadOf    http://github.com/ghc/packages/
+    - git config --global url."https://github.com/ghc/packages-".insteadOf   https://github.com/ghc/packages/
+    - git config --global url."ssh://git@github.com/ghc/packages-".insteadOf ssh://git@github.com/ghc/packages/
+    - git config --global url."git@github.com:/ghc/packages-".insteadOf      git@github.com:/ghc/packages/
+    - travis_retry git clone https://github.com/ghc/ghc --recurse-submodules --depth 1
 
-install:
-    - .travis/install-cabal-happy-alex.sh
-    - .travis/install-ghc.sh
-    - .travis/install-ghc-shake.sh
+    # Travis clones the project into ".", but we need it as a child directory
+    # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
+    # ".git"  directory into the appropriate location, and perform a hard reset
+    # in order to regenerate the GHC-Shake files.
+    - mkdir ghc/shake-build
+    - mv .git ghc/shake-build
+    - ( cd ghc/shake-build && git reset --hard HEAD )
+
+    - ( cd ghc/shake-build && cabal install --only-dependencies )
+    - ( cd ghc/shake-build && cabal configure )
+
+    - ( cd ghc && ./boot )
+    - ( cd ghc && ./configure )
+    - cat ghc/shake-build/cfg/system.config
 
 script:
-    - .travis/run-ghc-shake.sh
+    - ( cd ghc/shake-build && cabal haddock --internal )
+    - ./ghc/shake-build/build.sh selftest
+    - ./ghc/shake-build/build.sh -j --no-progress --profile=- --flavour=quick $TARGET
 
 cache:
     directories:
         - $HOME/.cabal
-        # - ghc/shake-build/.cabal-sandbox
-        # - ghc/shake-build/cabal.sandbox.config
+        - $HOME/.ghc
 
-# before_cache:
-#     - rm -rf ghc/shake-build
+notifications:
+    irc:
+        on_success: change # always/never/change
+        on_failure: always
+        channels:
+            - "chat.freenode.net#shaking-up-ghc"
+        template:
+            - "#%{build_number} finished in %{duration}. %{message}"
+            - "Repo: %{repository_slug}, branch: %{branch}"
+            - "%{author}: %{commit_subject}"
+            - "Build details: %{build_url}"