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

[WIP] ARROW-15678: [C++][CI] a crossbow job with MinRelSize enabled #12422

Closed
wants to merge 14 commits into from
3 changes: 3 additions & 0 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ elseif("${CMAKE_BUILD_TYPE}" STREQUAL "PROFILE_GEN")
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "PROFILE_BUILD")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_PROFILE_BUILD}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS_PROFILE_BUILD}")
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "MINSIZEREL")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_MINSIZEREL}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS_MINSIZEREL}")
Copy link
Member

Choose a reason for hiding this comment

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

Can you make a separate (presumably minor) PR for this change + the arrow_info() addition?

else()
message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}")
endif()
Expand Down
25 changes: 23 additions & 2 deletions dev/tasks/r/github.macos-linux.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
autobrew:
name: "install from local source"
runs-on: {{ "${{ matrix.os }}" }}
{% if env is defined %}
env:
{% for key, value in env.items() %}
{{ key }}: "{{ value }}"
{% endfor %}
{% endif %}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -62,14 +68,29 @@ jobs:
FORCE_BUNDLED_BUILD: true
LIBARROW_MINIMAL: false
ARROW_R_DEV: TRUE
ARROW_DEPENDENCY_SOURCE: BUNDLED
run: |
cd arrow/r
export CC="$(which gcc-11)"
export CXX="$(which g++-11)"
export CXX11="$(which g++-11)"
${CC} --version
${CXX} --version
${CXX11} --version
mkdir -p ~/.R/
echo "CC=$(which gcc-11)" >> ~/.R/Makevars
echo "CXX=$(which g++-11)" >> ~/.R/Makevars
echo "CXX11=$(which g++-11)" >> ~/.R/Makevars
R CMD config CC
R CMD config CXX11
R CMD INSTALL . --install-tests
- name: Run the tests
run: R -e 'if(tools::testInstalledPackage("arrow") != 0L) stop("There was a test failure.")'
run: |
cd arrow/r
R -s -e 'library(testthat); setwd(file.path(.libPaths()[1], "arrow", "tests")); system.time(test_check("arrow", filter="parquet", reporter=MultiReporter$new(list(CheckReporter$new(), LocationReporter$new()))))'
- name: Dump test logs
run: cat arrow-tests/testthat.Rout*
if: failure()
if: always()
- name: Save the test output
uses: actions/upload-artifact@v2
with:
Expand Down
8 changes: 8 additions & 0 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,14 @@ tasks:
ci: github
template: r/github.linux.offline.build.yml

test-r-minsizerel:
ci: github
template: r/github.macos-linux.local.yml
Copy link
Member Author

Choose a reason for hiding this comment

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

This builds on macos + linux, which isn't strictly necessary for triggering what we're trying to trigger, but might be worth checking both linux + macos anyway

params:
env:
CMAKE_BUILD_TYPE: MinSizeRel
ARROW_R_DEV: TRUE
EXTRA_CMAKE_FLAGS: '-DCMAKE_VERBOSE_MAKEFILE=on'

{% for r_org, r_image, r_tag in [("rhub", "ubuntu-gcc-release", "latest"),
("rocker", "r-base", "latest"),
Expand Down
2 changes: 2 additions & 0 deletions r/tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ verbose_test_output <- identical(tolower(Sys.getenv("ARROW_R_DEV", "false")), "t
identical(tolower(Sys.getenv("ARROW_R_VERBOSE_TEST", "false")), "true")

if (verbose_test_output) {
print(arrow::arrow_info())

arrow_reporter <- MultiReporter$new(list(CheckReporter$new(), LocationReporter$new()))
} else {
arrow_reporter <- check_reporter()
Expand Down