-
Notifications
You must be signed in to change notification settings - Fork 5.4k
128 lines (111 loc) · 3.75 KB
/
prestissimo-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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Prestissimo check and build
on:
push:
branches:
- 'master'
paths:
- 'presto-native-execution/**'
- '.github/workflows/prestissimo-build.yml'
pull_request:
paths:
- 'presto-native-execution/**'
- '.github/workflows/prestissimo-build.yml'
permissions:
contents: read
concurrency:
group: prestissimo-check-and-build-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
format-check:
name: Format check
# prevent errors when forks ff their main branch
if: ${{ github.repository == 'prestodb/presto' }}
runs-on: prestissimo_x64
container: public.ecr.aws/oss-presto/velox-dev:check
steps:
- name: Checkout code
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: Check formatting
run: |
cd presto-native-execution
make format-check
header-check:
name: Header check
if: ${{ github.repository == 'prestodb/presto' }}
runs-on: prestissimo_x64
container: public.ecr.aws/oss-presto/velox-dev:check
needs: format-check
steps:
- name: Checkout code
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: Check license headers
run: |
cd presto-native-execution
make header-check
linux-build-all:
name: Linux build all
if: ${{ github.repository == 'prestodb/presto' }}
runs-on: prestissimo_x64
container: prestodb/presto-native-dependency:latest
needs: header-check
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache"
steps:
- name: Checkout code
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 velox submodule
run: |
cd presto-native-execution
make velox-submodule
- name: Install all adapter dependencies
run: |
mkdir -p ${HOME}/adapter-deps/install
source /opt/rh/gcc-toolset-12/enable
set -xu
cd presto-native-execution
DEPENDENCY_DIR=${HOME}/adapter-deps PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh jwt
- name: Install GitHub CLI
uses: ./.github/actions/install-gh-cli
- name: Get Ccache Stash
uses: assignUser/stash/restore@v1
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-ubuntu-release
- name: Build all
run: |
mkdir -p '${{ env.CCACHE_DIR }}'
ccache -sz -M 8Gi
source /opt/rh/gcc-toolset-12/enable
cd presto-native-execution
cmake \
-B _build/release \
-GNinja \
-DAWSSDK_ROOT_DIR=${HOME}/adapter-deps/install \
-DTREAT_WARNINGS_AS_ERRORS=1 \
-DENABLE_ALL_WARNINGS=1 \
-DCMAKE_BUILD_TYPE=Release \
-DPRESTO_ENABLE_PARQUET=ON \
-DPRESTO_ENABLE_S3=ON \
-DPRESTO_ENABLE_REMOTE_FUNCTIONS=ON \
-DPRESTO_ENABLE_JWT=ON \
-DCMAKE_PREFIX_PATH=/usr/local \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DMAX_LINK_JOBS=2
ninja -C _build/release -j 8
ccache -vs
- uses: assignUser/stash/save@v1
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-ubuntu-release