config.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Python CircleCI 2.0 configuration file
  2. #
  3. # Check https://circleci.com/docs/2.0/language-python/ for more details
  4. #
  5. version: 2.1
  6. commands:
  7. build-py-38-common:
  8. parameters:
  9. go_arch:
  10. # amd64 or arm64
  11. type: string
  12. hugo_arch:
  13. # 64bit (AMD64) or ARM64
  14. type: string
  15. steps:
  16. - checkout
  17. - run:
  18. name: compile
  19. command: |
  20. if [ -d /usr/share/hue ]; then
  21. # Running in gethue/hue Docker container
  22. apt-get update
  23. apt-get install -y python3.8-dev python3.8-venv python3.8-distutils libsnappy-dev # This should not be needed as some point
  24. curl -sL https://bootstrap.pypa.io/get-pip.py | python3.8
  25. else
  26. sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
  27. export DEBIAN_FRONTEND=noninteractive
  28. sudo apt-get update
  29. sudo apt-get install -y gcc g++ build-essential python3.8-dev python3.8-venv python3.8-distutils asciidoc rsync curl libkrb5-dev libldap2-dev libsasl2-dev libxml2-dev libxslt-dev libsasl2-modules-gssapi-mit libsnappy-dev libffi-dev
  30. curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && sudo apt-get install -y nodejs
  31. curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python3.8
  32. sudo apt-get install -y libncursesw5-dev libgdbm-dev libc6-dev libssl-dev openssl
  33. fi
  34. export PYTHON_VER=python3.8
  35. export ROOT=$PWD
  36. make apps
  37. - run:
  38. name: run documentation lints
  39. command: |
  40. cd ~/repo
  41. # Installs to move to image building
  42. curl -O https://dl.google.com/go/go1.17.linux-<< parameters.go_arch >>.tar.gz
  43. tar -xvf go1.17.linux-<< parameters.go_arch >>.tar.gz
  44. export GO111MODULE=on
  45. go/bin/go get -u github.com/raviqqe/muffet@v1.5.7
  46. curl --output hugo_0.69.0_Linux.tar.gz -L https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_0.69.0_Linux-<< parameters.hugo_arch >>.tar.gz
  47. tar -xvf hugo_0.69.0_Linux.tar.gz
  48. export PATH=$PWD:$HOME/go/bin:$PATH
  49. # Trigger linting if documentation changes
  50. ./tools/ci/check_for_website_dead_links.sh docs/docs-site
  51. # ./tools/ci/check_for_website_dead_links.sh docs/gethue
  52. - run:
  53. name: run python lints
  54. command: |
  55. ./build/env/bin/pip install pylint==2.5.3 pylint-django==2.3.0 configparser==5.3.0
  56. ./tools/ci/check_for_python_lint.sh
  57. - run:
  58. name: run tests
  59. command: |
  60. PYTHONWARNINGS=always ./build/env/bin/hue test unit --with-xunit --with-cover
  61. - store_artifacts:
  62. path: test-reports
  63. destination: test-reports
  64. jobs:
  65. build-py-38:
  66. docker:
  67. - image: gethue/hue:latest-py2 # Should be circleci/python:3.6 at some point
  68. working_directory: ~/repo
  69. steps:
  70. - build-py-38-common:
  71. go_arch: "amd64"
  72. hugo_arch: "64bit"
  73. build-py-38-arm64:
  74. machine:
  75. image: ubuntu-2004:2023.07.1
  76. resource_class: arm.medium
  77. working_directory: ~/repo
  78. steps:
  79. - build-py-38-common:
  80. go_arch: "arm64"
  81. hugo_arch: "ARM64"
  82. workflows:
  83. version: 2
  84. build-python3:
  85. jobs:
  86. - build-py-38:
  87. filters:
  88. branches:
  89. ignore:
  90. - master
  91. - build-py-38-arm64:
  92. filters:
  93. branches:
  94. ignore:
  95. - master