summaryrefslogtreecommitdiff
path: root/circle.yml
blob: e379c4285c399be1210d99e1447c51b337ea3f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
machine:
  environment:
    CMAKE_FILE: ../Toolchain/arm-eabi.cmake
dependencies:
  cache_directories:
    - ~/.android
    - ~/android
    - "~/assets/"
    - ~/tomtom_assets
  pre:
    - "[ -d ~/assets ] || mkdir ~/assets"
    - "[ -d ~/android ] || mkdir ~/android"
    - wget -c -O ~/assets/cov-analysis-linux64-7.6.0.tar.gz http://sd-55475.dedibox.fr/cov-analysis-linux64-7.6.0.tar.gz
    - sudo apt-get update
    - sudo apt-get install cmake
    - sudo apt-get install libpng12-dev
    - sudo apt-get install librsvg2-bin 
    - sudo apt-get install libfreetype6-dev
    - sudo apt-get install libdbus-glib-1-dev
    - sudo apt-get install g++
    - bash ci/update_version.sh prepare
    - bash ci/build_linux.sh
    - sed -i '/INTEGER/d' bin/po/navit.pot
    - cp bin/po/navit.pot $CIRCLE_ARTIFACTS/
    - "[ $CIRCLE_PROJECT_USERNAME != navit-gps ] || curl \"https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload\" -H \"$lp_cookie\" -H \"Referer: https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload\" -F file=@bin/po/navit.pot | grep title"
# Android build    
    - sudo apt-get install gettext
    - sudo apt-get install libsaxonb-java
# for aapt
    - sudo apt-get install lib32stdc++6
    - sudo apt-get install lib32z1
    - bash ci/build_android.sh
#    - bash ci/build_android_x86.sh
# Tomtom minimal build
    - bash ci/build_tomtom_minimal.sh
# Windows build
    - sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
    - sudo apt-get install default-jdk nsis
# for sys/select.h
#    - sudo apt-get install -y libc6-dev
    - mkdir win32
    - cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ && make && make package:
        pwd: win32/
    - cp win32/*.exe $CIRCLE_ARTIFACTS/
# For python testing with junit reporting
    - sudo pip install junit-xml
#
    - ls -la $CIRCLE_ARTIFACTS
test:
  post:
    - sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml:
        pwd: bin/navit/
    - sed -i -e 's@name="Demo" profilename="car" enabled="no" active="yes"@name="Demo" profilename="car" enabled="yes" active="yes" follow="1" refresh="1"@' navit.xml:
        pwd: bin/navit/
    - sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml:
        pwd: bin/navit/
    - sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml:
        pwd: bin/navit/
    - ./navit:
        pwd: bin/navit/
        background: true
    - sleep 5
    - import -window root $CIRCLE_ARTIFACTS/default.png
    - python ci/dbus_tests.py $CIRCLE_TEST_REPORTS/
    - dbus-send  --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.quit
deployment:
  merge_into_master:
    branch: trunk
    owner: navit-gps
    commands:
      - bash ci/update_version.sh push
      - git push origin $CIRCLE_SHA1:refs/heads/master
  merge_translations:
    branch: /i18n.*/
    owner: navit-gps
    commands:
      - bash ci/submit_i18n_pr.sh
notify:
  webhooks:
    - url: http://62.210.125.30:8000/