Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gitlab CI Templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UREP
Outils de développement
Gitlab CI Templates
Commits
ea7387ec
Commit
ea7387ec
authored
2 years ago
by
Astre Benjamin
Browse files
Options
Downloads
Patches
Plain Diff
#9
try for windows R build package
parent
bcca7f4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Many improvments
Pipeline
#79459
passed with warnings
2 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/templates-r.yml
+32
-6
32 additions, 6 deletions
templates/templates-r.yml
tests/.gitlab-ci-runner-tests.yml
+0
-1
0 additions, 1 deletion
tests/.gitlab-ci-runner-tests.yml
with
32 additions
and
7 deletions
templates/templates-r.yml
+
32
−
6
View file @
ea7387ec
...
...
@@ -265,11 +265,11 @@ include:
paths
:
-
${R_PACKAGE_ROOT_RELATIVE_PATH}/build/bin/*.tar.gz
#
TODO voir pour utiliser les cache, install de deps, optionsCi(), etc.
#
Can't reuse other jobs because Powershell doesn't allow the use of variable as command :(
# TODO ne fonctionne pas en version actuelle (voir issue #9), d'où le allow_failure: true
.R-build-windows-binary-package
:
tags
:
-
windows-
cmd-
shell
-
windows-
power
shell
-
stable
image
:
null
extends
:
...
...
@@ -278,20 +278,46 @@ include:
-
.R-install-package-dependencies-withCache
-
.check-git-changes-status-base
variables
:
# Other than 1 value disable package update at beginning of all template jobs
# (1 may be the default value, but this has a very expensive time cost on the CI)
R_DO_PACKAGE_UPDATE
:
0
# MUST be redefined if your package folder isn't the root directory
# of the project repository
R_PACKAGE_ROOT_RELATIVE_PATH
:
.
# This generally doesn't need to be redefined
R_PACKAGE_ROOT_ABSOLUTE_PATH
:
$CI_PROJECT_DIR\$R_PACKAGE_ROOT_RELATIVE_PATH
R_PACKAGE_ROOT_ABSOLUTE_PATH
:
${CI_PROJECT_DIR}\${R_PACKAGE_ROOT_RELATIVE_PATH}
LOCAL_R_LIBS_USER
:
ci/lib
R_LIBS_USER
:
"
${CI_PROJECT_DIR}/${LOCAL_R_LIBS_USER}"
R_LIBS
:
"
${R_LIBS_USER}:/usr/local/lib/R/site-library:/usr/local/lib/R/library"
before_script
:
-
echo $R_LIBS_USER
-
echo $R_LIBS
-
Rscript -e 'if (!dir.exists(Sys.getenv("R_LIBS_USER"))) {dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)}'
-
Rscript -e '.libPaths()'
-
echo "Installing rlang package..."
-
Rscript -e 'utils::install.packages(pkgs = "rlang", repos = "https://cloud.r-project.org")'
-
echo "Installing devtools package..."
-
Rscript -e 'if (!rlang::is_installed(pkg = "devtools")) {utils::install.packages(pkgs = "devtools", repos = "https://cloud.r-project.org")}'
-
echo "Installing citoolsr package..."
-
Rscript -e 'devtools::install_gitlab(repo = "urep/dev_utils/r_utils/citoolsr", host = "https://forgemia.inra.fr")'
script
:
-
cd $R_PACKAGE_ROOT_ABSOLUTE_PATH
-
!reference
[
.R-install-package-dependencies-withCache
,
script
]
-
cd ${R_PACKAGE_ROOT_ABSOLUTE_PATH}
-
Rscript -e 'citoolsr::updatePackages(doUpdate = Sys.getenv("R_DO_PACKAGE_UPDATE"))'
-
Rscript -e 'citoolsr::installDepsWithErrManagementCi(doUpgrades = TRUE, warningsAsErrors = TRUE, errorExpected = Sys.getenv("TEST_ERROR"))'
-
mkdir ${R_PACKAGE_ROOT_ABSOLUTE_PATH}
-
mkdir ${R_PACKAGE_ROOT_ABSOLUTE_PATH}/build
-
mkdir ${R_PACKAGE_ROOT_ABSOLUTE_PATH}/build/bin
-
echo '*** Build package... ***'
# Build binary package
-
$R_RUN_CODE_COMMAND
'citoolsr::setOptionsForCi(); devtools::build(path = file.path(Sys.getenv("R_PACKAGE_ROOT_ABSOLUTE_PATH"), "build", "bin"), binary = TRUE)'
-
Rscript -e
'citoolsr::setOptionsForCi(); devtools::build(path = file.path(Sys.getenv("R_PACKAGE_ROOT_ABSOLUTE_PATH"), "build", "bin"), binary = TRUE)'
-
echo "Checking if all is correctly managed with git (no versioned item modified, no not versioned item, etc)..."
-
!reference
[
.check-git-changes-status-base
,
script
]
artifacts
:
paths
:
-
${R_PACKAGE_ROOT_RELATIVE_PATH}/build/bin/*.zip
cache
:
-
key
:
R-installed-packages-cache
paths
:
-
"
${LOCAL_R_LIBS_USER}"
policy
:
pull-push
allow_failure
:
true
This diff is collapsed.
Click to expand it.
tests/.gitlab-ci-runner-tests.yml
+
0
−
1
View file @
ea7387ec
...
...
@@ -201,7 +201,6 @@ Test runner clt-dgilmour-p Windows PowerShell:
# Allow failure because this PC is not always connected
allow_failure
:
true
# TODO ne fonctionne pas en version actuelle (voir issue #9)
Test runner clt-dgilmour-p Windows PowerShell R available
:
extends
:
-
.rules-template
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment