aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorNikita Kozlovskiy <nikitka@gmail.com>2023-06-13 12:10:21 +0000
committernkozlovskiy <nmk@ydb.tech>2023-06-13 15:10:21 +0300
commita3ff846aff3c30ea9f5d8d2fb96f731bde92c501 (patch)
tree64a9700efa52bd0ac486f168c959fb0b4090c941 /.github/workflows
parentee667cd44821a70db31f825b3b921c63166dab30 (diff)
downloadydb-a3ff846aff3c30ea9f5d8d2fb96f731bde92c501.tar.gz
ci: add prepare-vm action, update build documentation
ci: add prepare-vm action, update build documentation Pull Request resolved: #254
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build_and_test_ondemand.yml15
-rw-r--r--.github/workflows/prepare_vm_for_build.yml44
2 files changed, 12 insertions, 47 deletions
diff --git a/.github/workflows/build_and_test_ondemand.yml b/.github/workflows/build_and_test_ondemand.yml
index 57fe691bb2..081ac77be5 100644
--- a/.github/workflows/build_and_test_ondemand.yml
+++ b/.github/workflows/build_and_test_ondemand.yml
@@ -67,10 +67,19 @@ jobs:
prepare-vm:
name: Prepare runner
- uses: ./.github/workflows/prepare_vm_for_build.yml
needs: provide-runner
- with:
- runner_label: ${{ needs.provide-runner.outputs.label }}
+ runs-on: [ self-hosted, "${{ needs.provide-runner.outputs.label }}" ]
+ steps:
+ - name: Checkout PR
+ uses: actions/checkout@v3
+ if: github.event.pull_request.head.sha != ''
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ - name: Checkout
+ uses: actions/checkout@v3
+ if: github.event.pull_request.head.sha == ''
+ - name: Prepare VM
+ uses: ./.github/actions/prepare_vm
main:
name: Build and test
diff --git a/.github/workflows/prepare_vm_for_build.yml b/.github/workflows/prepare_vm_for_build.yml
index 24d8b3e5b7..e69de29bb2 100644
--- a/.github/workflows/prepare_vm_for_build.yml
+++ b/.github/workflows/prepare_vm_for_build.yml
@@ -1,44 +0,0 @@
-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 pytest-timeout 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: install ccache
- shell: bash
- run: |
- export CCACHE_VERSION=4.8.1
- curl -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-x86_64.tar.xz \
- | tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${CCACHE_VERSION}-linux-x86_64/ccache
- ls -la /usr/local/bin/ccache \ No newline at end of file