comparison .travis.yml @ 0:2cf249471370

convert mercurial for git
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 08 May 2018 16:09:12 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2cf249471370
1 language: "perl"
2 os:
3 - linux
4 - osx
5 perl:
6 - "5.10"
7 before_install:
8 |-
9 echo "Begin ‘before_install’ section of .travis.yml"
10 # If we aren't on MoarVM/MoarVM or it's a pull request we can't decode the deploy key
11 if [ ! "$TRAVIS_REPO_SLUG" = 'MoarVM/MoarVM' ] || [ ! "$TRAVIS_PULL_REQUEST" = "false" ]; then
12 export COVERAGE=''; export MOCK_COVERAGE=1;
13 fi
14 if [ "$COVERAGE" ]; then
15 # Put github's into known_hosts /* may not need this */
16 printf "github.com,192.30.255.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n" >> ~/.ssh/known_hosts
17 # Decrypt deploy_key using Travis *magic* variables
18 eval 'openssl aes-256-cbc -K $encrypted_b77ce3a1cc5c_key -iv $encrypted_b77ce3a1cc5c_iv -in ./tools/gh-pages-deploy_key.enc -out deploy_key -d'
19 # Now that it's decrypted, clear the keys so it can't leak
20 export encrypted_b77ce3a1cc5c_key=""
21 export encrypted_b77ce3a1cc5c_iv=""
22 chmod 600 deploy_key # Change perms or ssh-agent will get mad at us
23 eval $(ssh-agent -s) # Run the code that ssh-agent -s gives back to setup ENV
24 # Decrypted key has no password, but it will still ask for one. Use expect program to interact with it non-interactively
25 expect -c 'spawn ssh-add ./deploy_key; expect "enter passphrase for"; send "\n"; expect "Identity added:"; interact'
26 fi
27 install:
28 - echo "Begin ‘install’ section of .travis.yml"
29 addons:
30 apt:
31 sources:
32 - sourceline: 'ppa:ubuntu-toolchain-r/test'
33 - sourceline: 'deb http://apt.llvm.org/precise/ llvm-toolchain-precise main'
34 packages:
35 - clang-5.0
36 - llvm-5.0
37 - expect
38 - libffi-dev
39 - gdb
40
41 before_script:
42 - echo "Begin ‘before_script’ section of .travis.yml"
43 - uname -a
44 - gcc --version
45 - clang --version
46 # Fun function that finds files in /usr/bin naming as foo-4.2 for example
47 # and returns the highest version. Travis CI installs newer versions under
48 # their own verison numbers.
49 - find_latest_version () { ls /usr/bin | grep -Ee "^$1(\-[0-9.]+)?$" | sort -r | head -n 1; }
50 # MacOS's readlink doesn't support -f, so use our own solution
51 - resolve_folder () { O="$(pwd -P)"; D="$(dirname $1)"; T="$(basename $1)"; cd -- "$D" && cd -- "$T" && pwd -P; cd -- "$O" > /dev/null; }
52 - find_latest_version llvm-profdata
53 - find_latest_version llvm-cov
54 # Find the latest clang that is on the system
55 - CLANG_LATEST=$(find_latest_version clang)
56 - if [ ! "$CLANG_LATEST" = 'clang' ]; then eval "$CLANG_LATEST --version"; fi
57 - if [ "$USE_CLANG_LATEST" ]; then echo "Using $CLANG_LATEST due to build setting"; CC="$CLANG_LATEST"; fi
58 # Generic debug and optimization settings that are used for all builds except
59 # the coverage builds
60 - MVM_debug="--debug"; MVM_optimize="--optimize"
61 - if [ "$COVERAGE" ] || [ "$MOCK_COVERAGE" ]; then MVM_debug="--debug=3"; MVM_optimize="--optimize=0"; fi
62 - if [ "$TRAVIS_OS_NAME" == "linux" ] ; then sudo apt-get update -qq || sudo apt-get update -qq ; fi
63 - git fetch --unshallow
64 - git clone --depth 1 git://github.com/perl6/nqp
65
66 script:
67 - echo "Begin ‘script’ section of .travis.yml"
68 # Enable coredumps
69 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then ulimit -c unlimited; fi
70 - export MOAR_PREFIX="/tmp/moar"; export MOAR_FOLDER="$TRAVIS_BUILD_DIR"
71 - export NQP_FOLDER="$(resolve_folder ./nqp)"
72 # Set location for core dumps
73 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo bash -c "echo \"${MOAR_PREFIX}/core.%p.%E\" > /proc/sys/kernel/core_pattern"; sudo cat /proc/sys/kernel/core_pattern; fi
74 - echo "perl Configure.pl --prefix=$MOAR_PREFIX $MVM_OPTIONS --cc=\"$CC\" $MVM_debug $MVM_optimize;"
75 - perl Configure.pl --prefix=$MOAR_PREFIX $MVM_OPTIONS --cc="$CC" $MVM_debug $MVM_optimize;
76 - make -j2 install;
77 - cd -- "$NQP_FOLDER";
78 - echo "perl Configure.pl --prefix=$MOAR_PREFIX --backends=moar;"
79 - perl Configure.pl --prefix=$MOAR_PREFIX --backends=moar;
80 - make
81 - make test;
82 - cd -- "$MOAR_FOLDER"
83 - if [ "$COVERAGE" ]; then git clone --depth 1 'https://github.com/samcv/MoarVM-cover.git' && cp -v MoarVM-cover/html-cover.sh . && cp -v MoarVM-cover/nqp-profile ./nqp/ && cp -v MoarVM-cover/merge-profraw.sh ./nqp/ && ./html-cover.sh 2; fi
84
85 after_success:
86 - echo "Begin ‘after_success’ section of .travis.yml"
87 - cd "$TRAVIS_BUILD_DIR"
88 - if [ "$COVERAGE" ]; then ./tools/update-gh-pages.sh; fi
89
90 after_failure:
91 # On failure, dump all ENV vars, in case we need to look at them (doesn't print if our secrets are defined)
92 - if [ ! "$encrypted_b77ce3a1cc5c_key" ] && [ ! "$encrypted_b77ce3a1cc5c_iv" ]; then printenv; fi
93 # If we have any coredumps, print out the traces with gdb
94 - for i in $(find "${MOAR_PREFIX}" -maxdepth 1 -name 'core*' -print); do gdb "${MOAR_PREFIX}/bin/moar" "${i}" -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
95
96 branches:
97 only:
98 - master
99 - coverage
100 - /smoke-me/
101
102 notifications:
103 irc:
104 branches:
105 except:
106 - gh-pages
107 channels:
108 - "irc.freenode.net#moarvm"
109 on_success: change
110 on_failure: always
111
112 template:
113 - "MoarVM build %{result}. %{author} '%{commit_message}'"
114 - "%{build_url} %{compare_url}"
115
116 env:
117 matrix:
118 - MVM_OPTIONS="--no-jit" CC='gcc'
119 - MVM_OPTIONS="" CC='gcc'
120 - MVM_OPTIONS="--no-jit" CC='clang'
121 - MVM_OPTIONS="" CC='clang'
122 - MVM_OPTIONS="--has-libffi --no-jit" CC='gcc'
123 - MVM_OPTIONS="--has-libffi" CC='gcc'
124 - MVM_OPTIONS="--has-libffi --no-jit" CC='clang'
125 - MVM_OPTIONS="--has-libffi" CC='clang'
126 - MVM_OPTIONS="--compiler=clang --coverage --optimize=0 --debug=3" COVERAGE=1 USE_CLANG_LATEST=1 CC='clang'
127
128 matrix:
129 exclude:
130 - os: osx
131 env: MVM_OPTIONS="--has-libffi --no-jit" CC='gcc'
132 - os: osx
133 env: MVM_OPTIONS="--has-libffi" CC='gcc'
134 # - os: osx
135 # env: MVM_OPTIONS="--no-jit" CC='gcc'
136 # - os: osx
137 # env: MVM_OPTIONS="" CC='gcc'
138 - os: osx
139 env: MVM_OPTIONS="--has-libffi --no-jit" CC='clang'
140 - os: osx
141 env: MVM_OPTIONS="--has-libffi" CC='clang'
142 - os: osx
143 env: MVM_OPTIONS="--compiler=clang --coverage --optimize=0 --debug=3" COVERAGE=1 USE_CLANG_LATEST=1 CC='clang'
144 allow_failures:
145 - os: linux
146 env: MVM_OPTIONS="--compiler=clang --coverage --optimize=0 --debug=3" COVERAGE=1 USE_CLANG_LATEST=1 CC='clang'