config.yml 2.7 KB

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