Skip to content

Commit

Permalink
Test build with ucrt64 toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed May 10, 2021
1 parent 68ca542 commit 44bd33b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-svn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
strategy:
fail-fast: false
matrix:
WIN: [ 32, 64 ]
toolchain: [ mingw32, mingw64, ucrt64 ]
steps:

- name: Prepare git
Expand All @@ -131,7 +131,7 @@ jobs:

- name: Build and Check
env:
WIN: ${{matrix.WIN}}
toolchain: ${{matrix.toolchain}}
run: C:\rtools40\usr\bin\bash --login -c "$(cygpath ${env:GITHUB_WORKSPACE})/.github/workflows/rtools40-build.sh"

- name: Print failed tests
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/rtools40-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,36 @@ set -x
# Absolute path to this script
srcdir=$(dirname $(realpath $0))

# Substitute some ucrt64 specific inputs
if [ "$toolchain" = "ucrt64" ]; then
sed -i 's|/mingw64|/ucrt64|g' "${srcdir}/MkRules.local.in"
sed -i 's|/mingw64|/ucrt64|g' "${srcdir}/create-tcltk-bundle.sh"
sed -i 's|x86_64|ucrt-x86_64|g' "${srcdir}/create-tcltk-bundle.sh"
fi

# Temp fix for older rtools40 installations
if ! grep -Fxq "ucrt64" /etc/pacman.conf; then
echo "[ucrt64]" >> /etc/pacman.conf
echo "Server = https://cloud.r-project.org/bin/windows/Rtools/4.0/ucrt64/" >> /etc/pacman.conf
echo "SigLevel = Never" >> /etc/pacman.conf
fi

# Get architecture
case ${toolchain} in
mingw32)
_arch=i686
WIN=32
;;
mingw64)
_arch=x86_64
WIN=64
;;
ucrt64)
_arch=ucrt-x86_64
WIN=64
;;
esac

# Put pdflatex on the path (needed only for CMD check)
export PATH="$PATH:/c/progra~1/git/bin:/c/progra~1/MiKTeX/miktex/bin/x64"
echo "PATH: $PATH"
Expand All @@ -27,8 +57,8 @@ curl -sSL https://curl.haxx.se/ca/cacert.pem > etc/curl-ca-bundle.crt
./.github/workflows/svn-info.sh

# Install system libs
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-{i686,x86_64}-{gcc,gcc-fortran,icu,libtiff,libjpeg,libpng,pcre2,xz,bzip2,zlib,cairo,tk,curl}
pacman -Sy --noconfirm
pacman -S --needed --noconfirm mingw-w64-${_arch}-{gcc,gcc-fortran,icu,libtiff,libjpeg,libpng,pcre2,xz,bzip2,zlib,cairo,tk,curl}

# Create the TCL bundle required by tcltk package
mkdir -p Tcl/{bin,bin64,lib,lib64}
Expand Down

0 comments on commit 44bd33b

Please sign in to comment.