* ci: check runtime symbol policy on travis and Appveyor
* tune check-symbol-names:
** ignore all local symbol
** ignore Caml_ prefix
** ignore x86: pic-related symbols
** windows: ignore debugging, unicode and wmain symbols
Travis already added the required option for old versions of GNU awk,
but this was still a problem on current Ubuntu systems if gawk is not
installed - mawk (the default) does not support them.
Currently our CI machine on FreeBSD fails to build with the following
error message:
```
bytecomp/generate_runtimedef.sh runtime/caml/fail.h runtime/primitives > bytecomp/runtimedef.ml
/bin/sh: bytecomp/generate_runtimedef.sh: not found
```
This PR converts all the files with a `/bin/bash` shebang to
`/usr/bin/env bash`. Some files use `/bin/sh` instead, and they are
unchanged. It may be the case that some 'bash' files could in fact run
using 'sh', but checking this requires more work and I decided to
follow the original author's intent.
(Personally I like using bash explicitly as it gives a consistent
programming environment that I can easily test on my machine; but this
should not be at the expense of portability.)
There seem to be occasions when rebuilding PRs where the TRAVIS_COMMIT
variable (which should be the SHA of the merge commit) is out-of-date.
When this happens, and the commit referred to does not exist, update
TRAVIS_COMMIT to be FETCH_HEAD as retrieved from GitHub instead.
Travis was incorrectly reading the files to run through check-typo from
just the tip commit of the PR branch, instead of the entire commit
range (wrong parameter number).
When checking an entire branch, check-typo was reading files from the
tip of the pull request branch, which is only correct if the branch is
based on trunk - it should read from the merge commit instead.
This affects branches based on older trunk before check-typo compliance
was enforced, since it can cause now-corrected check-typo violations to
re-appear.
TRAVIS_COMMIT_RANGE is not correct unless a PR is based on the tip of
the target branch - it will include commits being merged from the target
branch as well.
The check-typo, changes and tests builds now use
$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA which gives the precise range
of commits included in the pull request (i.e. the author's) only.