Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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