From 3678829e9eabb5f24ecfbcef268c95fc67179099 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 25 Mar 2020 14:36:08 -0500 Subject: [PATCH] minor fixes --- .appveyor.yml | 15 ++--- .ci/test_r_package_windows.ps1 | 1 + .ci/test_windows.ps1 | 1 + .vsts-ci.yml | 100 ++++++++++++++++----------------- CMakeLists.txt | 2 - 5 files changed, 58 insertions(+), 61 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 63651fb9f1b7..d9697f4fec2b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,16 +7,13 @@ configuration: # a trick to construct a build matrix with multiple Python versi environment: matrix: - - COMPILER: MSVC - TASK: appveyor-python - CONDA_ENV: test-env + - COMPILER: MSVC + TASK: appveyor-python + CONDA_ENV: test-env + - COMPILER: MINGW + TASK: appveyor-python + CONDA_ENV: test-env - COMPILER: MINGW - TASK: appveyor-python - CONDA_ENV: test-env - - COMPILER: MINGW - TASK: r-package - R_WINDOWS_VERSION: 3.6.3 - - COMPILER: MSVC TASK: r-package R_WINDOWS_VERSION: 3.6.3 diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index b416cae9eb11..2484ad9fe3ad 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -83,4 +83,5 @@ if (Get-Content "$LOG_FILE_NAME" | Select-String -Pattern "WARNING" -Quiet) { Check-Output $False } +Write-Output "success" Exit 0 diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index e724be4cc48b..0fdc8a084c4c 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -14,6 +14,7 @@ if (Test-Path env:APPVEYOR) { if ($env:TASK -eq "r-package") { & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? Exit 0 + Write-Output "Success" } # setup for Python diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 6996e2dd19db..4c9601392e52 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -122,12 +122,12 @@ jobs: regular: TASK: regular PYTHON_VERSION: 3.7 - sdist: - TASK: sdist - PYTHON_VERSION: 2.7 - bdist: - TASK: bdist - PYTHON_VERSION: 3.5 + sdist: + TASK: sdist + PYTHON_VERSION: 2.7 + bdist: + TASK: bdist + PYTHON_VERSION: 3.5 rpkg: TASK: r-package R_WINDOWS_VERSION: 3.6.3 @@ -148,47 +148,47 @@ jobs: ########################################### - job: Package ########################################### - dependsOn: - - Linux - - MacOS - - Windows - condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) - pool: - vmImage: 'vs2017-win2016' - steps: - # Download all agent packages from all previous phases - - task: DownloadBuildArtifacts@0 - displayName: Download package assets - inputs: - artifactName: PackageAssets - downloadPath: $(Build.SourcesDirectory)/binaries - - script: | - python %BUILD_SOURCESDIRECTORY%/.nuget/create_nuget.py %BUILD_SOURCESDIRECTORY%/binaries/PackageAssets - displayName: 'Create NuGet configuration files' - - task: NuGetCommand@2 - inputs: - command: pack - packagesToPack: '$(Build.SourcesDirectory)/.nuget/*.nuspec' - packDestination: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: NuGet - artifactType: container - - task: GitHubRelease@0 - displayName: 'Create GitHub Release' - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) - inputs: - gitHubConnection: guolinke - repositoryName: '$(Build.Repository.Name)' - action: 'create' - target: '$(Build.SourceVersion)' - tagSource: 'auto' - title: '$(Build.SourceBranchName)' - assets: | - $(Build.SourcesDirectory)/binaries/PackageAssets/* - $(Build.ArtifactStagingDirectory)/*.nupkg - assetUploadMode: 'delete' - isDraft: true - isPreRelease: false - addChangeLog: false + dependsOn: + - Linux + - MacOS + - Windows + condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) + pool: + vmImage: 'vs2017-win2016' + steps: + # Download all agent packages from all previous phases + - task: DownloadBuildArtifacts@0 + displayName: Download package assets + inputs: + artifactName: PackageAssets + downloadPath: $(Build.SourcesDirectory)/binaries + - script: | + python %BUILD_SOURCESDIRECTORY%/.nuget/create_nuget.py %BUILD_SOURCESDIRECTORY%/binaries/PackageAssets + displayName: 'Create NuGet configuration files' + - task: NuGetCommand@2 + inputs: + command: pack + packagesToPack: '$(Build.SourcesDirectory)/.nuget/*.nuspec' + packDestination: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: NuGet + artifactType: container + - task: GitHubRelease@0 + displayName: 'Create GitHub Release' + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) + inputs: + gitHubConnection: guolinke + repositoryName: '$(Build.Repository.Name)' + action: 'create' + target: '$(Build.SourceVersion)' + tagSource: 'auto' + title: '$(Build.SourceBranchName)' + assets: | + $(Build.SourcesDirectory)/binaries/PackageAssets/* + $(Build.ArtifactStagingDirectory)/*.nupkg + assetUploadMode: 'delete' + isDraft: true + isPreRelease: false + addChangeLog: false diff --git a/CMakeLists.txt b/CMakeLists.txt index b28fade32694..a651cfbdf62c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,10 +310,8 @@ endif() if(BUILD_FOR_R) if(MSVC) # https://docs.microsoft.com/en-us/cpp/build/reference/link-input-files?redirectedfrom=MSDN&view=vs-2019 - TARGET_LINK_LIBRARIES(lightgbm ${CMAKE_CURRENT_BINARY_DIR}/R.lib) TARGET_LINK_LIBRARIES(_lightgbm ${CMAKE_CURRENT_BINARY_DIR}/R.lib) else() - TARGET_LINK_LIBRARIES(lightgbm ${LIBR_CORE_LIBRARY}) TARGET_LINK_LIBRARIES(_lightgbm ${LIBR_CORE_LIBRARY}) endif() endif(BUILD_FOR_R)