From 4420f6022cf8429355e6fdc1ea61b327f6cf1e8a Mon Sep 17 00:00:00 2001 From: StrikerRUS Date: Tue, 13 Apr 2021 16:30:50 +0300 Subject: [PATCH] Revert "Stop running CUDA tests at CI (#4167)" This reverts commit 36454a3b74c4941027d14df76687993f566efbe7. --- .github/workflows/cuda.yml | 96 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/cuda.yml diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml new file mode 100644 index 000000000000..959a2c717edf --- /dev/null +++ b/.github/workflows/cuda.yml @@ -0,0 +1,96 @@ +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.2" + - 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 <