12345678910111213141516171819202122232425262728293031323334353637383940 |
- name: Prepare VM for YDB build
- description: Install required packages
- runs:
- using: "composite"
- steps:
- - name: get ubuntu version
- shell: bash
- id: init
- run: |
- echo "distro_name=$(lsb_release -si)" | tee -a $GITHUB_OUTPUT
- echo "distro_release=$(lsb_release -sr)" | tee -a $GITHUB_OUTPUT
- - name: Add cmake
- shell: bash
- if: steps.init.outputs.distro_name == 'Ubuntu' && contains(fromJSON('["18.04", "20.04"]'), steps.init.outputs.distro_release)
- run: |
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
- echo "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
- - name: Add cmake, llvm apt repositories for Ubuntu < 22.04
- shell: bash
- if: steps.init.outputs.distro_name == 'Ubuntu' && steps.init.outputs.distro_release == '18.04'
- run: |
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- 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
- - name: Install YDB Build dependencies
- shell: bash
- run: |
- sudo apt-get update
- sudo apt-get -y install --no-install-recommends \
- python-is-python3 git cmake python3-pip ninja-build antlr3 m4 \
- clang-12 lld-12 llvm-12 libidn11-dev libaio1 libaio-dev parallel s3cmd
- sudo pip3 install conan==1.59 pytest==7.1.3 pytest-timeout grpcio grpcio-tools PyHamcrest tornado xmltodict pyarrow
- - name: install ccache
- shell: bash
- run: |
- export CCACHE_VERSION=4.8.1
- export OS_ARCH=$(uname -m)
- curl -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${OS_ARCH}.tar.xz \
- | tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${CCACHE_VERSION}-linux-${OS_ARCH}/ccache
- ls -la /usr/local/bin/ccache
|