From 442ea9f3d5004d6b0f02c9269491d393dd202617 Mon Sep 17 00:00:00 2001 From: Bulat Gayazov Date: Fri, 26 Jan 2024 18:24:32 +0000 Subject: [PATCH] Added PR SDK build workflow --- .github/workflows/pr_check.yaml | 53 +++++++++++++++++++++++++++++++++ README.md | 10 +++++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr_check.yaml diff --git a/.github/workflows/pr_check.yaml b/.github/workflows/pr_check.yaml new file mode 100644 index 0000000000..bb5ba92c26 --- /dev/null +++ b/.github/workflows/pr_check.yaml @@ -0,0 +1,53 @@ +name: PR-check + +on: + push: + branches: + - master + - release-* + pull_request: + workflow_dispatch: + +jobs: + main: + name: Build YDB C++ SDK + runs-on: [ubuntu-22.04] + steps: + - name: Install dependencies + shell: bash + run: | + sudo apt-get -y install git cmake ninja-build libidn11-dev ragel yasm + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 16 + wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz + tar -xvzf libiconv-1.15.tar.gz + cd libiconv-1.15 + ./configure --prefix=/usr/local + make + make install + cd .. + rm -rf llvm.sh libiconv-1.15 + - 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: Configure + shell: bash + run: | + mkdir -p ../build + cd ../build + rm -rf * + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_TOOLCHAIN_FILE=../ydb-cpp-sdk/clang.toolchain \ + ../ydb-cpp-sdk + - name: Build + shell: bash + run: | + cd ../build + ninja examples/all client/all + \ No newline at end of file diff --git a/README.md b/README.md index b7653d36fe..4019e80c71 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,18 @@ ```bash sudo apt-get -y install git cmake ninja-build libidn11-dev ragel yasm + wget https://apt.llvm.org/llvm.sh chmod u+x llvm.sh sudo ./llvm.sh 16 -``` -- libiconv: https://www.gnu.org/software/libiconv/ +wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz +tar -xvzf libiconv-1.15.tar.gz +cd libiconv-1.15 +./configure --prefix=/usr/local +make +make install +``` ## Create the work directory