Skip to content

[native] Convert CircleCI jobs for PrestoC++ to Github actions #8

[native] Convert CircleCI jobs for PrestoC++ to Github actions

[native] Convert CircleCI jobs for PrestoC++ to Github actions #8

Workflow file for this run

name: macos-build
on:
workflow_dispatch:
pull_request:
paths:
- 'presto-native-execution/**'
jobs:
macos-build:
runs-on: macos-13
steps:
- uses: actions/[email protected]
- 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
- uses: maxim-lobanov/[email protected]
with:
xcode-version: 15
- name: "Setup MacOS"
run: |
set -xu
mkdir ~/deps ~/deps-src
git clone --depth 1 https://github.com/Homebrew/brew ~/deps
PATH=~/deps/bin:${PATH} DEPENDENCY_DIR=~/deps-src INSTALL_PREFIX=~/deps PROMPT_ALWAYS_RESPOND=n ./presto-native-execution/scripts/setup-macos.sh
# Calculate the prefix path before we delete brew's repos and taps.
rm -rf ~/deps/.git ~/deps/Library/Taps/ # Reduce cache size by 70%.
rm -rf ~/deps-src
- name: "Build presto_cpp on MacOS"
run: |
clang --version
export INSTALL_PREFIX=~/deps
export PATH=~/deps/bin:$(brew --prefix m4)/bin:$(brew --prefix bison)/bin:${PATH}
cd presto-native-execution
cmake -B _build/debug -GNinja -DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
ninja -C _build/debug