ci: travis: osx: switch to newer macos image and brew addon for packages
[platform/upstream/efl.git] / .travis.yml
1 language: c
2 cache:
3   directories:
4     - $HOME/cachedir
5     - $HOME/.ccache
6 sudo: required
7 dist: trusty
8
9 osx_image: xcode10.2
10
11 addons:
12   homebrew:
13     packages:
14       - gettext
15       - check
16       - bullet
17       - dbus
18       - fontconfig
19       - freetype
20       - fribidi
21       - gst-plugins-good
22       - gstreamer
23       - luajit
24       - openssl
25       - webp
26       - libsndfile
27       - glib
28       - libspectre
29       - libraw
30       - librsvg
31       - poppler
32       - lz4
33       - pulseaudio
34       - ccache
35       - ninja
36       - python3
37       - libffi
38
39 env:
40   global:
41     - EIO_MONITOR_POLL=1
42     - CC="ccache gcc"
43     - CXX="ccache g++"
44
45 jobs:
46   include:
47     - os: osx
48     - os: linux
49       env: DISTRO=Fedora30-mingw CI_BUILD_TYPE=mingw
50     - os: linux
51       env: DISTRO=Fedora30 CI_BUILD_TYPE=options-enabled
52     - os: linux
53       env: DISTRO=Fedora30 CI_BUILD_TYPE=options-disabled
54     - os: linux
55       env: DISTRO=Fedora29 CI_BUILD_TYPE=wayland
56     - os: linux
57       env: DISTRO=Fedora29 CI_BUILD_TYPE=default
58     - os: linux
59       if: type = cron
60       env: DISTRO=Fedora29 CI_BUILD_TYPE=release-ready
61     - os: linux
62       if: type = cron
63       env: DISTRO=Ubuntu1804
64     - os: linux
65       if: type = cron
66       env: DISTRO=Ubuntu1904
67     - os: linux
68       if: type = cron
69       env: DISTRO=Debian96
70
71 services:
72   - docker
73
74 before_install:
75   - |
76       if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
77         rm -rf $HOME/Library/Caches/Homebrew
78         rm -rf $HOME/cachedir/Homebrew/Homebrew
79         mv $HOME/cachedir/Homebrew $HOME/Library/Caches/Homebrew
80         pip3 install meson
81       fi
82
83 before_script:
84   - |
85       if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
86         docker pull stefanschmidt1/ci-support-files:$DISTRO
87       fi
88   - |
89       if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
90         docker version
91         docker run --cidfile $HOME/cid -t -d -v `pwd`:/src -v $HOME/.ccache:/root/.ccache -w /src stefanschmidt1/ci-support-files:$DISTRO bash
92         cp $HOME/cachedir/config.cache . || true
93       fi
94
95   - .ci/ci-ccache-stats.sh
96   - |
97        if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
98          cp $HOME/cachedir/config.cache . || true
99        fi
100
101 script:
102   - .ci/ci-configure.sh "$CI_BUILD_TYPE"
103   - .ci/ci-setup-ccache.sh "$CI_BUILD_TYPE"
104   - .ci/ci-make.sh "$CI_BUILD_TYPE"
105   - |
106       if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_BUILD_TYPE" == "" ]]; then
107           .ci/ci-make-benchmark.sh "$CI_BUILD_TYPE"
108       fi
109   #- .ci/ci-make-install.sh "$CI_BUILD_TYPE"
110   - .ci/ci-make-check.sh "$CI_BUILD_TYPE"
111   - .ci/ci-make-distcheck.sh "$CI_BUILD_TYPE"
112   #- |
113       #if [[ "$DISTRO" == "" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]] ; then
114         #true
115       #elif [[ "$CI_BUILD_TYPE" != "release-ready" ]] ; then
116         #docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-efl-app.sh
117       #fi
118 before_cache:
119   - .ci/ci-ccache-stats.sh
120   - |
121        mkdir -p $HOME/cachedir
122        if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
123          sudo chown travis:travis $HOME/.ccache
124          mkdir -p $HOME/cachedir/
125          sudo cp config.cache $HOME/cachedir/
126          sudo chown travis:travis $HOME/cachedir/config.cache
127          sudo chown travis:travis $HOME/autom4te.cache
128        else
129          cp config.cache $HOME/cachedir
130          mv $HOME/Library/Caches/Homebrew $HOME/cachedir/Homebrew
131        fi
132
133 notifications:
134   irc:
135     channels:
136       - "chat.freenode.net#edevelop"
137     on_success: change
138     on_failure: always
139     on_cancel: never
140     template:
141       - "TravisCI build %{build_number} in branch %{branch}: %{result} - %{message} (%{elapsed_time})"
142       - "Commit: %{commit_subject} (%{commit}) from %{author}"
143       - "Change view : %{compare_url}"
144       - "Build details : %{build_url}"