Rocket fairing for automatic CSRF protection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
933 B

  1. language: rust
  2. cache: cargo
  3. dist: trusty
  4. sudo: true
  5. os:
  6. - linux
  7. rust:
  8. - nightly
  9. before_install:
  10. - sudo apt-get update
  11. addons:
  12. apt:
  13. packages:
  14. - libcurl4-openssl-dev
  15. - libelf-dev
  16. - libdw-dev
  17. - cmake
  18. - gcc
  19. - binutils-dev
  20. script:
  21. - cargo build
  22. - cargo test
  23. before_script:
  24. - export PATH=$PATH:~/.cargo/bin
  25. after_success:
  26. - |
  27. wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
  28. tar xzf master.tar.gz &&
  29. cd kcov-master &&
  30. mkdir build &&
  31. cd build &&
  32. cmake .. &&
  33. make &&
  34. sudo make install &&
  35. cd ../.. &&
  36. rm -rf kcov-master &&
  37. for file in target/debug/rocket_csrf-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
  38. bash <(curl -s https://codecov.io/bash) &&
  39. echo "Uploaded code coverage"