rapidjson/.travis.yml

70 lines
3.5 KiB
YAML
Raw Normal View History

language: cpp
compiler:
- clang
- gcc
env:
2014-07-08 02:54:35 +08:00
matrix:
- config=debug64 config_suffix=debug_x64_gmake
- config=release64 config_suffix=release_x64_gmake
global:
secure: HAEPpA7IxUd+X4X5VcUpSxWf3hDRDNgNpKQrRSX/X/nS0/h5PAwES7fmM6WJAsoEmczCp3OOArzyOON+KLbISvJLnHvnexd+rtyVjU2zOOVTEgzJRdAPHwocqVx5FOxtlKgbDISE6dl3H5aUCycf962jfquhKosi11rbxwcscmc=
before_install:
- sudo add-apt-repository -y ppa:codegear/release
- sudo apt-get update -qq
2014-07-07 23:26:40 +08:00
- sudo apt-get install -y premake4 valgrind
install: true
before_script:
- cd build
- premake4 'gmake'
- cd "${TRAVIS_BUILD_DIR}"
script:
2014-07-08 03:45:14 +08:00
- make -C build/gmake -f test.make
2014-07-08 08:33:14 +08:00
- make -C build/gmake -f example.make
- cd bin
2014-07-08 03:45:14 +08:00
- ./unittest_${config_suffix}
- valgrind --leak-check=full --error-exitcode=1 ./unittest_${config_suffix}
- if [ "$config" = "release64" ]; then ./perftest_${config_suffix}; fi
2014-07-07 22:26:44 +08:00
2014-07-08 02:12:12 +08:00
after_success:
2014-07-08 02:54:35 +08:00
# Build latest doxygen from source
2014-07-08 09:04:09 +08:00
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd /tmp; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then git clone https://github.com/doxygen/doxygen.git; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd doxygen; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then ./configure; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then make; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then make distclean; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then git pull; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then ./configure; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then make; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then sudo make install; fi
# - if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd "${TRAVIS_BUILD_DIR}"; fi
# Install doxygen binary distribution
2014-07-08 02:06:22 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd /tmp; fi
2014-07-08 09:04:09 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then curl http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.7.linux.bin.tar.gz; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then tar -xvf doxygen-1.8.7.linux.bin.tar.gz; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd doxygen-1.8.7; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then sudo install -m 755 doxygen-1.8.7/bin/doxygen /usr/bin; fi
2014-07-08 02:54:35 +08:00
# Run doxygen
2014-07-08 02:06:22 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then doxygen build/Doxyfile; fi
2014-07-08 02:54:35 +08:00
# Push to Github Pages
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git config --global user.name "${GIT_NAME}"; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git config --global user.email ${GIT_EMAIL}; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then mkdir build/doc; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd build/doc; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git clone https://github.com/miloyip/rapidjson; fi
2014-07-08 03:18:57 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then cd rapidjson; fi
2014-07-08 02:54:35 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git checkout gh-pages; fi
2014-07-08 03:18:57 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then cp -r ../../../doc/html/* .; fi
2014-07-08 02:54:35 +08:00
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git add --all; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git commit -m "Automatic doxygen build"; fi
- if [ "$config" = "release64" -a "$CC" = "clang" ]; then git push https://${GH_TOKEN}@github.com/miloyip/rapidjson gh-pages; fi