aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/prepare_vm_for_build.yml
blob: dab4270299ec6cd316e72cfd7e1ad014dc0a3cf1 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Prepare VM for YDB build

on:
  workflow_call:
    inputs:
      runner_label:
        required: true
        type: string
    secrets:
      rc_auth:
        required: false
  workflow_dispatch:
    inputs:
      runner_label:
        required: true
        type: string  
        
jobs:
  prepare:
    runs-on: ${{ inputs.runner_label }} # run the job on a particular runner
    steps:
    - name: Install YDB Build dependencies
      shell: bash
      run: |
        wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
        wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
        echo "deb http://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
        echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
        sudo apt-get update
        sudo apt-get -y install python-is-python3 git cmake python3-pip ninja-build antlr3 m4 clang-12 lld-12 libidn11-dev libaio1 libaio-dev parallel
        sudo pip3 install conan==1.59 pytest==7.1.3 grpcio grpcio-tools PyHamcrest tornado xmltodict pyarrow
    - name: Install AllureCtl
      if: false
      shell: bash
      run: |
        wget https://github.com/allure-framework/allurectl/releases/latest/download/allurectl_linux_386 -O ~/allurectl
        chmod +x ~/allurectl
    - name: Checkout ccache
      uses: actions/checkout@v3
      with:
        repository: ccache/ccache
        path: ccache
    - name: Build ccache
      shell: bash
      run: |
        pwd
        cd ccache
        mkdir build && cd build
        cmake -DCMAKE_BUILD_TYPE=Release ..
        make -j32
        make install
        mkdir -p ~/.ccache
        echo 'remote_storage = http://${{secrets.rc_auth}}${{vars.REMOTE_CACHE_URL}}' > /root/.ccache/ccache.conf
        echo 'max_size = 50G' >> /root/.ccache/ccache.conf
        ccache -p