ci: mingw build target to cross compile EFL for Windows
[platform/upstream/efl.git] / .travis.yml
1 language: c
2 cache:
3   directories:
4     - $HOME/cachedir
5     - $HOME/.ccache
6     - $HOME/autom4te.cache
7 sudo: required
8 dist: trusty
9
10 os:
11   - linux
12   - osx
13
14 env:
15   global:
16     - MAKEFLAGS="-j5 -rR"
17     - EIO_MONITOR_POLL=1
18     - CC="ccache gcc"
19     - CXX="ccache g++"
20
21 jobs:
22   include:
23     - env:
24       - os: linux
25       - DISTRO=Fedora28
26       - CI_BUILD_TYPE=wayland
27     - env:
28       - os: linux
29       - DISTRO=Fedora28
30       - CI_BUILD_TYPE=misc
31     - env:
32       - os: linux
33       - DISTRO=Fedora28
34       - CI_BUILD_TYPE=misc-disabled
35     - env:
36       - os: linux
37       - DISTRO=Fedora28
38       - CI_BUILD_TYPE=mingw
39     - if: type = cron
40       env:
41         - os: linux
42         - DISTRO=Ubuntu1804
43     - if: type = cron
44       env:
45         - os: linux
46         - DISTRO=Fedora28
47         - CI_BUILD_TYPE=release-ready
48     - if: type = cron
49       env:
50         - os: linux
51         - DISTRO=Debian91
52     - if: type = cron
53       env:
54         - os: linux
55         - DISTRO=Archlinux
56   exclude:
57     - os: linux
58
59 services:
60   - docker
61
62 before_install:
63   - |
64       if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
65         rm -rf $HOME/Library/Caches/Homebrew
66         rm -rf $HOME/cachedir/Homebrew/Homebrew
67         mv $HOME/cachedir/Homebrew $HOME/Library/Caches/Homebrew
68         .ci/ci-osx-deps.sh
69       fi
70
71 before_script:
72   - |
73       if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
74         docker pull stefanschmidt1/ci-support-files:$DISTRO
75       fi
76   - |
77       if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
78         docker version
79         docker run --cidfile $HOME/cid -t -d -v `pwd`:/src -v $HOME/.ccache:/root/.ccache -w /src stefanschmidt1/ci-support-files:$DISTRO bash
80         cp $HOME/cachedir/config.cache . || true
81       fi
82
83   - .ci/ci-ccache-stats.sh
84   - |
85        if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
86          cp $HOME/cachedir/config.cache . || true
87        fi
88
89
90 script:
91   - .ci/ci-configure.sh "$CI_BUILD_TYPE"
92   - .ci/ci-setup-ccache.sh "$CI_BUILD_TYPE"
93   - .ci/ci-make.sh "$CI_BUILD_TYPE"
94   - .ci/ci-make-checkbuild.sh "$CI_BUILD_TYPE"
95   #- .ci/ci-make-examples.sh "$CI_BUILD_TYPE"
96   - |
97       if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_BUILD_TYPE" == "" ]]; then
98           .ci/ci-make-benchmark.sh "$CI_BUILD_TYPE"
99       fi
100   #- .ci/ci-make-install.sh "$CI_BUILD_TYPE"
101   - .ci/ci-make-check.sh "$CI_BUILD_TYPE"
102   - .ci/ci-make-distcheck.sh "$CI_BUILD_TYPE"
103   #- |
104       #if [[ "$DISTRO" == "" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]] ; then
105         #true
106       #elif [[ "$CI_BUILD_TYPE" != "release-ready" ]] ; then
107         #docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-efl-app.sh
108       #fi
109 before_cache:
110   - .ci/ci-ccache-stats.sh
111   - |
112        mkdir -p $HOME/cachedir
113        if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
114          sudo chown travis:travis $HOME/.ccache
115          mkdir -p $HOME/cachedir/
116          sudo cp config.cache $HOME/cachedir/
117          sudo chown travis:travis $HOME/cachedir/config.cache
118          sudo chown travis:travis $HOME/autom4te.cache
119        else
120          cp config.cache $HOME/cachedir
121          mv $HOME/Library/Caches/Homebrew $HOME/cachedir/Homebrew
122        fi
123
124 after_success:
125   - |
126       if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
127         docker login -u stefanschmidt1 -p "$DOCKER_PASSWORD"
128         docker tag stefanschmidt1/ci-support-files:$DISTRO stefanschmidt1/ci-support-files:$DISTRO-$TRAVIS_BUILD_NUMBER
129         docker push stefanschmidt1/ci-support-files:$DISTRO
130         docker push stefanschmidt1/ci-support-files:$DISTRO-$TRAVIS_BUILD_NUMBER
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}"