diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml deleted file mode 100644 index 4b47d9bef65a..000000000000 --- a/.github/workflows/cuda.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: CUDA Version - -on: - push: - branches: - - master - pull_request: - branches: - - master - -env: - github_actions: 'true' - os_name: linux - task: cuda - conda_env: test-env - -jobs: - test: - name: cuda ${{ 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.7 - cuda_version: "11.2.0" - - method: pip - compiler: clang - python_version: 3.8 - cuda_version: "10.0" - - method: wheel - compiler: gcc - python_version: 3.9 - cuda_version: "9.0" - 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 \ - 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 <&1 > ubsan-tests.log - cat ubsan-tests.log - exit $(cat ubsan-tests.log | grep --count "runtime error") - all-successful: - # https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert - runs-on: ubuntu-latest - needs: [test, test-r-sanitizers] - steps: - - name: Note that all tests succeeded - run: echo "🎉" diff --git a/.github/workflows/r_solaris.yml b/.github/workflows/r_solaris.yml deleted file mode 100644 index b11c0182312f..000000000000 --- a/.github/workflows/r_solaris.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Solaris CRAN check - -on: - repository_dispatch: - types: [gha_run_r_solaris] - -jobs: - test: - name: solaris-cran - timeout-minutes: 120 - runs-on: ubuntu-latest - container: rocker/r-base - env: - SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }} - steps: - - name: Install essential software before checkout - shell: bash - run: | - apt-get update - apt-get install --no-install-recommends -y \ - curl \ - git \ - jq - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 5 - submodules: true - repository: microsoft/LightGBM - ref: "refs/pull/${{ github.event.client_payload.pr_number }}/merge" - - name: Send init status - if: ${{ always() }} - run: | - $GITHUB_WORKSPACE/.ci/append_comment.sh \ - "${{ github.event.client_payload.comment_number }}" \ - "Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}" - - name: Run tests on Solaris - shell: bash - run: | - sh build-cran-package.sh || exit -1 - apt-get install --no-install-recommends -y \ - libcurl4-openssl-dev \ - libxml2-dev \ - libssl-dev - log_file="$GITHUB_WORKSPACE/rhub_logs.txt" - Rscript -e "install.packages('rhub', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org')" - Rscript $GITHUB_WORKSPACE/.ci/run_rhub_solaris_checks.R $(pwd)/lightgbm_*.tar.gz $log_file || exit -1 - - name: Send final status - if: ${{ always() }} - run: | - $GITHUB_WORKSPACE/.ci/set_commit_status.sh "${{ github.workflow }}" "${{ job.status }}" "${{ github.event.client_payload.pr_sha }}" - body="" - while IFS= read -r line; do - platform=${line%@*} - url=${line#*@} - body="${body}**${platform}**: ${url}\r\n" - done < "$GITHUB_WORKSPACE/rhub_logs.txt" || true - body="${body}Reports also have been sent to LightGBM public e-mail: http://www.yopmail.com/lightgbm_rhub_checks\r\n" - body="${body}Status: ${{ job.status }}." - $GITHUB_WORKSPACE/.ci/append_comment.sh \ - "${{ github.event.client_payload.comment_number }}" \ - "$body" - - name: Rerun workflow-indicator - if: ${{ always() }} - run: | - bash $GITHUB_WORKSPACE/.ci/rerun_workflow.sh \ - "optional_checks.yml" \ - "${{ github.event.client_payload.pr_number }}" \ - "${{ github.event.client_payload.pr_branch }}" \ - || true diff --git a/.github/workflows/r_valgrind.yml b/.github/workflows/r_valgrind.yml deleted file mode 100644 index e9af3ae6fdc5..000000000000 --- a/.github/workflows/r_valgrind.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: R valgrind tests - -on: - repository_dispatch: - types: [gha_run_r_valgrind] - -jobs: - test-r-valgrind: - name: r-package (ubuntu-latest, R-devel, valgrind) - timeout-minutes: 120 - runs-on: ubuntu-latest - container: wch1/r-debug - env: - SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }} - steps: - - name: Install essential software before checkout - shell: bash - run: | - apt-get update - apt-get install --no-install-recommends -y \ - curl \ - git \ - jq - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 5 - submodules: true - repository: microsoft/LightGBM - ref: "refs/pull/${{ github.event.client_payload.pr_number }}/merge" - - name: Send init status - if: ${{ always() }} - run: | - $GITHUB_WORKSPACE/.ci/set_commit_status.sh "${{ github.workflow }}" "pending" "${{ github.event.client_payload.pr_sha }}" - $GITHUB_WORKSPACE/.ci/append_comment.sh \ - "${{ github.event.client_payload.comment_number }}" \ - "Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}" - - name: Install packages - shell: bash - run: | - RDscriptvalgrind -e "install.packages(c('R6', 'data.table', 'jsonlite', 'testthat'), repos = 'https://cran.r-project.org')" - sh build-cran-package.sh - RDvalgrind CMD INSTALL --preclean --install-tests lightgbm_*.tar.gz || exit -1 - - name: Run tests with valgrind - shell: bash - run: ./.ci/test_r_package_valgrind.sh - - name: Send final status - if: ${{ always() }} - run: | - $GITHUB_WORKSPACE/.ci/set_commit_status.sh "${{ github.workflow }}" "${{ job.status }}" "${{ github.event.client_payload.pr_sha }}" - $GITHUB_WORKSPACE/.ci/append_comment.sh \ - "${{ github.event.client_payload.comment_number }}" \ - "Status: ${{ job.status }}." - - name: Rerun workflow-indicator - if: ${{ always() }} - run: | - bash $GITHUB_WORKSPACE/.ci/rerun_workflow.sh \ - "optional_checks.yml" \ - "${{ github.event.client_payload.pr_number }}" \ - "${{ github.event.client_payload.pr_branch }}" \ - || true diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml deleted file mode 100644 index 9f0faa12d1fd..000000000000 --- a/.github/workflows/static_analysis.yml +++ /dev/null @@ -1,85 +0,0 @@ -# contains non-functional tests, like checks on docs -# and code style -name: Static Analysis - -on: - push: - branches: - - master - pull_request: - branches: - - master - -env: - COMPILER: 'gcc' - CONDA_ENV: test-env - GITHUB_ACTIONS: 'true' - OS_NAME: 'linux' - PYTHON_VERSION: 3.9 - -jobs: - test: - name: ${{ matrix.task }} - runs-on: ubuntu-latest - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - task: lint - - task: check-docs - steps: - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 5 - submodules: false - - name: Setup and run tests - shell: bash - run: | - export TASK="${{ matrix.task }}" - export BUILD_DIRECTORY="$GITHUB_WORKSPACE" - export CONDA=${HOME}/miniconda - export PATH=${CONDA}/bin:$HOME/.local/bin:${PATH} - $GITHUB_WORKSPACE/.ci/setup.sh || exit -1 - $GITHUB_WORKSPACE/.ci/test.sh || exit -1 - r-check-docs: - name: r-package-check-docs - timeout-minutes: 60 - runs-on: ubuntu-latest - container: rocker/verse - steps: - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 5 - submodules: true - - name: Install packages - shell: bash - run: | - Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'roxygen2', 'testthat'), repos = 'https://cran.r-project.org')" - sh build-cran-package.sh || exit -1 - R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit -1 - - name: Test documentation - shell: bash --noprofile --norc {0} - run: | - Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit -1 - num_doc_files_changed=$( - git diff --name-only | grep --count -E "\.Rd|NAMESPACE" - ) - if [[ ${num_doc_files_changed} -gt 0 ]]; then - echo "Some R documentation files have changed. Please re-generate them and commit those changes." - echo "" - echo " sh build-cran-package.sh" - echo " R CMD INSTALL --with-keep.source lightgbm_*.tar.gz" - echo " Rscript -e \"roxygen2::roxygenize('R-package/', load = 'installed')\"" - echo "" - exit -1 - fi - all-successful: - # https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert - runs-on: ubuntu-latest - needs: [test, r-check-docs] - steps: - - name: Note that all tests succeeded - run: echo "🎉" diff --git a/.github/workflows/triggering_comments.yml b/.github/workflows/triggering_comments.yml deleted file mode 100644 index 6803bf59fbc7..000000000000 --- a/.github/workflows/triggering_comments.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Triggering comments - -on: - issue_comment: - types: [created] - -jobs: - triggering-tests: - if: github.event.issue.pull_request && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) && startsWith(github.event.comment.body, '/gha run') - runs-on: ubuntu-latest - env: - SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }} - steps: - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 5 - submodules: false - - - name: Trigger R valgrind tests - if: github.event.comment.body == '/gha run r-valgrind' - run: | - $GITHUB_WORKSPACE/.ci/trigger_dispatch_run.sh \ - "${{ github.event.issue.pull_request.url }}" \ - "${{ github.event.comment.id }}" \ - "gha_run_r_valgrind" - - - name: Trigger R artifact builds - if: github.event.comment.body == '/gha run build-r-artifacts' - run: | - $GITHUB_WORKSPACE/.ci/trigger_dispatch_run.sh \ - "${{ github.event.issue.pull_request.url }}" \ - "${{ github.event.comment.id }}" \ - "gha_run_build_r_artifacts" - - - name: Trigger R Solaris CRAN checks - if: github.event.comment.body == '/gha run r-solaris' - run: | - $GITHUB_WORKSPACE/.ci/trigger_dispatch_run.sh \ - "${{ github.event.issue.pull_request.url }}" \ - "${{ github.event.comment.id }}" \ - "gha_run_r_solaris"