My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

109 lignes
3.3 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 ./.git
  64. rm -rf ./dist/*
  65. # Pack source
  66. cd ..
  67. tar -czf ${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ${CIRCLE_PROJECT_REPONAME}
  68. cd ${CIRCLE_PROJECT_REPONAME}
  69. # Use latest installed python3 from pyenv
  70. export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
  71. pip install packagecore
  72. packagecore -c misc/packagecore/packagecore.yaml -o ./dist/ ${CIRCLE_TAG#v}
  73. # Move source pack to dist
  74. mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz dist/
  75. - run:
  76. name: "publish to GitHub"
  77. command: |
  78. go get github.com/tcnksm/ghr
  79. ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
  80. workflows:
  81. version: 2
  82. test:
  83. jobs: &all-tests
  84. - compile
  85. nightly:
  86. triggers:
  87. - schedule:
  88. cron: "0 0 * * 6"
  89. filters:
  90. branches:
  91. only:
  92. - master
  93. jobs: *all-tests
  94. publish-github-release:
  95. jobs:
  96. - package-and-publish:
  97. filters:
  98. tags:
  99. only: /^v.*/
  100. branches:
  101. ignore: /.*/