Skip to content
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
4 changes: 3 additions & 1 deletion ci/scripts/r_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ build_dir=${2}

pushd ${source_dir}

${R_BIN} CMD INSTALL ${INSTALL_ARGS} .
# build first so that any stray compiled files in r/src are ignored
${R_BIN} CMD build .
${R_BIN} CMD INSTALL ${INSTALL_ARGS} arrow*.tar.gz

if [ "${BUILD_DOCS_R}" == "ON" ]; then
${R_BIN} -e "pkgdown::build_site(install = FALSE)"
Expand Down
5 changes: 4 additions & 1 deletion ci/scripts/r_sanitize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export CMAKE_BUILD_TYPE=RelWithDebInfo
ncores=$(${R_BIN} -s -e 'cat(parallel::detectCores())')
echo "MAKEFLAGS=-j${ncores}" >> ${rhome}/etc/Renviron.site

${R_BIN} CMD INSTALL ${INSTALL_ARGS} .
# build first so that any stray compiled files in r/src are ignored
${R_BIN} CMD build .
${R_BIN} CMD INSTALL ${INSTALL_ARGS} arrow*.tar.gz

# But unset the env var so that it doesn't cause us to run extra dev tests
unset ARROW_R_DEV

Expand Down
11 changes: 9 additions & 2 deletions ci/scripts/r_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ source_dir=${1}/r

export CMAKE_BUILD_TYPE=RelWithDebInfo

${R_BIN} CMD INSTALL ${INSTALL_ARGS} ${source_dir}
pushd ${source_dir}/tests
pushd ${source_dir}

# build first so that any stray compiled files in r/src are ignored
${R_BIN} CMD build .
${R_BIN} CMD INSTALL ${INSTALL_ARGS} arrow*.tar.gz

pushd tests

# to generate suppression files run:
# ${R_BIN} --vanilla -d "valgrind --tool=memcheck --leak-check=full --track-origins=yes --gen-suppressions=all --log-file=memcheck.log" -f testtthat.supp
Expand All @@ -44,3 +49,5 @@ fi
# https://github.com/microsoft/LightGBM/blob/fa6d356555f9ef888acf5f5e259dca958ca24f6d/.ci/test_r_package_valgrind.sh#L20-L85

popd

popd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo or is it needed again here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are popds even needed here? My assumption is shell scripts don't influence the state after completing.

Copy link
Member Author

@jonkeane jonkeane Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added another pushd up above, so I added this down here to match the flow — but you're right that this shouldn't change the state or anything so is probably not needed.

4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ volumes:
name: python-wheel-windows-clcache
ubuntu-ccache:
name: ${ARCH}-ubuntu-${UBUNTU}-ccache

services:

################################# C++ #######################################
Expand Down Expand Up @@ -1226,6 +1226,7 @@ services:
r_prune_deps: ${R_PRUNE_DEPS}
environment:
<<: *ccache
ARROW_SOURCE_HOME: "/arrow"
volumes: *ubuntu-volumes
command: >
/bin/bash -c "
Expand Down Expand Up @@ -1287,6 +1288,7 @@ services:
# AVX512 not supported by Valgrind (similar to ARROW-9851) some runners support AVX512 and some do not
# so some build might pass without this setting, but we want to ensure that we stay to AVX2 regardless of runner.
EXTRA_CMAKE_FLAGS: "-DARROW_RUNTIME_SIMD_LEVEL=AVX2"
ARROW_SOURCE_HOME: "/arrow"
volumes: *ubuntu-volumes
command: >
/bin/bash -c "
Expand Down