arm64-python-ci.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Python 3 ARM64 CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - master
  9. jobs:
  10. hue-build-and-tests-arm64:
  11. name: Build and Test (Python 3.11, ARM64)
  12. # Use GitHub-hosted ARM64 runner
  13. runs-on: ubuntu-22.04-arm
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v4
  17. with:
  18. fetch-depth: 0
  19. - name: Check commit title format
  20. run: |
  21. ./tools/ci/check_for_commit_message.sh
  22. - name: Set up Python 3.11
  23. uses: actions/setup-python@v5
  24. with:
  25. python-version: '3.11'
  26. - name: Cache pip
  27. uses: actions/cache@v4
  28. with:
  29. path: ~/.cache/pip
  30. key: ${{ runner.os }}-arm64-py311-pip-${{ hashFiles('desktop/core/generate_requirements.py') }}
  31. restore-keys: |
  32. ${{ runner.os }}-arm64-py311-pip-
  33. ${{ runner.os }}-arm64-py311-
  34. ${{ runner.os }}-arm64-
  35. - name: Setup node 20 and cache npm
  36. uses: actions/setup-node@v4
  37. with:
  38. node-version: 20
  39. cache: 'npm'
  40. - name: Build Hue
  41. run: |
  42. sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
  43. export DEBIAN_FRONTEND=noninteractive
  44. sudo apt-get update -y
  45. sudo apt-get install -y build-essential asciidoc libkrb5-dev libldap2-dev libsasl2-dev libxml2-dev libxslt-dev libsasl2-modules-gssapi-mit libsnappy-dev libncursesw5-dev libgdbm-dev
  46. # Install Python 3.11 using deadsnakes PPA
  47. sudo add-apt-repository -y ppa:deadsnakes/ppa
  48. sudo apt-get install -y python3.11 python3.11-dev python3.11-venv python3.11-distutils
  49. # Install pip for Python 3.11
  50. curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3.11
  51. unset PIP_FIND_LINKS
  52. unset PIP_EXTRA_INDEX_URL
  53. export PYTHON_VER=python3.11
  54. export SKIP_PYTHONDEV_CHECK=true
  55. export ROOT=$PWD
  56. make apps docs test_prep
  57. - name: Run python lint check
  58. run: |
  59. PYTHONWARNINGS=always ./build/env/bin/hue runruff check
  60. - name: Run unit tests
  61. run: |
  62. PYTHONWARNINGS=always ./build/env/bin/pytest
  63. - name: Upload reports
  64. uses: actions/upload-artifact@v4
  65. with:
  66. name: hue-reports-arm64
  67. path: ./reports