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

Conversation

jameslamb
Copy link
Collaborator

#3946 introduces two new Suggests-level dependencies for the R package.

To run the Solaris and valgrind tests successfully, those dependencies need to be added to the jobs for those tests (https://github.com/microsoft/LightGBM/blob/master/.github/workflows/r_solaris.yml and https://github.com/microsoft/LightGBM/blob/master/.github/workflows/r_valgrind.yml).

This creates an interesting challenge. Right now changes like that need to be made in the workflow files in .github/workflows/, but when those jobs are triggered by comments they source those configs from master (#4397 (comment)).

This PR proposes moving more of the logic for those checks into scripts in .ci/. That will make it possible to test the following types of changes to the Solaris and valgrind jobs before merging them:

  • adding or removing dependencies installed with install.packages()
  • changing arguments to install.packages() (e.g. [ci] parallelize R package installs in CI jobs #4198)
  • changing apt-get install'd dependencies for the Solaris checks
  • changing arguments passed to Rdvalgrind CMD INSTALL in the valgrind checks

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really useful refactoring! Thanks!

Please check my initial comments below.

libxml2-dev \
libssl-dev

log_file="$GITHUB_WORKSPACE/rhub_logs.txt"
Copy link
Collaborator

@StrikerRUS StrikerRUS Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to not use CI service dependable env variables in bash scripts (try to search for GITHUB_WORKSPACE: it is used only in config yml files).

I guess we can switch to relative paths here just like in test_r_package_valgrind.sh

ALL_LOGS_FILE="out.log"
VALGRIND_LOGS_FILE="valgrind-logs.log"
RDvalgrind \
--no-readline \
--vanilla \
-d "valgrind --tool=memcheck --leak-check=full --track-origins=yes" \
-f testthat.R \
> ${ALL_LOGS_FILE} 2>&1 || exit -1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point! fixed in 10deff6

.github/workflows/r_solaris.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's check these changes in a next PR.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants