Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions .github/workflows/prestocpp-linux-adapters-build.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
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: {}
on: [workflow_dispatch, pull_request]

jobs:
prestocpp-linux-adapters-build:
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
volumes:
- /usr:/host_usr
- /opt:/host_opt
concurrency:
group: ${{ github.workflow }}-prestocpp-linux-adapters-build-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand All @@ -29,6 +27,23 @@ jobs:
# it doesn't work
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}

# We cannot use the github action to free disk space from the runner
# because we are in the container and not on the runner anymore.
- name: Free Disk Space
run: |
# Re-used from free-disk-space github action.
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
# Show before
echo "Original available disk space: " $(getAvailableSpace)
# Remove DotNet.
rm -rf /host_usr/share/dotnet || true
# Remove android
rm -rf /host_usr/local/lib/android || true
# Remove CodeQL
rm -rf /host_opt/hostedtoolcache/CodeQL || true
# Show after
echo "New available disk space: " $(getAvailableSpace)

- name: Update submodules
run: |
cd presto-native-execution
Expand All @@ -38,13 +53,14 @@ jobs:
run: |
mkdir -p ${GITHUB_WORKSPACE}/adapter-deps/install
mkdir -p ${GITHUB_WORKSPACE}/adapter-deps/download
unset CC && unset CXX
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-centos9.sh install_adapters
PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh
PROMPT_ALWAYS_RESPOND=y ./velox/scripts/setup-centos-adapters.sh
PROMPT_ALWAYS_RESPOND=y ./scripts/setup-adapters.sh

- name: Install Github CLI for using apache/infrastructure-actions/stash
run: |
Expand All @@ -61,7 +77,8 @@ jobs:

- name: Build engine
run: |
source /opt/rh/gcc-toolset-12/enable
unset CC && unset CXX
source /opt/rh/gcc-toolset-14/enable
cd presto-native-execution
cmake \
-B _build/release \
Expand All @@ -77,7 +94,6 @@ jobs:
-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 \
Expand Down
Loading