My build of nnn with minor changes
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

118 wiersze
3.7 KiB

  1. version: 2
  2. jobs:
  3. compile:
  4. docker:
  5. - image: ubuntu:18.04
  6. working_directory: ~/nnn
  7. environment:
  8. CI_FORCE_TEST: 1
  9. steps:
  10. - run:
  11. command: |
  12. apt update -qq
  13. apt install -y --no-install-recommends software-properties-common wget gpg-agent shellcheck
  14. apt-add-repository -y ppa:jonathonf/gcc-9.1
  15. wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
  16. apt-add-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
  17. apt update -qq
  18. apt install -y --no-install-recommends git gcc gcc-8 gcc-9 clang clang-8 clang-tidy-8 make pkg-config libncursesw5-dev libreadline-dev
  19. - checkout
  20. - run:
  21. command: |
  22. export CFLAGS=-Werror
  23. make clean
  24. echo
  25. echo "########## gcc ##########"
  26. CC=gcc make strip
  27. ls -l nnn
  28. make clean
  29. echo
  30. echo "########## gcc-8 ##########"
  31. CC=gcc-8 make strip
  32. ls -l nnn
  33. make clean
  34. echo
  35. echo "########## gcc-9 ##########"
  36. CC=gcc-9 make strip
  37. ls -l nnn
  38. make clean
  39. echo
  40. echo "########## clang ##########"
  41. CC=clang make strip
  42. ls -l nnn
  43. make clean
  44. echo
  45. echo "########## clang-8 ##########"
  46. CC=clang-8 make strip
  47. ls -l nnn
  48. make clean
  49. echo
  50. echo "########## clang-tidy-8 ##########"
  51. clang-tidy-8 src/* -- -I/usr/include -I/usr/include/ncursesw
  52. echo "########## checllcheck ##########"
  53. find plugins/ -type f -not -name "*.md" -exec shellcheck -e SC1090 {} +
  54. package-and-publish:
  55. machine: true
  56. working_directory: ~/nnn
  57. steps:
  58. - checkout
  59. - run:
  60. name: "package with packagecore"
  61. command: |
  62. # Clean up
  63. rm -rf ./dist/*
  64. # Pack source
  65. git archive -o ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz --format tar.gz --prefix=${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}/ ${CIRCLE_TAG}
  66. # Use latest installed python3 from pyenv
  67. export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
  68. pip install packagecore
  69. packagecore -c misc/packagecore/packagecore.yaml -o ./dist/ ${CIRCLE_TAG#v}
  70. # Move source pack to dist
  71. mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz dist/
  72. - run:
  73. name: "generate static package"
  74. command: |
  75. # Compile statically
  76. make O_STATIC=1 O_NORL=1 strip
  77. # Archive
  78. tar -cvf ${CIRCLE_PROJECT_REPONAME}-static-${CIRCLE_TAG}.amd64.tar.gz ${CIRCLE_PROJECT_REPONAME}
  79. # Move static package to dist
  80. mv tar -cvf ${CIRCLE_PROJECT_REPONAME}-static-${CIRCLE_TAG}.amd64.tar.gz dist/
  81. # Remove static binary
  82. rm ${CIRCLE_PROJECT_REPONAME}
  83. - run:
  84. name: "publish to GitHub"
  85. command: |
  86. go get github.com/tcnksm/ghr
  87. ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
  88. workflows:
  89. version: 2
  90. test:
  91. jobs: &all-tests
  92. - compile
  93. nightly:
  94. triggers:
  95. - schedule:
  96. cron: "0 0 * * 6"
  97. filters:
  98. branches:
  99. only:
  100. - master
  101. jobs: *all-tests
  102. publish-github-release:
  103. jobs:
  104. - package-and-publish:
  105. filters:
  106. tags:
  107. only: /^v.*/
  108. branches:
  109. ignore: /.*/