Skip to content

Commit 27982a3

Browse files
yannrichetCopilot
andcommitted
Fix CI: adapt to libKriging .travis-ci/ → tools/ rename
The libKriging submodule (PR#314) renamed .travis-ci/ to tools/. This broke the R package build because tools/build.sh could not find the CI scripts directory. Changes: - tools/build.sh: detect tools/common (new) before falling back to travis-ci (legacy) for CI scripts directory - tools/setup.sh: only run .travis-ci rename+sed when directory actually exists; skip cleanly for new layout - install_github.yml: install remotes alongside devtools, since devtools 2.5.0 requires it for install_github() Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 18196cc commit 27982a3

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/install_github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
fi
6363
# Add --insecure to workaround missing certificates on Windows
6464
curl --insecure --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -LO "https://raw.githubusercontent.com/libKriging/rlibkriging/${REF}/tools/install_packages.R"
65-
Rscript --no-save ./install_packages.R devtools
65+
Rscript --no-save ./install_packages.R remotes devtools
6666
6767
- name: install_github (with tag)
6868
if: github.ref_type == 'tag'

tools/build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ if test -z "${R_HOME}"; then
2020
as_fn_error $? "Could not determine R_HOME." "$LINENO" 5
2121
fi
2222

23-
# Static libKriging build (using libK/.ci)
23+
# Static libKriging build (using libK CI scripts)
2424
cd src/libK
25-
CI=`ls -a | grep travis-ci`
25+
# Find CI scripts directory: 'tools' (new name since libKriging PR#314), or '.travis-ci'/'travis-ci' (legacy)
26+
if [ -d tools/common ]; then
27+
CI=tools
28+
else
29+
CI=`ls -a | grep travis-ci`
30+
fi
2631
echo "CI: "$CI
2732

2833
{
@@ -73,7 +78,7 @@ fi
7378
BUILD_TEST=false \
7479
MODE=Release \
7580
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS:-} -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=${MAKE_SHARED_LIBS} -DSTATIC_LIB=${STATIC_LIB} -DEXTRA_SYSTEM_LIBRARY_PATH=${EXTRA_SYSTEM_LIBRARY_PATH}" \
76-
$CI/linux-macos/build.sh # should support '.travis-ci' or 'travis-ci'"
81+
$CI/linux-macos/build.sh
7782

7883
# Clean up CMake temp directories immediately after build
7984
find /tmp -maxdepth 1 -name "tmp.*" -type d -user $(id -u) -mmin -10 2>/dev/null | while read dir; do

tools/setup.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,12 @@ echo "Renaming hidden files for CRAN compliance..."
233233
if [ -d $LIBKRIGING_SRC_PATH/.travis-ci ]; then
234234
echo " → Renaming .travis-ci to travis-ci..."
235235
mv $LIBKRIGING_SRC_PATH/.travis-ci $LIBKRIGING_SRC_PATH/travis-ci
236+
# rename .travis-ci in travis-ci everywhere. Use temp .bak for sed OSX compliance
237+
echo " → Updating .travis-ci references in shell scripts..."
238+
find $LIBKRIGING_SRC_PATH -type f -name *.sh -exec sed -i.bak "s/\.travis-ci/travis-ci/g" {} +
239+
else
240+
echo " ✓ No .travis-ci directory (already renamed to tools/)"
236241
fi
237-
# rename .travis-ci in travis-ci everywhere. Use temp .bak for sed OSX compliance
238-
echo " → Updating .travis-ci references in shell scripts..."
239-
find $LIBKRIGING_SRC_PATH -type f -name *.sh -exec sed -i.bak "s/\.travis-ci/travis-ci/g" {} +
240242
echo " → Removing git rev-parse dependencies..."
241243
# remove usages of 'git rev-parse', which is not a standard requirement fo R
242244
GIT_ROOT=$(pwd);

0 commit comments

Comments
 (0)