Skip to content

Commit

Permalink
[ci] move Solaris and valgrind test steps into scripts (#4503)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
jameslamb and StrikerRUS authored Aug 10, 2021
1 parent 16aa010 commit 926526c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
13 changes: 13 additions & 0 deletions .ci/test_r_package_solaris.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .ci/test_r_package_valgrind.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/r_solaris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/r_valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 926526c

Please sign in to comment.