action.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 ubuntu toolchain PPA for 18.04
  13. shell: bash
  14. if: steps.init.outputs.distro_name == 'Ubuntu' && steps.init.outputs.distro_release == '18.04'
  15. run: |
  16. apt-get install -y --no-install-recommends software-properties-common
  17. add-apt-repository ppa:ubuntu-toolchain-r/test
  18. - name: Add cmake
  19. shell: bash
  20. if: steps.init.outputs.distro_name == 'Ubuntu' && contains(fromJSON('["18.04", "20.04"]'), steps.init.outputs.distro_release)
  21. run: |
  22. wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
  23. echo "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
  24. wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
  25. echo "deb https://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-14 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
  26. - name: Install YDB Build dependencies
  27. shell: bash
  28. run: |
  29. sudo apt-get update
  30. sudo apt-get -y install --no-install-recommends \
  31. python-is-python3 git cmake python3-pip ninja-build antlr3 m4 \
  32. clang-14 lld-14 llvm-14 libidn11-dev libaio1 libaio-dev parallel s3cmd make postgresql-client
  33. sudo pip3 install conan==1.59 pytest==7.1.3 pytest-timeout pytest-xdist==3.3.1 setproctitle==1.3.2 grpcio grpcio-tools PyHamcrest tornado xmltodict pyarrow boto3 moto[server] psutil pygithub==1.59.1
  34. - name: install ccache
  35. shell: bash
  36. run: |
  37. export CCACHE_VERSION=4.8.1
  38. export OS_ARCH=$(uname -m)
  39. curl -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${OS_ARCH}.tar.xz \
  40. | tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${CCACHE_VERSION}-linux-${OS_ARCH}/ccache
  41. ls -la /usr/local/bin/ccache