Skip to content

Commit 6933c67

Browse files
thisisnickou
andauthored
GH-47395: [R] Update fedora-clang to install latest clang version to match CRAN setup (#47206)
### Rationale for this change Unnecessary warnings causing noise ### What changes are included in this PR? Suppress warnings ### Are these changes tested? Nope though I'll test on CI once we get a job with the right version of clang created ### Are there any user-facing changes? Well...no. * GitHub Issue: #47395 Lead-authored-by: Nic Crane <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Nic Crane <[email protected]>
1 parent 6faea76 commit 6933c67

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

ci/docker/linux-r.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ ENV R_PRUNE_DEPS=${r_prune_deps}
3333
ARG r_custom_ccache=false
3434
ENV R_CUSTOM_CCACHE=${r_custom_ccache}
3535

36+
ARG r_update_clang=false
37+
ENV R_UPDATE_CLANG=${r_update_clang}
38+
3639
ARG tz="UTC"
3740
ENV TZ=${tz}
3841

ci/scripts/r_docker_configure.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,17 @@ fi
7575
# cmake is now a listed sys req.
7676
$PACKAGE_MANAGER install -y rsync cmake curl
7777

78+
# Update clang version to latest available.
79+
# This is only for rhub/clang20. If we change the base image from rhub/clang20,
80+
# we need to update this part too.
81+
if [ "$R_UPDATE_CLANG" = true ]; then
82+
apt update -y
83+
apt install -y gnupg
84+
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm.gpg
85+
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" > /etc/apt/sources.list.d/llvm20.list
86+
apt update -y
87+
apt install -y clang-20 lld-20
88+
fi
89+
7890
# Workaround for html help install failure; see https://github.com/r-lib/devtools/issues/2084#issuecomment-530912786
7991
Rscript -e 'x <- file.path(R.home("doc"), "html"); if (!file.exists(x)) {dir.create(x, recursive=TRUE); file.copy(system.file("html/R.css", package="stats"), x)}'

dev/tasks/r/github.linux.cran.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
as-cran:
2424
name: "rhub/{{ '${{ matrix.config.r_image }}' }}"
2525
runs-on: ubuntu-latest
26+
timeout-minutes: 45
2627
strategy:
2728
fail-fast: false
2829
matrix:
@@ -32,12 +33,13 @@ jobs:
3233
- { r_image: "ubuntu-clang" } # ~ r-devel-linux-x86_64-debian-clang
3334
- { r_image: "ubuntu-next" } # ~ r-patched-linux-x86_64
3435
- { r_image: "ubuntu-release" } # ~ r-release-linux-x86_64
35-
- { r_image: "clang20", skip_vignettes: true } # ~ r-devel-linux-x86_64-fedora-clang
36+
- { r_image: "clang20", skip_vignettes: true, r_update_clang: true } # ~ r-devel-linux-x86_64-fedora-clang
3637
env:
3738
R_ORG: "rhub"
3839
R_IMAGE: {{ '${{ matrix.config.r_image }}' }}
3940
R_TAG: "latest"
4041
ARROW_R_DEV: "FALSE"
42+
R_UPDATE_CLANG: {{ '${{ matrix.config.r_update_clang }}' }}
4143
steps:
4244
{{ macros.github_checkout_arrow()|indent }}
4345
{{ macros.github_install_archery()|indent }}

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,6 +1631,7 @@ services:
16311631
tz: ${TZ}
16321632
r_prune_deps: ${R_PRUNE_DEPS}
16331633
r_custom_ccache: ${R_CUSTOM_CCACHE}
1634+
r_update_clang: ${R_UPDATE_CLANG}
16341635
shm_size: *shm-size
16351636
environment:
16361637
<<: [*common, *sccache]

r/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ if [ "$_LIBARROW_FOUND" != "false" ] && [ "$_LIBARROW_FOUND" != "" ]; then
402402
set_pkg_vars ${_LIBARROW_FOUND}
403403
fi
404404
else
405-
# To make it easier to debug which code path was taken add a specific
405+
# To make it easier to debug which code path was taken add a specific
406406
# message to the log in addition to the 'NOTE'
407407
echo "*** Failed to find Arrow C++ libraries."
408408
fi

0 commit comments

Comments
 (0)