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.
 
 
 
 
 
 

125 lignes
3.8 KiB

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