Skip to content

Commit

Permalink
Update .vsts-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored Dec 15, 2024
1 parent fc709d1 commit a924516
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ jobs:
filePath: $(Build.SourcesDirectory)/.ci/test.sh
targetType: filePath
- task: PublishBuildArtifacts@1
condition: and(succeeded(), in(variables['TASK'], 'regular', 'sdist', 'bdist', 'swig'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
condition: >
and(
succeeded(),
in(variables['TASK'], 'regular', 'sdist', 'bdist', 'swig'),
not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
)
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets
Expand Down Expand Up @@ -273,7 +278,12 @@ jobs:
/bin/bash $BUILD_DIRECTORY/docker-script.sh
displayName: 'Setup and run tests'
- task: PublishBuildArtifacts@1
condition: and(succeeded(), in(variables['TASK'], 'bdist'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
condition: >
and(
succeeded(),
in(variables['TASK'], 'bdist'),
not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
)
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets
Expand Down Expand Up @@ -325,7 +335,12 @@ jobs:
filePath: $(Build.SourcesDirectory)/.ci/test.sh
targetType: filePath
- task: PublishBuildArtifacts@1
condition: and(succeeded(), in(variables['TASK'], 'regular', 'bdist', 'swig'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
condition: >
and(
succeeded(),
in(variables['TASK'], 'regular', 'bdist', 'swig'),
not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
)
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets
Expand Down Expand Up @@ -369,7 +384,12 @@ jobs:
cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/test-windows.ps1"
displayName: Test
- task: PublishBuildArtifacts@1
condition: and(succeeded(), in(variables['TASK'], 'regular', 'bdist', 'swig'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
condition: >
and(
succeeded(),
in(variables['TASK'], 'regular', 'bdist', 'swig'),
not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
)
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets
Expand All @@ -388,9 +408,14 @@ jobs:
- script: |
LGB_VER=$(head -n 1 VERSION.txt | sed "s/rc/-/g")
R_LIB_PATH=~/Rlib
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl')"
R_DEPS="c('Depends', 'Imports', 'LinkingTo')"
CRAN_MIRROR="https://cran.rstudio.com"
INSTALLATION_STR="install.packages(${R_LIBS}, lib = '${R_LIB_PATH}', "
INSTALLATION_STR+="dependencies = ${R_DEPS}, repos = '${CRAN_MIRROR}', Ncpus = parallel::detectCores())"
export R_LIBS=${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" || exit 1
RDscript -e "${INSTALLATION_STR}" || exit 1
sh build-cran-package.sh --r-executable=RD || exit 1
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName: 'Build CRAN R-package'
Expand Down

0 comments on commit a924516

Please sign in to comment.