Skip to content

Commit

Permalink
[chore](be-ut) Fix the issues with BE UT when starting on macOS (#35946)
Browse files Browse the repository at this point in the history
The workflow BE UT (macOS) failed to be started due to missing libjvm.dylib.
See https://github.com/apache/doris/actions/runs/9394949541/job/25873499203
  • Loading branch information
adonis0147 authored Jun 7, 2024
1 parent 4a57f64 commit 555e390
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/be-ut-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
uses: ./.github/actions/ccache-action
with:
key: BE-UT-macOS
max-size: "2G"
max-size: "5G"
restore-keys: BE-UT-macOS-

- name: Run UT ${{ github.ref }}
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.be_changes == 'true' }}
run: |
cellars=(
'm4'
'automake'
'autoconf'
'libtool'
Expand Down Expand Up @@ -95,4 +96,5 @@ jobs:
tar -xvf doris-thirdparty-prebuilt-darwin-x86_64.tar.xz
popd
export JAVA_HOME="${JAVA_HOME_17_X64%\/}"
./run-be-ut.sh --run -j "$(nproc)" --clean
5 changes: 5 additions & 0 deletions run-be-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ done < <(find "${CMAKE_BUILD_DIR}" -name "*gcda")
setup_java_env() {
local java_version

echo "JAVA_HOME: ${JAVA_HOME}"
if [[ -z "${JAVA_HOME}" ]]; then
return 1
fi
Expand All @@ -302,6 +303,10 @@ setup_java_env() {
else
export LD_LIBRARY_PATH="${JAVA_HOME}/lib/${jvm_arch}/server:${JAVA_HOME}/lib/${jvm_arch}:${LD_LIBRARY_PATH}"
fi

if [[ "$(uname -s)" == 'Darwin' ]]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
fi
}

# prepare jvm if needed
Expand Down

0 comments on commit 555e390

Please sign in to comment.