aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Kozlovskiy <nikitka@gmail.com>2023-08-14 20:44:25 +0300
committernkozlovskiy <nmk@ydb.tech>2023-08-15 01:59:19 +0300
commita0614d177962b2b05fb7f8e4e051ed65bb9ce83a (patch)
treec47eff091942ebe6eda8f9d8d86e3267cc186195
parent262241439f576e1b7e241a25c1b0ac9e78438fbe (diff)
downloadydb-a0614d177962b2b05fb7f8e4e051ed65bb9ce83a.tar.gz
ubuntu 18 prewarm cache build fix
ubuntu 18 prewarm cache build fix Pull Request resolved: #328
-rw-r--r--.github/prewarm/build.sh3
-rw-r--r--.github/prewarm/ubuntu-1804.dockerfile9
-rw-r--r--BUILD.md43
3 files changed, 36 insertions, 19 deletions
diff --git a/.github/prewarm/build.sh b/.github/prewarm/build.sh
index 05be050a46..2bc01d9896 100644
--- a/.github/prewarm/build.sh
+++ b/.github/prewarm/build.sh
@@ -6,6 +6,9 @@ export CCACHE_BASEDIR=/ydbwork/
export CONAN_USER_HOME=/ydbwork/build
+export CC=/usr/bin/clang-14
+export CC_FOR_BUILD=$CC
+
mkdir /ydbwork/build
cd /ydbwork/build
diff --git a/.github/prewarm/ubuntu-1804.dockerfile b/.github/prewarm/ubuntu-1804.dockerfile
index b879d2f378..46256d055b 100644
--- a/.github/prewarm/ubuntu-1804.dockerfile
+++ b/.github/prewarm/ubuntu-1804.dockerfile
@@ -15,7 +15,12 @@ RUN apt-get update \
&& apt-get update
-RUN apt-get install -y git cmake python3-pip ninja-build antlr3 m4 clang-14 lld-14 libidn11-dev libaio1 libaio-dev llvm-14 make \
- && pip3 install conan==1.59 grpcio-tools\
+RUN apt-get install -y --no-install-recommends python3.8 python3.8-venv python3-venv \
+ && python3.8 -m venv /opt/ve && /opt/ve/bin/pip install -U pip
+
+ENV PATH=/opt/ve/bin:$PATH
+
+RUN apt-get install -y --no-install-recommends git cmake ninja-build antlr3 m4 clang-14 lld-14 libidn11-dev libaio1 libaio-dev llvm-14 make \
+ && pip install conan==1.59 grpcio-tools==1.57.0 \
&& (V=4.8.1; curl -L https://github.com/ccache/ccache/releases/download/v${V}/ccache-${V}-linux-x86_64.tar.xz | \
tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${V}-linux-x86_64/ccache)
diff --git a/BUILD.md b/BUILD.md
index 0bbf9af6c5..56d46fdaef 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -26,29 +26,38 @@
# How to Build
-## (optional) Add CMake and LLVM APT repositories (for Ubuntu 18.04 and 20.04)
-
-## Ubuntu 18.04 and Ubuntu 20.04
-
-For Ubuntu 18.04 and Ubuntu 20.04, you have to add CMake and LLVM APT repositories:
-
-```bash
-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
-
-wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
-echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-14 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
-
-sudo apt-get update
-
-```
+<details>
+ <summary>For Ubuntu 18.04, install Python 3.8, create and activate a new virtual environment, and install the latest PIP.</summary>
+
+ ```bash
+ apt-get install python3.8 python3.8-venv python3-venv
+ python3.8 -mvnev ~/ydbwork/ve
+ source ~/ydbwork/ve/bin/activate
+ pip install -U pip
+ ```
+</details>
+
+<details>
+ <summary>For Ubuntu 18.04 and Ubuntu 20.04, add CMake and LLVM APT repositories.</summary>
+
+ ```bash
+ 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
+
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-14 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
+
+ sudo apt-get update
+
+ ```
+</details>
## Install dependencies
```bash
sudo apt-get -y install git cmake python3-pip ninja-build antlr3 m4 clang-14 lld-14 libidn11-dev libaio1 libaio-dev llvm-14
-sudo pip3 install conan==1.59
+sudo pip3 install conan==1.59 grpcio-tools==1.57.0
```