diff --git a/.ci/test_r_package_solaris.sh b/.ci/test_r_package_solaris.sh new file mode 100755 index 000000000000..bf051476a011 --- /dev/null +++ b/.ci/test_r_package_solaris.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +sh build-cran-package.sh || exit -1 + +apt-get install --no-install-recommends -y \ + libcurl4-openssl-dev \ + libxml2-dev \ + libssl-dev + +log_file="rhub_logs.txt" +Rscript -e "install.packages('rhub', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" || exit -1 + +Rscript ./.ci/run_rhub_solaris_checks.R lightgbm_*.tar.gz $log_file || exit -1 diff --git a/.ci/test_r_package_valgrind.sh b/.ci/test_r_package_valgrind.sh index f17b3bc8b9be..2a6ce8dc7f9a 100755 --- a/.ci/test_r_package_valgrind.sh +++ b/.ci/test_r_package_valgrind.sh @@ -1,5 +1,9 @@ #!/bin/bash +RDscriptvalgrind -e "install.packages(c('R6', 'data.table', 'jsonlite', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" || exit -1 +sh build-cran-package.sh || exit -1 +RDvalgrind CMD INSTALL --preclean --install-tests lightgbm_*.tar.gz || exit -1 + cd R-package/tests ALL_LOGS_FILE="out.log" diff --git a/.github/workflows/r_solaris.yml b/.github/workflows/r_solaris.yml index a297338ba2f6..ee1a581c23b5 100644 --- a/.github/workflows/r_solaris.yml +++ b/.github/workflows/r_solaris.yml @@ -37,15 +37,7 @@ jobs: "Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}" - name: Run tests on Solaris shell: bash - run: | - sh build-cran-package.sh || exit -1 - apt-get install --no-install-recommends -y \ - libcurl4-openssl-dev \ - libxml2-dev \ - libssl-dev - log_file="$GITHUB_WORKSPACE/rhub_logs.txt" - Rscript -e "install.packages('rhub', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" - Rscript $GITHUB_WORKSPACE/.ci/run_rhub_solaris_checks.R $(pwd)/lightgbm_*.tar.gz $log_file || exit -1 + run: ./.ci/test_r_package_solaris.sh - name: Send final status if: ${{ always() }} run: | diff --git a/.github/workflows/r_valgrind.yml b/.github/workflows/r_valgrind.yml index 866faedf29cd..ff37c212a7eb 100644 --- a/.github/workflows/r_valgrind.yml +++ b/.github/workflows/r_valgrind.yml @@ -35,12 +35,6 @@ jobs: $GITHUB_WORKSPACE/.ci/append_comment.sh \ "${{ github.event.client_payload.comment_number }}" \ "Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}" - - name: Install packages - shell: bash - run: | - RDscriptvalgrind -e "install.packages(c('R6', 'data.table', 'jsonlite', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" - sh build-cran-package.sh - RDvalgrind CMD INSTALL --preclean --install-tests lightgbm_*.tar.gz || exit -1 - name: Run tests with valgrind shell: bash run: ./.ci/test_r_package_valgrind.sh