Skip to content

Commit

Permalink
ARROW-11926: [R] Add ucrt64 binaries and fix CI
Browse files Browse the repository at this point in the history
The R project is experimenting with a new ucrt toolchain. This prepares us by adding ucrt64 binaries to the windows bundle.

Closes apache#10372 from jeroen/test-ucrt

Lead-authored-by: Jeroen Ooms <jeroenooms@gmail.com>
Co-authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
  • Loading branch information
2 people authored and michalursa committed Jun 13, 2021
1 parent db87f41 commit f26749a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ci/scripts/r_windows_build.sh
Expand Up @@ -26,11 +26,6 @@ export ARROW_HOME="$(cd "${ARROW_HOME}" && pwd)"
if [ "$RTOOLS_VERSION" = "35" ]; then
# Use rtools-backports if building with rtools35
curl https://raw.githubusercontent.com/r-windows/rtools-backports/master/pacman.conf > /etc/pacman.conf
# Update keys: https://www.msys2.org/news/#2020-06-29-new-packagers
msys2_repo_base_url=https://repo.msys2.org/msys
curl -OSsL "${msys2_repo_base_url}/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz && rm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
pacman --noconfirm -Scc
pacman --noconfirm -Syy
# lib-4.9.3 is for libraries compiled with gcc 4.9 (Rtools 3.5)
RWINLIB_LIB_DIR="lib-4.9.3"
Expand All @@ -43,6 +38,7 @@ else

pacman --noconfirm -Syy
RWINLIB_LIB_DIR="lib"
export MINGW_ARCH="mingw32 mingw64 ucrt64"
fi

cp $ARROW_HOME/ci/scripts/PKGBUILD .
Expand All @@ -64,7 +60,7 @@ MSYS_LIB_DIR="/c/rtools40"
ls $MSYS_LIB_DIR/mingw64/lib/
ls $MSYS_LIB_DIR/mingw32/lib/

# Untar the two builds we made
# Untar the three builds we made
ls *.xz | xargs -n 1 tar -xJf
mkdir -p $DST_DIR
# Grab the headers from one, either one is fine
Expand Down Expand Up @@ -94,6 +90,14 @@ cp $MSYS_LIB_DIR/mingw32/lib/lib{thrift,snappy}.a $DST_DIR/${RWINLIB_LIB_DIR}/i3
cp $MSYS_LIB_DIR/mingw64/lib/lib{zstd,lz4,crypto,utf8proc,re2,aws*}.a $DST_DIR/lib/x64
cp $MSYS_LIB_DIR/mingw32/lib/lib{zstd,lz4,crypto,utf8proc,re2,aws*}.a $DST_DIR/lib/i386

# Do the same also for ucrt64
if [ "$RTOOLS_VERSION" != "35" ]; then
ls $MSYS_LIB_DIR/ucrt64/lib/
mkdir -p $DST_DIR/lib/x64-ucrt
mv ucrt64/lib/*.a $DST_DIR/${RWINLIB_LIB_DIR}/x64-ucrt
cp $MSYS_LIB_DIR/ucrt64/lib/lib{zstd,lz4,crypto,utf8proc,re2,aws*}.a $DST_DIR/lib/x64-ucrt
fi

# Create build artifact
zip -r ${DST_DIR}.zip $DST_DIR

Expand Down

0 comments on commit f26749a

Please sign in to comment.