[ci] move Solaris and valgrind test steps into scripts (#4503)

* [ci] move Solaris and valgrind test steps into scripts

* Update .github/workflows/r_solaris.yml

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* relatiev paths

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
This commit is contained in:
James Lamb 2021-08-10 13:18:37 +01:00 коммит произвёл GitHub
Родитель 16aa010f08
Коммит 926526c838
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 18 добавлений и 15 удалений

13
.ci/test_r_package_solaris.sh Executable file
Просмотреть файл

@ -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

Просмотреть файл

@ -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"

10
.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: |

6
.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