action.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Prepare VM for YDB build
  2. description: Install required packages
  3. runs:
  4. using: "composite"
  5. steps:
  6. - name: get ubuntu version
  7. shell: bash
  8. id: init
  9. run: |
  10. echo "distro_name=$(lsb_release -si)" | tee -a $GITHUB_OUTPUT
  11. echo "distro_release=$(lsb_release -sr)" | tee -a $GITHUB_OUTPUT
  12. - name: Add cmake
  13. shell: bash
  14. if: steps.init.outputs.distro_name == 'Ubuntu' && contains(fromJSON('["18.04", "20.04"]'), steps.init.outputs.distro_release)
  15. run: |
  16. wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
  17. echo "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
  18. - name: Add cmake, llvm apt repositories for Ubuntu < 22.04
  19. shell: bash
  20. if: steps.init.outputs.distro_name == 'Ubuntu' && steps.init.outputs.distro_release == '18.04'
  21. run: |
  22. wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
  23. echo "deb https://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-12 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
  24. - name: Install YDB Build dependencies
  25. shell: bash
  26. run: |
  27. sudo apt-get update
  28. sudo apt-get -y install --no-install-recommends \
  29. python-is-python3 git cmake python3-pip ninja-build antlr3 m4 \
  30. clang-12 lld-12 llvm-12 libidn11-dev libaio1 libaio-dev parallel s3cmd
  31. sudo pip3 install conan==1.59 pytest==7.1.3 pytest-timeout grpcio grpcio-tools PyHamcrest tornado xmltodict pyarrow
  32. - name: install ccache
  33. shell: bash
  34. run: |
  35. export CCACHE_VERSION=4.8.1
  36. export OS_ARCH=$(uname -m)
  37. curl -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${OS_ARCH}.tar.xz \
  38. | tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${CCACHE_VERSION}-linux-${OS_ARCH}/ccache
  39. ls -la /usr/local/bin/ccache