Build
This commit is contained in:
parent
a96ba8a837
commit
79b285a016
106
.github/workflows/sanity_check.yml
vendored
106
.github/workflows/sanity_check.yml
vendored
@ -1,44 +1,76 @@
|
|||||||
name: Check buck targets and code format
|
name: Check buck targets and code format
|
||||||
on: [push, pull_request]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
build:
|
||||||
name: Check TARGETS file and code format
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout feature branch
|
- name: Checkout feature branch
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 1
|
||||||
|
- name: Script
|
||||||
- name: Fetch from upstream
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream https://github.com/facebook/rocksdb.git && git fetch upstream
|
set -xe
|
||||||
|
|
||||||
- name: Where am I
|
export GTEST_THROW_ON_FAILURE=0
|
||||||
run: |
|
export GTEST_OUTPUT=\"xml:/tmp/test-results/\"
|
||||||
echo git status && git status
|
export SKIP_FORMAT_BUCK_CHECKS=1
|
||||||
echo "git remote -v" && git remote -v
|
export GTEST_COLOR=1
|
||||||
echo git branch && git branch
|
export CTEST_OUTPUT_ON_FAILURE=1
|
||||||
|
export CTEST_TEST_TIMEOUT=300
|
||||||
- name: Setup Python
|
export ZLIB_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zlib
|
||||||
uses: actions/setup-python@v1
|
export BZIP2_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/bzip2
|
||||||
|
export SNAPPY_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/snappy
|
||||||
- name: Install Dependencies
|
export LZ4_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/lz4
|
||||||
run: python -m pip install --upgrade pip
|
export ZSTD_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zstd
|
||||||
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
- name: Install argparse
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||||
run: pip install argparse
|
export PATH=$JAVA_HOME/bin:$PATH
|
||||||
|
|
||||||
- name: Download clang-format-diff.py
|
# install dev deps
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
apt-get update -y && apt-get install -y libgflags-dev ninja-build valgrind cmake libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev gnupg wget git make build-essential liblzma-dev openjdk-8-jdk curl unzip tar
|
||||||
args: https://raw.githubusercontent.com/llvm/llvm-project/release/12.x/clang/tools/clang-format/clang-format-diff.py
|
|
||||||
|
# install clang 10
|
||||||
- name: Check format
|
|
||||||
run: VERBOSE_CHECK=1 make check-format
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||||
|
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" | tee -a /etc/apt/sources.list
|
||||||
- name: Compare buckify output
|
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" | tee -a /etc/apt/sources.list
|
||||||
run: make check-buck-targets
|
echo "APT::Acquire::Retries \"10\";" | tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable
|
||||||
|
apt-get update -y && apt-get install -y clang-10
|
||||||
- name: Simple source code checks
|
|
||||||
run: make check-sources
|
# install clang 13
|
||||||
|
|
||||||
|
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | tee -a /etc/apt/sources.list
|
||||||
|
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | tee -a /etc/apt/sources.list
|
||||||
|
echo "APT::Acquire::Retries \"10\";" | tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||||
|
apt-get update -y && apt-get install -y clang-13
|
||||||
|
|
||||||
|
# install google/benchmark
|
||||||
|
|
||||||
|
git clone --depth 1 --branch v1.6.1 https://github.com/google/benchmark.git ~/benchmark
|
||||||
|
cd ~/benchmark && mkdir build && cd build
|
||||||
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=0
|
||||||
|
ninja && ninja install
|
||||||
|
|
||||||
|
# install google/gtest-parallel
|
||||||
|
|
||||||
|
git clone --single-branch --branch master --depth 1 https://github.com/google/gtest-parallel.git ~/gtest-parallel
|
||||||
|
export PATH=$HOME/gtest-parallel:$PATH
|
||||||
|
|
||||||
|
# install google/libprotobuf-mutator
|
||||||
|
|
||||||
|
git clone --single-branch --branch master --depth 1 https://github.com/google/libprotobuf-mutator.git ~/libprotobuf-mutator
|
||||||
|
cd ~/libprotobuf-mutator && mkdir build && cd build
|
||||||
|
cmake .. -GNinja -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DCMAKE_BUILD_TYPE=Release -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON
|
||||||
|
ninja && ninja install
|
||||||
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/OFF/:~/libprotobuf-mutator/build/external.protobuf/lib/pkgconfig/
|
||||||
|
export PROTOC_BIN=~/libprotobuf-mutator/build/external.protobuf/bin/protoc
|
||||||
|
|
||||||
|
# build rocksdb java
|
||||||
|
|
||||||
|
git clone --single-branch --branch main --depth 1 https://github.com/facebook/rocksdb ~/rocksdb
|
||||||
|
cd ~/rocksdb && make V=0 J=8 -j8 rocksdbjavastatic
|
||||||
|
Loading…
Reference in New Issue
Block a user