config.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
  21. export DEBIAN_FRONTEND=noninteractive
  22. sudo apt-get update
  23. 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
  24. curl -sL https://deb.nodesource.com/setup_20.x | sudo bash - && sudo apt-get install -y nodejs
  25. curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python3.8
  26. sudo apt-get install -y libncursesw5-dev libgdbm-dev libc6-dev libssl-dev openssl
  27. export PYTHON_VER=python3.8
  28. export ROOT=$PWD
  29. make apps
  30. - run:
  31. name: run documentation lints
  32. command: |
  33. cd ~/repo
  34. # Installs to move to image building
  35. curl -O https://dl.google.com/go/go1.17.linux-<< parameters.go_arch >>.tar.gz
  36. tar -xvf go1.17.linux-<< parameters.go_arch >>.tar.gz
  37. export GO111MODULE=on
  38. go/bin/go get -u github.com/raviqqe/muffet@v1.5.7
  39. 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
  40. tar -xvf hugo_0.69.0_Linux.tar.gz
  41. export PATH=$PWD:$HOME/go/bin:$PATH
  42. # Trigger linting if documentation changes
  43. ./tools/ci/check_for_website_dead_links.sh docs/docs-site
  44. # ./tools/ci/check_for_website_dead_links.sh docs/gethue
  45. - run:
  46. name: run python lints
  47. command: |
  48. PYTHONWARNINGS=always ./build/env/bin/hue runruff check
  49. - run:
  50. name: run tests
  51. command: |
  52. PYTHONWARNINGS=always ./build/env/bin/pytest
  53. - store_artifacts:
  54. path: test-reports
  55. destination: test-reports
  56. jobs:
  57. build-py-38-arm64:
  58. machine:
  59. image: ubuntu-2004:2023.07.1
  60. resource_class: arm.medium
  61. working_directory: ~/repo
  62. steps:
  63. - build-py-38-common:
  64. go_arch: "arm64"
  65. hugo_arch: "ARM64"
  66. workflows:
  67. version: 2
  68. build-python3:
  69. jobs:
  70. - build-py-38-arm64:
  71. filters:
  72. branches:
  73. ignore:
  74. - master