Buildscr.cv 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # -*- sh -*-
  2. # Build script to scan PuTTY with the downloadable Coverity scanner
  3. # and generate a tar file to upload to their open-source scanning
  4. # service.
  5. module putty
  6. # Scan the Unix build, on a 64-bit system to differentiate as much as
  7. # possible from the other scan of the cross-platform files.
  8. delegate covscan64
  9. in putty do mkdir linbuild
  10. in putty/linbuild do cmake ..
  11. in putty/linbuild do cov-build --dir ../cov-int make -j$(nproc) VERBOSE=1
  12. in putty do tar czvf cov-int.tar.gz cov-int
  13. return putty/cov-int.tar.gz
  14. enddelegate
  15. # Scan the Windows build, by means of building with Winelib (since as
  16. # of 2013-07-22, the Coverity Scan website doesn't offer a 32-bit
  17. # Windows scanner for download).
  18. delegate covscan32wine
  19. in putty do tar xzvf cov-int.tar.gz
  20. in putty do mkdir winbuild
  21. in putty/winbuild do cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-winegcc.cmake
  22. in putty/winbuild do cov-build --dir ../cov-int make -j$(nproc) VERBOSE=1
  23. in putty do tar czvf cov-int.tar.gz cov-int
  24. return putty/cov-int.tar.gz
  25. enddelegate
  26. # Provide the revision number as one of the build outputs, to make it
  27. # easy to construct a curl upload command which will annotate it
  28. # appropriately when uploaded.
  29. in putty do echo $(vcsfullid) > revision.txt
  30. deliver putty/revision.txt $@
  31. deliver putty/cov-int.tar.gz $@