aboutsummaryrefslogtreecommitdiffstats
path: root/.github/actions/prepare_vm/action.yaml
blob: 23aedc743d4323cfff428627858d3205d099b618 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 ubuntu toolchain PPA for 18.04
      shell: bash
      if: steps.init.outputs.distro_name == 'Ubuntu' && steps.init.outputs.distro_release == '18.04'
      run: |
        apt-get install -y --no-install-recommends software-properties-common
        add-apt-repository ppa:ubuntu-toolchain-r/test
    - 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
        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)-14 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-14 lld-14 llvm-14 libidn11-dev libaio1 libaio-dev parallel s3cmd make postgresql-client
        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
    - 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