trigger: branches: include: - master tags: include: - v* pr: - master - release/* variables: AZURE: 'true' PYTHON_VERSION: '3.11' CONDA_ENV: test-env runCodesignValidationInjection: false skipComponentGovernanceDetection: true DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true resources: containers: - container: linux-artifact-builder image: lightgbm/vsts-agent:manylinux_2_28_x86_64 - container: ubuntu-latest image: 'ubuntu:22.04' options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro" - container: rbase image: wch1/r-debug jobs: ########################################### - job: Linux ########################################### variables: COMPILER: gcc SETUP_CONDA: 'false' OS_NAME: 'linux' PRODUCES_ARTIFACTS: 'true' pool: sh-mariner container: linux-artifact-builder strategy: matrix: regular: TASK: regular PYTHON_VERSION: '3.9' sdist: TASK: sdist PYTHON_VERSION: '3.7' bdist: TASK: bdist PYTHON_VERSION: '3.8' inference: TASK: if-else mpi_source: TASK: mpi METHOD: source PYTHON_VERSION: '3.8' gpu_source: TASK: gpu METHOD: source swig: TASK: swig steps: - script: | echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=LGB_VER]$(head -n 1 VERSION.txt)" echo "##vso[task.prependpath]/usr/lib64/openmpi/bin" echo "##vso[task.prependpath]$CONDA/bin" displayName: 'Set variables' - script: | echo '$(Build.SourceVersion)' > '$(Build.ArtifactStagingDirectory)/commit.txt' displayName: 'Add commit hash to artifacts archive' - bash: $(Build.SourcesDirectory)/.ci/setup.sh displayName: Setup - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test - task: PublishBuildArtifacts@1 condition: and(succeeded(), in(variables['TASK'], 'regular', 'sdist', 'bdist', 'swig'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: PackageAssets artifactType: container ########################################### - job: Linux_latest ########################################### variables: COMPILER: clang-17 DEBIAN_FRONTEND: 'noninteractive' IN_UBUNTU_BASE_CONTAINER: 'true' OS_NAME: 'linux' SETUP_CONDA: 'true' pool: sh-mariner container: ubuntu-latest strategy: matrix: regular: TASK: regular sdist: TASK: sdist bdist: TASK: bdist PYTHON_VERSION: '3.9' inference: TASK: if-else mpi_source: TASK: mpi METHOD: source mpi_pip: TASK: mpi METHOD: pip PYTHON_VERSION: '3.10' mpi_wheel: TASK: mpi METHOD: wheel PYTHON_VERSION: '3.8' gpu_source: TASK: gpu METHOD: source PYTHON_VERSION: '3.10' gpu_pip: TASK: gpu METHOD: pip PYTHON_VERSION: '3.9' gpu_wheel: TASK: gpu METHOD: wheel PYTHON_VERSION: '3.8' cpp_tests: TASK: cpp-tests METHOD: with-sanitizers steps: - script: | echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=LGB_VER]$(head -n 1 VERSION.txt)" CONDA=$HOME/miniforge echo "##vso[task.setvariable variable=CONDA]$CONDA" echo "##vso[task.prependpath]$CONDA/bin" displayName: 'Set variables' # https://github.com/microsoft/azure-pipelines-agent/issues/2043#issuecomment-687983301 - script: | /tmp/docker exec -t -u 0 ci-container \ sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo" displayName: 'Install sudo' - bash: $(Build.SourcesDirectory)/.ci/setup.sh displayName: Setup - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test ########################################### - job: QEMU_multiarch ########################################### variables: COMPILER: gcc OS_NAME: 'linux' PRODUCES_ARTIFACTS: 'true' pool: vmImage: ubuntu-22.04 timeoutInMinutes: 180 strategy: matrix: bdist: TASK: bdist ARCH: aarch64 steps: - script: | sudo apt-get update sudo apt-get install --no-install-recommends -y \ binfmt-support \ qemu \ qemu-user \ qemu-user-static displayName: 'Install QEMU' - script: | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes displayName: 'Enable Docker multi-architecture support' - script: | export ROOT_DOCKER_FOLDER=/LightGBM cat > docker.env < docker-script.sh <