Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sudo in setup scripts #8943

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
pull_request:
paths:
- ".github/workflows/scheduled.yml"
- scripts/*

schedule:
- cron: '0 3 * * *'
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: cd velox && source ./scripts/setup-ubuntu.sh
run: cd velox && sudo ./scripts/setup-ubuntu.sh

- name: "Build"
run: |
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download presto fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -173,7 +174,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download spark expression fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -247,7 +248,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download aggregation fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -288,7 +289,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download join fuzzer
uses: actions/download-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion scripts/setup-helper-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function cmake_install {
mkdir -p "${BINARY_DIR}"
CPU_TARGET="${CPU_TARGET:-unknown}"
COMPILER_FLAGS=$(get_cxx_flags $CPU_TARGET)
SUDO="${SUDO:-""}"

# CMAKE_POSITION_INDEPENDENT_CODE is required so that Velox can be built into dynamic libraries \
cmake -Wno-dev -B"${BINARY_DIR}" \
Expand All @@ -169,6 +170,6 @@ function cmake_install {
-DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" \
-DBUILD_TESTING=OFF \
"$@"
ninja -C "${BINARY_DIR}" install
${SUDO} ninja -C "${BINARY_DIR}" install
}

1 change: 1 addition & 0 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ BOOST_VERSION=boost-1.84.0
NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
export CMAKE_BUILD_TYPE=Release
export SUDO=sudo

# Install all velox and folly dependencies.
# The is an issue on 22.04 where a version conflict prevents glog install,
Expand Down
Loading