.gitlab-ci.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. stages:
  2. - pre-build
  3. - test
  4. - docs
  5. - build
  6. - deploy
  7. requirements:
  8. stage: pre-build
  9. allow_failure: true
  10. tags:
  11. - python3
  12. - linux
  13. script:
  14. - pip3 install -r requirements.txt --user
  15. epydoc:
  16. stage: docs
  17. only:
  18. - master
  19. - tags
  20. artifacts:
  21. paths:
  22. - html/
  23. tags:
  24. - python2
  25. - linux
  26. script:
  27. - wget https://git.mk2es.com.au/snippets/9/raw -O doc-style.css -q
  28. - >-
  29. epydoc --no-sourcecode --no-frames --output html --simple-term -vv
  30. --inheritance grouped --css doc-style.css
  31. --name 'PyGPIO' pygpio
  32. pypi:
  33. stage: build
  34. only:
  35. - master
  36. - tags
  37. artifacts:
  38. paths:
  39. - dist/
  40. dependencies:
  41. - epydoc
  42. tags:
  43. - python3
  44. - linux
  45. script:
  46. - python3 setup.py bdist_wheel
  47. lint:
  48. stage: test
  49. tags:
  50. - python3
  51. - linux
  52. script:
  53. - wget https://git.mk2es.com.au/snippets/8/raw -O mk2pylint.cfg -q
  54. - python3 -m pylint --rcfile=mk2pylint.cfg --disable=duplicate-code pygpio --reports=no || [[ $(($? & 3)) == 0 ]]
  55. deploy:
  56. stage: deploy
  57. dependencies:
  58. - epydoc
  59. - pypi
  60. only:
  61. - master
  62. - tags
  63. tags:
  64. - linux
  65. - mk2-docs
  66. script:
  67. - '[ -e /srv/pypi/packages/pygpio ] || mkdir /srv/pypi/packages/pygpio'
  68. - '[ -e /srv/api/pygpio ] || mkdir /srv/api/pygpio'
  69. - cp -r html/* /srv/api/pygpio
  70. - cp dist/*.whl /srv/pypi/packages/pygpio