Unverified Commit 226e7f7d authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] fix errors about indentation in yaml files (Part 2) (#6789)

parent 7679c735
...@@ -3,10 +3,10 @@ name: CUDA Version ...@@ -3,10 +3,10 @@ name: CUDA Version
on: on:
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# Run manually by clicking a button in the UI # Run manually by clicking a button in the UI
workflow_dispatch: workflow_dispatch:
inputs: inputs:
...@@ -130,7 +130,7 @@ jobs: ...@@ -130,7 +130,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test] needs: [test]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
uses: re-actors/alls-green@v1.2.2 uses: re-actors/alls-green@v1.2.2
with: with:
jobs: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }}
...@@ -3,10 +3,10 @@ name: Python-package ...@@ -3,10 +3,10 @@ name: Python-package
on: on:
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# automatically cancel in-progress builds if another commit is pushed # automatically cancel in-progress builds if another commit is pushed
concurrency: concurrency:
...@@ -147,7 +147,7 @@ jobs: ...@@ -147,7 +147,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test, test-latest-versions, test-oldest-versions] needs: [test, test-latest-versions, test-oldest-versions]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
uses: re-actors/alls-green@v1.2.2 uses: re-actors/alls-green@v1.2.2
with: with:
jobs: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }}
...@@ -3,10 +3,10 @@ name: R-package ...@@ -3,10 +3,10 @@ name: R-package
on: on:
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# automatically cancel in-progress builds if another commit is pushed # automatically cancel in-progress builds if another commit is pushed
concurrency: concurrency:
...@@ -358,7 +358,7 @@ jobs: ...@@ -358,7 +358,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test, test-r-sanitizers, test-r-extra-checks] needs: [test, test-r-sanitizers, test-r-extra-checks]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
uses: re-actors/alls-green@v1.2.2 uses: re-actors/alls-green@v1.2.2
with: with:
jobs: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }}
...@@ -5,10 +5,10 @@ name: Static Analysis ...@@ -5,10 +5,10 @@ name: Static Analysis
on: on:
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# automatically cancel in-progress builds if another commit is pushed # automatically cancel in-progress builds if another commit is pushed
concurrency: concurrency:
...@@ -88,7 +88,7 @@ jobs: ...@@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test, r-check-docs] needs: [test, r-check-docs]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
uses: re-actors/alls-green@v1.2.2 uses: re-actors/alls-green@v1.2.2
with: with:
jobs: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }}
...@@ -11,24 +11,24 @@ jobs: ...@@ -11,24 +11,24 @@ jobs:
env: env:
SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }} SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 5 fetch-depth: 5
submodules: false submodules: false
- name: Trigger R valgrind tests - name: Trigger R valgrind tests
if: github.event.comment.body == '/gha run r-valgrind' if: github.event.comment.body == '/gha run r-valgrind'
run: | run: |
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ $GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \
"${{ github.event.issue.pull_request.url }}" \ "${{ github.event.issue.pull_request.url }}" \
"${{ github.event.comment.id }}" \ "${{ github.event.comment.id }}" \
"gha_run_r_valgrind" "gha_run_r_valgrind"
- name: Trigger update R configure - name: Trigger update R configure
if: github.event.comment.body == '/gha run r-configure' if: github.event.comment.body == '/gha run r-configure'
run: | run: |
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ $GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \
"${{ github.event.issue.pull_request.url }}" \ "${{ github.event.issue.pull_request.url }}" \
"${{ github.event.comment.id }}" \ "${{ github.event.comment.id }}" \
"gha_run_r_configure" "gha_run_r_configure"
trigger: trigger:
branches: branches:
include: include:
- master - master
tags: tags:
include: include:
- v* - v*
pr: pr:
- master - master
variables: variables:
AZURE: 'true' AZURE: 'true'
CMAKE_BUILD_PARALLEL_LEVEL: 4 CMAKE_BUILD_PARALLEL_LEVEL: 4
...@@ -26,458 +26,458 @@ resources: ...@@ -26,458 +26,458 @@ resources:
# to minimize the risk of side effects from one run affecting future runs. # to minimize the risk of side effects from one run affecting future runs.
# ref: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-containers-container # ref: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-containers-container
containers: containers:
- container: linux-artifact-builder - container: linux-artifact-builder
image: lightgbm/vsts-agent:manylinux_2_28_x86_64 image: lightgbm/vsts-agent:manylinux_2_28_x86_64
mountReadOnly: mountReadOnly:
work: false work: false
externals: true externals: true
tools: true tools: true
tasks: true tasks: true
- container: ubuntu-latest - container: ubuntu-latest
image: 'ubuntu:22.04' image: 'ubuntu:22.04'
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro" options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
mountReadOnly: mountReadOnly:
work: false work: false
externals: true externals: true
tools: true tools: true
tasks: true tasks: true
- container: rbase - container: rbase
image: wch1/r-debug image: wch1/r-debug
mountReadOnly: mountReadOnly:
work: false work: false
externals: true externals: true
tools: true tools: true
tasks: true tasks: true
jobs: jobs:
########################################### ###########################################
- job: Maintenance - job: Maintenance
########################################### ###########################################
pool: mariner-20240410-0 pool: mariner-20240410-0
container: ubuntu-latest container: ubuntu-latest
# routine maintenance (like periodically deleting old files), # routine maintenance (like periodically deleting old files),
# to be run on 1 random CI runner in the self-hosted pool each runner # to be run on 1 random CI runner in the self-hosted pool each runner
steps: steps:
- script: | - script: |
print-diagnostics(){ print-diagnostics(){
echo "---- df -h -m ----" echo "---- df -h -m ----"
df -h -m df -h -m
echo "---- docker system df ----" echo "---- docker system df ----"
/tmp/docker system df /tmp/docker system df
echo "---- docker images ----" echo "---- docker images ----"
/tmp/docker images /tmp/docker images
} }
# check disk usage # check disk usage
print-diagnostics print-diagnostics
# remove old containers, container images, volumes # remove old containers, container images, volumes
# ref: https://stackoverflow.com/a/32723127/3986677 # ref: https://stackoverflow.com/a/32723127/3986677
# ref: https://depot.dev/blog/docker-clear-cache#removing-everything-with-docker-system-prune # ref: https://depot.dev/blog/docker-clear-cache#removing-everything-with-docker-system-prune
echo "---- running 'docker system prune' ----" echo "---- running 'docker system prune' ----"
/tmp/docker system prune \ /tmp/docker system prune \
--all \ --all \
--force \ --force \
--volumes \ --volumes \
--filter until=720h --filter until=720h
# check disk usage again # check disk usage again
print-diagnostics print-diagnostics
displayName: Clean displayName: Clean
########################################### ###########################################
- job: Linux - job: Linux
########################################### ###########################################
variables: variables:
COMPILER: gcc COMPILER: gcc
SETUP_CONDA: 'false' SETUP_CONDA: 'false'
OS_NAME: 'linux' OS_NAME: 'linux'
PRODUCES_ARTIFACTS: 'true' PRODUCES_ARTIFACTS: 'true'
pool: mariner-20240410-0 pool: mariner-20240410-0
container: linux-artifact-builder container: linux-artifact-builder
strategy: strategy:
matrix: matrix:
regular: regular:
TASK: regular TASK: regular
PYTHON_VERSION: '3.10' PYTHON_VERSION: '3.10'
sdist: sdist:
TASK: sdist TASK: sdist
PYTHON_VERSION: '3.8' PYTHON_VERSION: '3.8'
bdist: bdist:
TASK: bdist TASK: bdist
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
inference: inference:
TASK: if-else TASK: if-else
mpi_source: mpi_source:
TASK: mpi TASK: mpi
METHOD: source METHOD: source
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
gpu_source: gpu_source:
TASK: gpu TASK: gpu
METHOD: source METHOD: source
swig: swig:
TASK: swig TASK: swig
steps: steps:
- script: | - script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
echo "##vso[task.prependpath]/usr/lib64/openmpi/bin" echo "##vso[task.prependpath]/usr/lib64/openmpi/bin"
echo "##vso[task.prependpath]$CONDA/bin" echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Set variables' displayName: 'Set variables'
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- script: | - script: |
echo '$(Build.SourceVersion)' > '$(Build.ArtifactStagingDirectory)/commit.txt' echo '$(Build.SourceVersion)' > '$(Build.ArtifactStagingDirectory)/commit.txt'
displayName: 'Add commit hash to artifacts archive' displayName: 'Add commit hash to artifacts archive'
- task: Bash@3 - task: Bash@3
displayName: Setup displayName: Setup
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/setup.sh filePath: $(Build.SourcesDirectory)/.ci/setup.sh
targetType: filePath targetType: filePath
- task: Bash@3 - task: Bash@3
displayName: Test displayName: Test
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/test.sh filePath: $(Build.SourcesDirectory)/.ci/test.sh
targetType: filePath targetType: filePath
- task: PublishBuildArtifacts@1 - 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: inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)' pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets artifactName: PackageAssets
artifactType: container artifactType: container
########################################### ###########################################
- job: Linux_latest - job: Linux_latest
########################################### ###########################################
variables: variables:
COMPILER: clang-17 COMPILER: clang-17
DEBIAN_FRONTEND: 'noninteractive' DEBIAN_FRONTEND: 'noninteractive'
IN_UBUNTU_BASE_CONTAINER: 'true' IN_UBUNTU_BASE_CONTAINER: 'true'
OS_NAME: 'linux' OS_NAME: 'linux'
SETUP_CONDA: 'true' SETUP_CONDA: 'true'
pool: mariner-20240410-0 pool: mariner-20240410-0
container: ubuntu-latest container: ubuntu-latest
strategy: strategy:
matrix: matrix:
regular: regular:
TASK: regular TASK: regular
sdist: sdist:
TASK: sdist TASK: sdist
bdist: bdist:
TASK: bdist TASK: bdist
PYTHON_VERSION: '3.10' PYTHON_VERSION: '3.10'
inference: inference:
TASK: if-else TASK: if-else
mpi_source: mpi_source:
TASK: mpi TASK: mpi
METHOD: source METHOD: source
mpi_pip: mpi_pip:
TASK: mpi TASK: mpi
METHOD: pip METHOD: pip
PYTHON_VERSION: '3.11' PYTHON_VERSION: '3.11'
mpi_wheel: mpi_wheel:
TASK: mpi TASK: mpi
METHOD: wheel METHOD: wheel
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
gpu_source: gpu_source:
TASK: gpu TASK: gpu
METHOD: source METHOD: source
PYTHON_VERSION: '3.11' PYTHON_VERSION: '3.11'
gpu_pip: gpu_pip:
TASK: gpu TASK: gpu
METHOD: pip METHOD: pip
PYTHON_VERSION: '3.10' PYTHON_VERSION: '3.10'
gpu_wheel: gpu_wheel:
TASK: gpu TASK: gpu
METHOD: wheel METHOD: wheel
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
cpp_tests: cpp_tests:
TASK: cpp-tests TASK: cpp-tests
METHOD: with-sanitizers METHOD: with-sanitizers
steps: steps:
- script: | - script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
CONDA=$HOME/miniforge CONDA=$HOME/miniforge
echo "##vso[task.setvariable variable=CONDA]$CONDA" echo "##vso[task.setvariable variable=CONDA]$CONDA"
echo "##vso[task.prependpath]$CONDA/bin" echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Set variables' displayName: 'Set variables'
# https://github.com/microsoft/azure-pipelines-agent/issues/2043#issuecomment-687983301 # https://github.com/microsoft/azure-pipelines-agent/issues/2043#issuecomment-687983301
- script: | - script: |
/tmp/docker exec -t -u 0 ci-container \ /tmp/docker exec -t -u 0 ci-container \
sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo" sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
displayName: 'Install sudo' displayName: 'Install sudo'
- script: | - script: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends git sudo apt-get install -y --no-install-recommends git
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- task: Bash@3 - task: Bash@3
displayName: Setup displayName: Setup
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/setup.sh filePath: $(Build.SourcesDirectory)/.ci/setup.sh
targetType: 'filePath' targetType: 'filePath'
- task: Bash@3 - task: Bash@3
displayName: Test displayName: Test
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/test.sh filePath: $(Build.SourcesDirectory)/.ci/test.sh
targetType: 'filePath' targetType: 'filePath'
########################################### ###########################################
- job: QEMU_multiarch - job: QEMU_multiarch
########################################### ###########################################
variables: variables:
BUILD_DIRECTORY: /LightGBM BUILD_DIRECTORY: /LightGBM
COMPILER: gcc COMPILER: gcc
PRODUCES_ARTIFACTS: 'true' PRODUCES_ARTIFACTS: 'true'
pool: pool:
vmImage: ubuntu-22.04 vmImage: ubuntu-22.04
timeoutInMinutes: 180 timeoutInMinutes: 180
strategy: strategy:
matrix: matrix:
bdist: bdist:
TASK: bdist TASK: bdist
ARCH: aarch64 ARCH: aarch64
steps: steps:
- script: | - script: |
sudo apt-get update sudo apt-get update
sudo apt-get install --no-install-recommends -y \ sudo apt-get install --no-install-recommends -y \
binfmt-support \ binfmt-support \
qemu \ qemu \
qemu-user \ qemu-user \
qemu-user-static qemu-user-static
displayName: 'Install QEMU' displayName: 'Install QEMU'
- script: | - script: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: 'Enable Docker multi-architecture support' displayName: 'Enable Docker multi-architecture support'
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- script: | - script: |
cat > docker-script.sh <<EOF cat > docker-script.sh <<EOF
export CONDA=\$HOME/miniforge export CONDA=\$HOME/miniforge
export PATH=\$CONDA/bin:/opt/rh/llvm-toolset-7.0/root/usr/bin:\$PATH export PATH=\$CONDA/bin:/opt/rh/llvm-toolset-7.0/root/usr/bin:\$PATH
export LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7.0/root/usr/lib64:\$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7.0/root/usr/lib64:\$LD_LIBRARY_PATH
\$BUILD_DIRECTORY/.ci/setup.sh || exit 1 \$BUILD_DIRECTORY/.ci/setup.sh || exit 1
\$BUILD_DIRECTORY/.ci/test.sh || exit 1 \$BUILD_DIRECTORY/.ci/test.sh || exit 1
EOF EOF
IMAGE_URI="lightgbm/vsts-agent:manylinux2014_aarch64" IMAGE_URI="lightgbm/vsts-agent:manylinux2014_aarch64"
docker pull "${IMAGE_URI}" || exit 1 docker pull "${IMAGE_URI}" || exit 1
PLATFORM=$(docker inspect --format='{{.Os}}/{{.Architecture}}' "${IMAGE_URI}") || exit 1 PLATFORM=$(docker inspect --format='{{.Os}}/{{.Architecture}}' "${IMAGE_URI}") || exit 1
echo "detected image platform: ${PLATFORM}" echo "detected image platform: ${PLATFORM}"
docker run \ docker run \
--platform "${PLATFORM}" \ --platform "${PLATFORM}" \
--rm \ --rm \
--env AZURE=true \ --env AZURE=true \
--env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \ --env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \
--env BUILD_DIRECTORY=$BUILD_DIRECTORY \ --env BUILD_DIRECTORY=$BUILD_DIRECTORY \
--env COMPILER=$COMPILER \ --env COMPILER=$COMPILER \
--env METHOD=$METHOD \ --env METHOD=$METHOD \
--env OS_NAME=linux \ --env OS_NAME=linux \
--env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \ --env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \
--env PYTHON_VERSION=$PYTHON_VERSION \ --env PYTHON_VERSION=$PYTHON_VERSION \
--env TASK=$TASK \ --env TASK=$TASK \
-v "$(Build.SourcesDirectory)":"$BUILD_DIRECTORY" \ -v "$(Build.SourcesDirectory)":"$BUILD_DIRECTORY" \
-v "$(Build.ArtifactStagingDirectory)":"$(Build.ArtifactStagingDirectory)" \ -v "$(Build.ArtifactStagingDirectory)":"$(Build.ArtifactStagingDirectory)" \
"${IMAGE_URI}" \ "${IMAGE_URI}" \
/bin/bash $BUILD_DIRECTORY/docker-script.sh /bin/bash $BUILD_DIRECTORY/docker-script.sh
displayName: 'Setup and run tests' displayName: 'Setup and run tests'
- task: PublishBuildArtifacts@1 - 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: inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)' pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets artifactName: PackageAssets
artifactType: container artifactType: container
########################################### ###########################################
- job: macOS - job: macOS
########################################### ###########################################
variables: variables:
COMPILER: clang COMPILER: clang
OS_NAME: 'macos' OS_NAME: 'macos'
PRODUCES_ARTIFACTS: 'true' PRODUCES_ARTIFACTS: 'true'
pool: pool:
vmImage: 'macOS-13' vmImage: 'macOS-13'
strategy: strategy:
matrix: matrix:
regular: regular:
TASK: regular TASK: regular
PYTHON_VERSION: '3.10' PYTHON_VERSION: '3.10'
sdist: sdist:
TASK: sdist TASK: sdist
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
bdist: bdist:
TASK: bdist TASK: bdist
swig: swig:
TASK: swig TASK: swig
cpp_tests: cpp_tests:
TASK: cpp-tests TASK: cpp-tests
METHOD: with-sanitizers METHOD: with-sanitizers
SANITIZERS: "address;undefined" SANITIZERS: "address;undefined"
steps: steps:
- script: | - script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
CONDA=$AGENT_HOMEDIRECTORY/miniforge CONDA=$AGENT_HOMEDIRECTORY/miniforge
echo "##vso[task.setvariable variable=CONDA]$CONDA" echo "##vso[task.setvariable variable=CONDA]$CONDA"
echo "##vso[task.prependpath]$CONDA/bin" echo "##vso[task.prependpath]$CONDA/bin"
echo "##vso[task.setvariable variable=JAVA_HOME]$JAVA_HOME_8_X64" echo "##vso[task.setvariable variable=JAVA_HOME]$JAVA_HOME_8_X64"
displayName: 'Set variables' displayName: 'Set variables'
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- task: Bash@3 - task: Bash@3
displayName: Setup displayName: Setup
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/setup.sh filePath: $(Build.SourcesDirectory)/.ci/setup.sh
targetType: filePath targetType: filePath
- task: Bash@3 - task: Bash@3
displayName: Test displayName: Test
inputs: inputs:
filePath: $(Build.SourcesDirectory)/.ci/test.sh filePath: $(Build.SourcesDirectory)/.ci/test.sh
targetType: filePath targetType: filePath
- task: PublishBuildArtifacts@1 - 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: inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)' pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets artifactName: PackageAssets
artifactType: container artifactType: container
########################################### ###########################################
- job: Windows - job: Windows
########################################### ###########################################
pool: pool:
vmImage: 'windows-2019' vmImage: 'windows-2019'
strategy: strategy:
matrix: matrix:
regular: regular:
TASK: regular TASK: regular
PYTHON_VERSION: '3.10' PYTHON_VERSION: '3.10'
sdist: sdist:
TASK: sdist TASK: sdist
PYTHON_VERSION: '3.9' PYTHON_VERSION: '3.9'
bdist: bdist:
TASK: bdist TASK: bdist
swig: swig:
TASK: swig TASK: swig
cpp_tests: cpp_tests:
TASK: cpp-tests TASK: cpp-tests
steps: steps:
- powershell: | - powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Set Variables' displayName: 'Set Variables'
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- script: | - script: |
cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/install-opencl.ps1" cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/install-opencl.ps1"
condition: eq(variables['TASK'], 'bdist') condition: eq(variables['TASK'], 'bdist')
displayName: 'Install OpenCL' displayName: 'Install OpenCL'
- script: | - script: |
cmd /c "conda config --remove channels defaults" cmd /c "conda config --remove channels defaults"
cmd /c "conda config --add channels nodefaults" cmd /c "conda config --add channels nodefaults"
cmd /c "conda config --add channels conda-forge" cmd /c "conda config --add channels conda-forge"
cmd /c "conda config --set channel_priority strict" cmd /c "conda config --set channel_priority strict"
cmd /c "conda init powershell" cmd /c "conda init powershell"
cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/test-windows.ps1" cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/test-windows.ps1"
displayName: Test displayName: Test
- task: PublishBuildArtifacts@1 - 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: inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)' pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets artifactName: PackageAssets
artifactType: container artifactType: container
########################################### ###########################################
- job: R_artifact - job: R_artifact
########################################### ###########################################
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')) condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
pool: pool:
vmImage: 'ubuntu-22.04' vmImage: 'ubuntu-22.04'
container: rbase container: rbase
steps: steps:
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
- script: | - script: |
LGB_VER=$(head -n 1 VERSION.txt | sed "s/rc/-/g") LGB_VER=$(head -n 1 VERSION.txt | sed "s/rc/-/g")
R_LIB_PATH=~/Rlib R_LIB_PATH=~/Rlib
export R_LIBS=${R_LIB_PATH} export R_LIBS=${R_LIB_PATH}
mkdir -p ${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 "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
sh build-cran-package.sh --r-executable=RD || 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 mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName: 'Build CRAN R-package' displayName: 'Build CRAN R-package'
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
condition: succeeded() condition: succeeded()
inputs: inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory) pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: R-package artifactName: R-package
artifactType: container artifactType: container
########################################### ###########################################
- job: Package - job: Package
########################################### ###########################################
dependsOn: dependsOn:
- Linux - Linux
- Linux_latest - Linux_latest
- QEMU_multiarch - QEMU_multiarch
- macOS - macOS
- Windows - Windows
- R_artifact - R_artifact
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
pool: pool:
vmImage: 'ubuntu-22.04' vmImage: 'ubuntu-22.04'
steps: steps:
# Create archives with complete source code included (with git submodules) # Create archives with complete source code included (with git submodules)
- task: ArchiveFiles@2 - task: ArchiveFiles@2
displayName: Create zip archive displayName: Create zip archive
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs: inputs:
rootFolderOrFile: $(Build.SourcesDirectory) rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false includeRootFolder: false
archiveType: zip archiveType: zip
archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_zip.zip' archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_zip.zip'
replaceExistingArchive: true replaceExistingArchive: true
- task: ArchiveFiles@2 - task: ArchiveFiles@2
displayName: Create tar.gz archive displayName: Create tar.gz archive
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs: inputs:
rootFolderOrFile: $(Build.SourcesDirectory) rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false includeRootFolder: false
archiveType: tar archiveType: tar
tarCompression: gz tarCompression: gz
archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_tar_gz.tar.gz' archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_tar_gz.tar.gz'
replaceExistingArchive: true replaceExistingArchive: true
# Download all agent packages from all previous phases # Download all agent packages from all previous phases
- task: DownloadBuildArtifacts@0 - task: DownloadBuildArtifacts@0
displayName: Download package assets displayName: Download package assets
inputs: inputs:
artifactName: PackageAssets artifactName: PackageAssets
downloadPath: $(Build.SourcesDirectory)/binaries downloadPath: $(Build.SourcesDirectory)/binaries
- task: DownloadBuildArtifacts@0 - task: DownloadBuildArtifacts@0
displayName: Download R-package displayName: Download R-package
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs: inputs:
artifactName: R-package artifactName: R-package
downloadPath: $(Build.SourcesDirectory)/R downloadPath: $(Build.SourcesDirectory)/R
- script: | - script: |
python "$(Build.SourcesDirectory)/.ci/create-nuget.py" "$(Build.SourcesDirectory)/binaries/PackageAssets" python "$(Build.SourcesDirectory)/.ci/create-nuget.py" "$(Build.SourcesDirectory)/binaries/PackageAssets"
displayName: 'Create NuGet configuration files' displayName: 'Create NuGet configuration files'
- task: NuGetCommand@2 - task: NuGetCommand@2
inputs: inputs:
command: pack command: pack
packagesToPack: '$(Build.SourcesDirectory)/.ci/nuget/*.nuspec' packagesToPack: '$(Build.SourcesDirectory)/.ci/nuget/*.nuspec'
packDestination: '$(Build.ArtifactStagingDirectory)/nuget' packDestination: '$(Build.ArtifactStagingDirectory)/nuget'
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/nuget' pathtoPublish: '$(Build.ArtifactStagingDirectory)/nuget'
artifactName: NuGet artifactName: NuGet
artifactType: container artifactType: container
- task: GitHubRelease@0 - task: GitHubRelease@0
displayName: 'Create GitHub Release' displayName: 'Create GitHub Release'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs: inputs:
gitHubConnection: guolinke gitHubConnection: guolinke
repositoryName: '$(Build.Repository.Name)' repositoryName: '$(Build.Repository.Name)'
action: 'create' action: 'create'
target: '$(Build.SourceVersion)' target: '$(Build.SourceVersion)'
tagSource: 'auto' tagSource: 'auto'
title: '$(Build.SourceBranchName)' title: '$(Build.SourceBranchName)'
assets: | assets: |
$(Build.SourcesDirectory)/binaries/PackageAssets/* $(Build.SourcesDirectory)/binaries/PackageAssets/*
$(Build.SourcesDirectory)/R/R-package/* $(Build.SourcesDirectory)/R/R-package/*
$(Build.ArtifactStagingDirectory)/nuget/*.nupkg $(Build.ArtifactStagingDirectory)/nuget/*.nupkg
$(Build.ArtifactStagingDirectory)/archives/* $(Build.ArtifactStagingDirectory)/archives/*
assetUploadMode: 'delete' assetUploadMode: 'delete'
isDraft: true isDraft: true
isPreRelease: false isPreRelease: false
addChangeLog: false addChangeLog: false
...@@ -10,5 +10,4 @@ rules: ...@@ -10,5 +10,4 @@ rules:
check-keys: false check-keys: false
# temporarily disabled rules # temporarily disabled rules
indentation: disable
comments-indentation: disable comments-indentation: disable
...@@ -37,70 +37,70 @@ navbar: ...@@ -37,70 +37,70 @@ navbar:
title: LightGBM title: LightGBM
type: default type: default
left: left:
- icon: fa-reply fa-lg - icon: fa-reply fa-lg
href: ../ href: ../
- icon: fa-home fa-lg - icon: fa-home fa-lg
href: index.html href: index.html
- text: Articles - text: Articles
href: articles/index.html href: articles/index.html
- text: Reference - text: Reference
href: reference/index.html href: reference/index.html
right: right:
- icon: fa-github fa-lg - icon: fa-github fa-lg
href: https://github.com/microsoft/LightGBM/tree/master/R-package href: https://github.com/microsoft/LightGBM/tree/master/R-package
reference: reference:
- title: Datasets - title: Datasets
desc: Datasets included with the R-package desc: Datasets included with the R-package
contents: contents:
- '`agaricus.train`' - '`agaricus.train`'
- '`agaricus.test`' - '`agaricus.test`'
- '`bank`' - '`bank`'
- title: Data Input / Output - title: Data Input / Output
desc: Data I/O required for LightGBM desc: Data I/O required for LightGBM
contents: contents:
- '`dim.lgb.Dataset`' - '`dim.lgb.Dataset`'
- '`dimnames.lgb.Dataset`' - '`dimnames.lgb.Dataset`'
- '`get_field`' - '`get_field`'
- '`set_field`' - '`set_field`'
- '`lgb.Dataset`' - '`lgb.Dataset`'
- '`lgb.Dataset.construct`' - '`lgb.Dataset.construct`'
- '`lgb.Dataset.create.valid`' - '`lgb.Dataset.create.valid`'
- '`lgb.Dataset.save`' - '`lgb.Dataset.save`'
- '`lgb.Dataset.set.categorical`' - '`lgb.Dataset.set.categorical`'
- '`lgb.Dataset.set.reference`' - '`lgb.Dataset.set.reference`'
- '`lgb.convert_with_rules`' - '`lgb.convert_with_rules`'
- '`lgb.slice.Dataset`' - '`lgb.slice.Dataset`'
- title: Machine Learning - title: Machine Learning
desc: Train models with LightGBM and then use them to make predictions on new data desc: Train models with LightGBM and then use them to make predictions on new data
contents: contents:
- '`lightgbm`' - '`lightgbm`'
- '`lgb.train`' - '`lgb.train`'
- '`predict.lgb.Booster`' - '`predict.lgb.Booster`'
- '`lgb.cv`' - '`lgb.cv`'
- '`lgb.configure_fast_predict`' - '`lgb.configure_fast_predict`'
- title: Saving / Loading Models - title: Saving / Loading Models
desc: Save and load LightGBM models desc: Save and load LightGBM models
contents: contents:
- '`lgb.dump`' - '`lgb.dump`'
- '`lgb.save`' - '`lgb.save`'
- '`lgb.load`' - '`lgb.load`'
- '`lgb.model.dt.tree`' - '`lgb.model.dt.tree`'
- '`lgb.drop_serialized`' - '`lgb.drop_serialized`'
- '`lgb.make_serializable`' - '`lgb.make_serializable`'
- '`lgb.restore_handle`' - '`lgb.restore_handle`'
- title: Model Interpretation - title: Model Interpretation
desc: Analyze your models desc: Analyze your models
contents: contents:
- '`lgb.get.eval.result`' - '`lgb.get.eval.result`'
- '`lgb.importance`' - '`lgb.importance`'
- '`lgb.interprete`' - '`lgb.interprete`'
- '`lgb.plot.importance`' - '`lgb.plot.importance`'
- '`lgb.plot.interpretation`' - '`lgb.plot.interpretation`'
- '`print.lgb.Booster`' - '`print.lgb.Booster`'
- '`summary.lgb.Booster`' - '`summary.lgb.Booster`'
- title: Multithreading Control - title: Multithreading Control
desc: Manage degree of parallelism used by LightGBM desc: Manage degree of parallelism used by LightGBM
contents: contents:
- '`getLGBMThreads`' - '`getLGBMThreads`'
- '`setLGBMThreads`' - '`setLGBMThreads`'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment