diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 2d279b0f33e3..000000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: 3.3.3.99.{build} - -image: Visual Studio 2015 -platform: x64 -configuration: # a trick to construct a build matrix with multiple Python versions - - '3.7' - -# only build pull requests and -# commits to 'master' or any branch starting with 'release' -branches: - only: - - master - - /^release/ - -environment: - matrix: - - COMPILER: MSVC - TASK: python - - COMPILER: MINGW - TASK: python - -clone_depth: 5 - -install: - - git submodule update --init --recursive # get `external_libs` folder - - set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # delete sh.exe from PATH (mingw32-make fix) - - set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH% - - set PYTHON_VERSION=%CONFIGURATION% - - set CONDA_ENV="test-env" - - ps: | - $env:MINICONDA = "C:\Miniconda3-x64" - $env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH" - $env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER" - $env:LGB_VER = (Get-Content $env:APPVEYOR_BUILD_FOLDER\VERSION.txt).trim() - -build: false - -test_script: - - conda config --remove channels defaults - - conda config --add channels nodefaults - - conda config --add channels conda-forge - - conda config --set channel_priority strict - - conda init powershell - - powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1 diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml deleted file mode 100644 index 946f548784a6..000000000000 --- a/.github/workflows/cuda.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: CUDA Version - -on: - push: - branches: - - master - pull_request: - branches: - - master - - release/* - -# automatically cancel in-progress builds if another commit is pushed -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - github_actions: 'true' - os_name: linux - conda_env: test-env - -jobs: - test: - name: ${{ matrix.task }} ${{ matrix.cuda_version }} ${{ matrix.method }} (linux, ${{ matrix.compiler }}, Python ${{ matrix.python_version }}) - runs-on: [self-hosted, linux] - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - method: source - compiler: gcc - python_version: "3.8" - cuda_version: "11.7.1" - task: cuda - - method: pip - compiler: clang - python_version: "3.9" - cuda_version: "10.0" - task: cuda - - method: wheel - compiler: gcc - python_version: "3.10" - cuda_version: "9.0" - task: cuda - - method: source - compiler: gcc - python_version: "3.8" - cuda_version: "11.7.1" - task: cuda_exp - - method: pip - compiler: clang - python_version: "3.9" - cuda_version: "10.0" - task: cuda_exp - steps: - - name: Setup or update software on host machine - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y \ - apt-transport-https \ - ca-certificates \ - curl \ - git \ - gnupg-agent \ - lsb-release \ - software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y - curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - - curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list - sudo apt-get update - sudo apt-get install --no-install-recommends -y \ - containerd.io \ - docker-ce \ - docker-ce-cli \ - nvidia-docker2 - sudo chmod a+rw /var/run/docker.sock - sudo systemctl restart docker - - name: Remove old folder with repository - run: sudo rm -rf $GITHUB_WORKSPACE - - name: Checkout repository - uses: actions/checkout@v1 - with: - fetch-depth: 5 - submodules: true - - name: Setup and run tests - run: | - export ROOT_DOCKER_FOLDER=/LightGBM - cat > docker.env < docker-script.sh <> tests.log 2>&1 || exit_code=-1 - cat ./tests.log - exit ${exit_code} +# test: +# name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.compiler }}, R ${{ matrix.r_version }}, ${{ matrix.build_type }}) +# runs-on: ${{ matrix.os }} +# timeout-minutes: 60 +# strategy: +# fail-fast: false +# matrix: +# include: +# ################ +# # CMake builds # +# ################ +# - os: ubuntu-22.04 +# task: r-package +# compiler: gcc +# r_version: 3.6 +# build_type: cmake +# - os: ubuntu-22.04 +# task: r-package +# compiler: gcc +# r_version: 4.2 +# build_type: cmake +# - os: ubuntu-22.04 +# task: r-package +# compiler: clang +# r_version: 3.6 +# build_type: cmake +# - os: ubuntu-22.04 +# task: r-package +# compiler: clang +# r_version: 4.2 +# build_type: cmake +# - os: macOS-latest +# task: r-package +# compiler: gcc +# r_version: 3.6 +# build_type: cmake +# - os: macOS-latest +# task: r-package +# compiler: gcc +# r_version: 4.2 +# build_type: cmake +# - os: macOS-latest +# task: r-package +# compiler: clang +# r_version: 3.6 +# build_type: cmake +# - os: macOS-latest +# task: r-package +# compiler: clang +# r_version: 4.2 +# build_type: cmake +# - os: windows-latest +# task: r-package +# compiler: MINGW +# toolchain: MINGW +# r_version: 3.6 +# build_type: cmake +# - os: windows-latest +# task: r-package +# compiler: MINGW +# toolchain: MSYS +# r_version: 4.2 +# build_type: cmake +# # Visual Studio 2019 +# - os: windows-2019 +# task: r-package +# compiler: MSVC +# toolchain: MSVC +# r_version: 3.6 +# build_type: cmake +# # Visual Studio 2022 +# - os: windows-2022 +# task: r-package +# compiler: MSVC +# toolchain: MSVC +# r_version: 4.2 +# build_type: cmake +# ############### +# # CRAN builds # +# ############### +# - os: windows-latest +# task: r-package +# compiler: MINGW +# toolchain: MINGW +# r_version: 3.6 +# build_type: cran +# - os: windows-latest +# task: r-package +# compiler: MINGW +# toolchain: MSYS +# r_version: 4.2 +# build_type: cran +# - os: ubuntu-22.04 +# task: r-package +# compiler: gcc +# r_version: 4.2 +# build_type: cran +# - os: macOS-latest +# task: r-package +# compiler: clang +# r_version: 4.2 +# build_type: cran +# ################ +# # Other checks # +# ################ +# - os: ubuntu-22.04 +# task: r-rchk +# compiler: gcc +# r_version: 4.2 +# build_type: cran +# steps: +# - name: Prevent conversion of line endings on Windows +# if: startsWith(matrix.os, 'windows') +# shell: pwsh +# run: git config --global core.autocrlf false +# - name: Checkout repository +# uses: actions/checkout@v3 +# with: +# fetch-depth: 5 +# submodules: true +# - name: Install pandoc +# uses: r-lib/actions/setup-pandoc@v2 +# - name: install tinytex +# if: startsWith(matrix.os, 'windows') +# uses: r-lib/actions/setup-tinytex@v2 +# env: +# CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex +# TINYTEX_INSTALLER: TinyTeX +# - name: Setup and run tests on Linux and macOS +# if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-22.04' +# shell: bash +# run: | +# export TASK="${{ matrix.task }}" +# export COMPILER="${{ matrix.compiler }}" +# export GITHUB_ACTIONS="true" +# if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then +# export OS_NAME="macos" +# elif [[ "${{ matrix.os }}" == "ubuntu-22.04" ]]; then +# export OS_NAME="linux" +# fi +# export BUILD_DIRECTORY="$GITHUB_WORKSPACE" +# export R_VERSION="${{ matrix.r_version }}" +# export R_BUILD_TYPE="${{ matrix.build_type }}" +# $GITHUB_WORKSPACE/.ci/setup.sh +# $GITHUB_WORKSPACE/.ci/test.sh +# - name: Setup and run tests on Windows +# if: startsWith(matrix.os, 'windows') +# shell: pwsh -command ". {0}" +# run: | +# $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE +# $env:LGB_VER = (Get-Content -TotalCount 1 $env:BUILD_SOURCESDIRECTORY\VERSION.txt).trim().replace('rc', '-') +# $env:TOOLCHAIN = "${{ matrix.toolchain }}" +# $env:R_VERSION = "${{ matrix.r_version }}" +# $env:R_BUILD_TYPE = "${{ matrix.build_type }}" +# $env:COMPILER = "${{ matrix.compiler }}" +# $env:GITHUB_ACTIONS = "true" +# $env:TASK = "${{ matrix.task }}" +# & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" +# test-r-sanitizers: +# name: r-sanitizers (ubuntu-latest, R-devel, ${{ matrix.compiler }} ASAN/UBSAN) +# timeout-minutes: 60 +# runs-on: ubuntu-latest +# container: wch1/r-debug +# strategy: +# fail-fast: false +# matrix: +# include: +# - r_customization: san +# compiler: gcc +# - r_customization: csan +# compiler: clang +# steps: +# - name: Trust git cloning LightGBM +# run: | +# git config --global --add safe.directory "${GITHUB_WORKSPACE}" +# - name: Checkout repository +# uses: actions/checkout@v3 +# with: +# fetch-depth: 5 +# submodules: true +# - name: Install packages +# shell: bash +# run: | +# RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" +# sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }} +# RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1 +# - name: Run tests with sanitizers +# shell: bash +# run: | +# cd R-package/tests +# exit_code=0 +# RDscript${{ matrix.r_customization }} testthat.R >> tests.log 2>&1 || exit_code=-1 +# cat ./tests.log +# exit ${exit_code} test-r-debian-clang: name: r-package (debian, R-devel, clang) timeout-minutes: 60 @@ -240,6 +240,48 @@ jobs: with: fetch-depth: 5 submodules: true + - name: update to clang 15 + shell: bash + run: | + # remove clang stuff that comes installed in the image + apt-get autoremove -y --purge \ + clang-* \ + libclang-* \ + libunwind-* \ + llvm-* + # + # replace it all with clang-15 + apt-get update -y + apt-get install --no-install-recommends -y \ + gnupg \ + lsb-release \ + software-properties-common \ + wget + # + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - + # + add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" + apt-get install -y --no-install-recommends \ + clang-15 \ + clangd-15 \ + clang-format-15 \ + clang-tidy-15 \ + clang-tools-15 \ + lldb-15 \ + lld-15 \ + llvm-15-dev \ + llvm-15-tools \ + libomp-15-dev \ + libc++-15-dev \ + libc++abi-15-dev \ + libclang-common-15-dev \ + libclang-15-dev \ + libclang-cpp15-dev \ + libunwind-15-dev + # + ln -s \ + /usr/lib/llvm-15/bin/clang \ + /usr/bin/clang - name: Install packages and run tests shell: bash run: | @@ -254,7 +296,7 @@ jobs: all-r-package-jobs-successful: if: always() runs-on: ubuntu-latest - needs: [test, test-r-sanitizers, test-r-debian-clang] + needs: [test-r-debian-clang] steps: - name: Note that all tests succeeded uses: re-actors/alls-green@v1.2.2 diff --git a/.vsts-ci.yml b/.vsts-ci.yml deleted file mode 100644 index 194aa5471131..000000000000 --- a/.vsts-ci.yml +++ /dev/null @@ -1,400 +0,0 @@ -trigger: - branches: - include: - - master - tags: - include: - - v* -pr: -- master -- release/* -variables: - AZURE: 'true' - PYTHON_VERSION: '3.10' - 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-ubuntu - 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 - DEBIAN_FRONTEND: 'noninteractive' - IN_UBUNTU_BASE_CONTAINER: 'true' - OS_NAME: 'linux' - SETUP_CONDA: 'true' - pool: sh-ubuntu - container: ubuntu-latest - strategy: - matrix: - regular: - TASK: regular - sdist: - TASK: sdist - bdist: - TASK: bdist - PYTHON_VERSION: '3.8' - inference: - TASK: if-else - mpi_source: - TASK: mpi - METHOD: source - mpi_pip: - TASK: mpi - METHOD: pip - PYTHON_VERSION: '3.9' - mpi_wheel: - TASK: mpi - METHOD: wheel - PYTHON_VERSION: '3.7' - gpu_source: - TASK: gpu - METHOD: source - PYTHON_VERSION: '3.9' - gpu_pip: - TASK: gpu - METHOD: pip - PYTHON_VERSION: '3.8' - gpu_wheel: - TASK: gpu - METHOD: wheel - PYTHON_VERSION: '3.7' - 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 <