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.
 
 
 
 
 
 

111 lignes
3.4 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-9 clang-tidy-9 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-9 ##########"
  51. CC=clang-9 make strip
  52. ls -l nnn
  53. make clean
  54. echo
  55. echo "########## clang-tidy-9 ##########"
  56. clang-tidy-9 src/* -- -I/usr/include -I/usr/include/ncursesw
  57. echo "########## checllcheck ##########"
  58. find plugins/ -type f -not -name "*.md" -exec shellcheck -e SC1090 {} +
  59. package-and-publish:
  60. machine: true
  61. working_directory: ~/nnn
  62. steps:
  63. - checkout
  64. - run:
  65. name: "package with packagecore"
  66. command: |
  67. # Clean up
  68. rm -rf ./dist/*
  69. # Pack source
  70. git archive -o ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz --format tar.gz --prefix=${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}/ ${CIRCLE_TAG}
  71. # Use latest installed python3 from pyenv
  72. export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
  73. pip install packagecore
  74. packagecore -c misc/packagecore/packagecore.yaml -o ./dist/ ${CIRCLE_TAG#v}
  75. # Move source pack to dist
  76. mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz dist/
  77. - run:
  78. name: "publish to GitHub"
  79. command: |
  80. go get github.com/tcnksm/ghr
  81. ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
  82. workflows:
  83. version: 2
  84. test:
  85. jobs: &all-tests
  86. - compile
  87. nightly:
  88. triggers:
  89. - schedule:
  90. cron: "0 0 * * 6"
  91. filters:
  92. branches:
  93. only:
  94. - master
  95. jobs: *all-tests
  96. publish-github-release:
  97. jobs:
  98. - package-and-publish:
  99. filters:
  100. tags:
  101. only: /^v.*/
  102. branches:
  103. ignore: /.*/