config.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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_14.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. ./build/env/bin/pip install pylint==2.5.3 pylint-django==2.3.0 configparser==5.3.0
  49. ./tools/ci/check_for_python_lint.sh
  50. - run:
  51. name: run tests
  52. command: |
  53. PYTHONWARNINGS=always ./build/env/bin/pytest
  54. - store_artifacts:
  55. path: test-reports
  56. destination: test-reports
  57. jobs:
  58. build-py-38-arm64:
  59. machine:
  60. image: ubuntu-2004:2023.07.1
  61. resource_class: arm.medium
  62. working_directory: ~/repo
  63. steps:
  64. - build-py-38-common:
  65. go_arch: "arm64"
  66. hugo_arch: "ARM64"
  67. workflows:
  68. version: 2
  69. build-python3:
  70. jobs:
  71. - build-py-38-arm64:
  72. filters:
  73. branches:
  74. ignore:
  75. - master