forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (80 loc) · 3.3 KB
/
prestocpp-linux-adapters-build.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: prestocpp-linux-adapters-build
on:
workflow_dispatch:
# Disable the automatic execution on PR because it currently will run out of disk space and
# we will address this subsequently.
# - use smaller image - in the works
# - remove the adapters downloaded files after install - JWT needs fixing because of the cmake files end up
#pull_request:
# paths:
# - 'presto-native-execution/scripts/**'
# - '.github/workflows/prestocpp-linux-adapters-build.yml'
jobs:
prestocpp-linux-adapters-build:
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.290-20241014120930-e1fc090
env:
CCACHE_DIR: "${{ github.workspace }}/ccache"
steps:
- uses: actions/checkout@v4
- name: Fix git permissions
# Usually actions/checkout does this but as we run in a container
# it doesn't work
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update submodules
run: |
cd presto-native-execution
make submodules
- name: Build all adapter dependencies
run: |
mkdir -p ${GITHUB_WORKSPACE}/adapter-deps/install
mkdir -p ${GITHUB_WORKSPACE}/adapter-deps/download
source /opt/rh/gcc-toolset-12/enable
set -xu
cd presto-native-execution
export DEPENDENCY_DIR=${GITHUB_WORKSPACE}/adapter-deps/download
export INSTALL_PREFIX=${GITHUB_WORKSPACE}/adapter-deps/install
PROMPT_ALWAYS_RESPOND=n ./velox/scripts/setup-adapters.sh
PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh
- name: Install Github CLI for using apache/infrastructure-actions/stash
run: |
curl -L https://github.com/cli/cli/releases/download/v2.63.2/gh_2.63.2_linux_amd64.rpm > gh_2.63.2_linux_amd64.rpm
rpm -iv gh_2.63.2_linux_amd64.rpm
- uses: apache/infrastructure-actions/stash/restore@4ab8682fbd4623d2b4fc1c98db38aba5091924c3
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-prestocpp-linux-adapters-build
- name: Zero ccache statistics
run: ccache -sz
- name: Build engine
run: |
source /opt/rh/gcc-toolset-12/enable
cd presto-native-execution
cmake \
-B _build/release \
-GNinja \
-DTREAT_WARNINGS_AS_ERRORS=1 \
-DENABLE_ALL_WARNINGS=1 \
-DCMAKE_BUILD_TYPE=Release \
-DPRESTO_ENABLE_PARQUET=ON \
-DPRESTO_ENABLE_S3=ON \
-DPRESTO_ENABLE_GCS=ON \
-DPRESTO_ENABLE_ABFS=OFF \
-DPRESTO_ENABLE_HDFS=ON \
-DPRESTO_ENABLE_REMOTE_FUNCTIONS=ON \
-DPRESTO_ENABLE_JWT=ON \
-DPRESTO_STATS_REPORTER_TYPE=PROMETHEUS \
-DPRESTO_MEMORY_CHECKER_TYPE=LINUX_MEMORY_CHECKER \
-DPRESTO_ENABLE_TESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr/local \
-DThrift_ROOT=/usr/local \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DMAX_LINK_JOBS=4
ninja -C _build/release -j 4
- name: Ccache after
run: ccache -s
- uses: apache/infrastructure-actions/stash/save@4ab8682fbd4623d2b4fc1c98db38aba5091924c3
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-prestocpp-linux-adapters-build