Add Travis CI configuration to build and test Wren on both Linux and macOS, for both 32-bit and 64-bit architectures, with and without WREN_NAN_TAGGING defined. Introduce `ci_32` and `ci_64` make targets that build debug/release and C/C++ variants, then run the test suite against each binary using a suffix parameter. Update `util/test.py` with argparse to accept `--suffix` and `suite` arguments, increase test timeout from 2 to 5 seconds, and fix handle leak in `test/api/slots.c` by moving `wrenReleaseHandle` after the conditional block. Replace `fpclassify`/`signbit` checks for infinity/nan in `wrenNumToString` to avoid GCC overflow warnings on 32-bit, double-cast `double` to `uint32_t` in `num_bitwiseNot` to prevent undefined behavior, and relax floating-point comparisons in `test/core/number/sin.wren` and `cos.wren` to use absolute tolerance. Comment out hex literals larger than `0x1000000` in `example/syntax.wren` since they exceed 32-bit range, and bump libuv from v1.8.0 to v1.10.0 for 32-bit build fixes.
20 lines
454 B
YAML
20 lines
454 B
YAML
language: c
|
|
os:
|
|
- osx
|
|
- linux
|
|
compiler:
|
|
- gcc
|
|
- clang
|
|
env:
|
|
- WREN_OPTIONS="" CI_ARCHS="ci_32 ci_64"
|
|
- WREN_OPTIONS="-DWREN_NAN_TAGGING=0" CI_ARCHS="ci_64"
|
|
# Travis VMs are 64-bit but we compile both for 32 and 64 bit. To enable the
|
|
# 32-bit builds to work, we need gcc-multilib.
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- gcc-multilib
|
|
- g++-multilib
|
|
sudo: false # Enable container-based builds.
|
|
script: make WREN_CFLAGS=${WREN_OPTIONS} ${CI_ARCHS}
|