forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 50
64 lines (59 loc) · 3.14 KB
/
unittest.yml
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
56
57
58
59
60
61
62
63
64
name: Velox Unit Tests Suite
on:
pull_request
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
velox-test:
runs-on: self-hosted
container: ubuntu:22.04
steps:
- uses: actions/checkout@v2
- run: apt-get update && apt-get install ca-certificates -y && update-ca-certificates
- run: sed -i 's/http\:\/\/archive.ubuntu.com/https\:\/\/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
- run: apt-get update
- run: TZ=Asia/Shanghai ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- run: apt-get install -y cmake ccache build-essential ninja-build sudo rpm curl g++-12
- run: apt-get install -y libboost-all-dev libcurl4-openssl-dev
- run: apt-get install -y libssl-dev flex libfl-dev git openjdk-8-jdk axel *thrift* libkrb5-dev libgsasl7-dev libuuid1 uuid-dev
- run: apt-get install -y libz-dev
- run: |
axel https://github.com/protocolbuffers/protobuf/releases/download/v21.4//protobuf-all-21.4.tar.gz
tar xf protobuf-all-21.4.tar.gz
cd protobuf-21.4/cmake
CFLAGS=-fPIC CXXFLAGS=-fPIC cmake .. && make -j && make install
- name: Compile and run C++ unit tests
run: |
git submodule sync --recursive && git submodule update --init --recursive
sed -i 's/sudo apt/apt/g' ./scripts/setup-ubuntu.sh
sed -i 's/sudo --preserve-env apt/apt/g' ./scripts/setup-ubuntu.sh
TZ=Asia/Shanghai ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && ./scripts/setup-ubuntu.sh
mkdir -p ~/adapter-deps/install
DEPENDENCY_DIR=~/adapter-deps PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh gcs aws hdfs
#make debug EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_PARQUET=ON -DVELOX_BUILD_TESTING=ON -DVELOX_BUILD_TEST_UTILS=ON -DVELOX_ENABLE_HDFS=ON -DVELOX_ENABLE_S3=ON -DVELOX_ENABLE_GCS=ON" AWSSDK_ROOT_DIR=~/adapter-deps/install
#make debug EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_PARQUET=ON -DVELOX_BUILD_TESTING=ON -DVELOX_BUILD_TEST_UTILS=ON"
export CXX=/usr/bin/g++-12
make EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_PARQUET=ON -DVELOX_BUILD_TESTING=ON -DVELOX_BUILD_TEST_UTILS=ON"
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
export HADOOP_ROOT_LOGGER="WARN,DRFA"
export LIBHDFS3_CONF=$(pwd)/.circleci/hdfs-client.xml
export HADOOP_HOME='/usr/local/hadoop-2.10.1'
export PATH=~/adapter-deps/install/bin:/usr/local/hadoop-2.10.1/bin:${PATH}
cd _build/release && ctest -E velox_expression_test -j32 -VV --output-on-failure
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'velox'
exclude: 'external'
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '12'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}