From 97c4720f0b99234566a095abbe6f1813ec6f0dca Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 20:51:52 -0500 Subject: [PATCH 001/105] GitHub Actions --- .github/workflows/main.yml | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000000..10f558c02465 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,59 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +strategy: + fail-fast: false + matrix: + os: [ubuntu-16.04, ubuntu-18.04] + task: [r-package] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + - name: env_vars + run: | + test -n $CC && unset CC + test -n $CXX && unset CXX + export HOME_DIRECTORY="$HOME" + export BUILD_DIRECTORY="$TRAVIS_BUILD_DIR" + if [[ $TRAVIS_OS_NAME == "osx" ]]; then + export OS_NAME="macos"; + export COMPILER="gcc"; + export R_MAC_VERSION=3.6.3; + else + export OS_NAME="linux"; + export COMPILER="clang"; + export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; + fi + export CONDA="$HOME/miniconda" + export PATH="$CONDA/bin:$PATH" + export CONDA_ENV="test-env" + export LGB_VER=$(head -n 1 VERSION.txt) + export AMDAPPSDK_PATH=$HOME/AMDAPPSDK + export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="/usr/local/clang/lib:$LD_LIBRARY_PATH" # fix error "libomp.so: cannot open shared object file: No such file or directory" on Linux with Clang + export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors + - name: setup + env: + TASK: {{ matrix.task }} + run: bash .ci/setup.sh + - name: test + env: + TASK: {{ matrix.task }} + run: bash .ci/test.sh From f84965a57969d00603fb37cd6aa317038c377ae0 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 20:56:22 -0500 Subject: [PATCH 002/105] ok --- .github/workflows/main.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10f558c02465..8ca5f1caa041 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,22 +5,20 @@ name: CI # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -strategy: - fail-fast: false - matrix: - os: [ubuntu-16.04, ubuntu-18.04] - task: [r-package] + - push: + branches: [ master ] + - pull_request: + branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: - # The type of runner that the job will run on + strategy: + fail-fast: false + matrix: + os: [ubuntu-16.04, ubuntu-18.04] + task: [r-package] runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job From d9ea1be2e1c85b3c28e18a41da24d51364d2dd60 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 20:57:49 -0500 Subject: [PATCH 003/105] fixing on list --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ca5f1caa041..10ffcc3efde3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,10 +5,10 @@ name: CI # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: - - push: - branches: [ master ] - - pull_request: - branches: [ master ] + push: + branches: [ master ] + pull_request: + branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: From fbca02583830d64c70dad2070f2bc92d18ebd5c1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:01:16 -0500 Subject: [PATCH 004/105] stuff --- .github/workflows/main.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10ffcc3efde3..f7f7effbbac2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,11 +4,7 @@ name: CI # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: [push] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -18,7 +14,6 @@ jobs: fail-fast: false matrix: os: [ubuntu-16.04, ubuntu-18.04] - task: [r-package] runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job @@ -49,9 +44,9 @@ jobs: export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors - name: setup env: - TASK: {{ matrix.task }} + TASK: r-package run: bash .ci/setup.sh - name: test env: - TASK: {{ matrix.task }} + TASK: r-package run: bash .ci/test.sh From ec6dfdba60c89b6598ef501473dab8ed570adf08 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:06:01 -0500 Subject: [PATCH 005/105] directories --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7f7effbbac2..686d57ad3e4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,7 @@ # This is a basic workflow to help you get started with Actions - +# workflow syntax: +# - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsenv +# - name: CI # Controls when the action will run. Triggers the workflow on push or pull request @@ -24,7 +26,7 @@ jobs: test -n $CC && unset CC test -n $CXX && unset CXX export HOME_DIRECTORY="$HOME" - export BUILD_DIRECTORY="$TRAVIS_BUILD_DIR" + export BUILD_DIRECTORY="$GITHUB_WORKSPACE" if [[ $TRAVIS_OS_NAME == "osx" ]]; then export OS_NAME="macos"; export COMPILER="gcc"; From 45a44aa21f78c6124941b5cf785125be2a802f5d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:06:48 -0500 Subject: [PATCH 006/105] directories --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 686d57ad3e4f..567a681ded77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,9 @@ name: CI # events but only for the master branch on: [push] +env: + GITHUB_ACTIONS: "true" + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" From 7132aefb64a23d459e480bc8ee02df1a16de8bf2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:09:31 -0500 Subject: [PATCH 007/105] things --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 567a681ded77..6a863ad31efa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,7 @@ jobs: test -n $CC && unset CC test -n $CXX && unset CXX export HOME_DIRECTORY="$HOME" + echo ${GITHUB_WORKSPACE} export BUILD_DIRECTORY="$GITHUB_WORKSPACE" if [[ $TRAVIS_OS_NAME == "osx" ]]; then export OS_NAME="macos"; From 4cc2fbbbdc71b1bbc92a364b259b8dc2a92c3090 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:14:26 -0500 Subject: [PATCH 008/105] env variables --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a863ad31efa..1b4752bb3751 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,8 +51,10 @@ jobs: - name: setup env: TASK: r-package + working-directory: ${BUILD_DIRECTORY} run: bash .ci/setup.sh - name: test + working-directory: ${BUILD_DIRECTORY} env: TASK: r-package run: bash .ci/test.sh From 77ddfcbcf0d39c51416b577cc9a48f1d00d0dd46 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:15:30 -0500 Subject: [PATCH 009/105] working dir --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b4752bb3751..4e09a1914d8b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,10 +51,10 @@ jobs: - name: setup env: TASK: r-package - working-directory: ${BUILD_DIRECTORY} + working-directory: /home/runner/work/LightGBM/LightGBM run: bash .ci/setup.sh - name: test - working-directory: ${BUILD_DIRECTORY} + working-directory: /home/runner/work/LightGBM/LightGBM env: TASK: r-package run: bash .ci/test.sh From c36871ef4619b4881ea7dff37b2ddfc589c6ccbc Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:21:08 -0500 Subject: [PATCH 010/105] running a bunch of tasks --- .github/workflows/main.yml | 129 ++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 51 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e09a1914d8b..59db5bd54543 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,60 +1,87 @@ -# This is a basic workflow to help you get started with Actions -# workflow syntax: -# - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsenv -# - -name: CI +name: GitHub Actions -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: [push] -env: - GITHUB_ACTIONS: "true" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: + test: + name: ${{ matrix.task }} (${{ matrix.os }}) + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-16.04, ubuntu-18.04] - runs-on: ${{ matrix.os }} - - # Steps represent a sequence of tasks that will be executed as part of the job + task: [regular, sdist, bdist, if-else, pylint, mpi-source, mpi-pip, gpu-source, gpu-pip] + os: [ubuntu-latest, macOS-latest, windows-latest] + include: + - task: regular + python_version: 3.6 + - task: sdist + python_version: 2.7 + - task: mpi-source + method: source + - task: mpi-pip + method: pip + - task: gpu-source + method: source + python_version: 3.5 + - task: gpu-pip + method: pip + python_version: 3.6 + exclude: + - os: macOS-latest + task: pylint + - os: macOS-latest + task: gpu-source + - os: macOS-latest + task: gpu-pip + - os: windows-latest + task: if-else + - os: windows-latest + task: pylint + - os: windows-latest + task: mpi-source + - os: windows-latest + task: mpi-pip + - os: windows-latest + task: gpu-source + - os: windows-latest + task: gpu-pip steps: - - uses: actions/checkout@v2 - - name: env_vars + - name: Checkout repository + uses: actions/checkout@v1 + with: + fetch-depth: 1 + submodules: true + - name: Setup and run tests on Linux and macOS + if: matrix.os != 'windows-latest' + shell: bash run: | - test -n $CC && unset CC - test -n $CXX && unset CXX - export HOME_DIRECTORY="$HOME" - echo ${GITHUB_WORKSPACE} - export BUILD_DIRECTORY="$GITHUB_WORKSPACE" - if [[ $TRAVIS_OS_NAME == "osx" ]]; then - export OS_NAME="macos"; - export COMPILER="gcc"; - export R_MAC_VERSION=3.6.3; - else - export OS_NAME="linux"; - export COMPILER="clang"; - export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; - fi - export CONDA="$HOME/miniconda" - export PATH="$CONDA/bin:$PATH" - export CONDA_ENV="test-env" - export LGB_VER=$(head -n 1 VERSION.txt) - export AMDAPPSDK_PATH=$HOME/AMDAPPSDK - export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - export LD_LIBRARY_PATH="/usr/local/clang/lib:$LD_LIBRARY_PATH" # fix error "libomp.so: cannot open shared object file: No such file or directory" on Linux with Clang - export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors - - name: setup - env: - TASK: r-package - working-directory: /home/runner/work/LightGBM/LightGBM - run: bash .ci/setup.sh - - name: test - working-directory: /home/runner/work/LightGBM/LightGBM - env: - TASK: r-package - run: bash .ci/test.sh + if [[ "${{ matrix.task }}" == "gpu-source" || "${{ matrix.task }}" == "gpu-pip" ]]; then + export TASK="gpu" + elif [[ "${{ matrix.task }}" == "mpi-source" || "${{ matrix.task }}" == "mpi-pip" ]]; then + export TASK="mpi" + fi + export METHOD="${{ matrix.method }}" + if [ -z ${{ matrix.python_version }} ]; then + export PYTHON_VERSION="3.7" + else + export PYTHON_VERSION=${{ matrix.python_version }} + fi + + export HOME_DIRECTORY="$HOME" + export BUILD_DIRECTORY="$GITHUB_WORKSPACE" + if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then + export OS_NAME="macos" + export COMPILER="gcc" + elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + export OS_NAME="linux" + export COMPILER="clang" + fi + export GITHUB_ACTIONS="true" + export CONDA_ENV="test-env" + export LGB_VER=$(head -n 1 VERSION.txt) + export AMDAPPSDK_PATH=$HOME/AMDAPPSDK + export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" + export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors + + $GITHUB_WORKSPACE/.ci/setup.sh + $GITHUB_WORKSPACE/.ci/test.sh From 961c7d73eab65db6f6aff7cb5c0a3fdac5f7d4b6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:25:30 -0500 Subject: [PATCH 011/105] more builds --- .github/workflows/main.yml | 51 +++----------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59db5bd54543..ddbc68bf5dd2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,42 +9,13 @@ jobs: strategy: fail-fast: false matrix: - task: [regular, sdist, bdist, if-else, pylint, mpi-source, mpi-pip, gpu-source, gpu-pip] + task: [lint, r-package] os: [ubuntu-latest, macOS-latest, windows-latest] - include: - - task: regular - python_version: 3.6 - - task: sdist - python_version: 2.7 - - task: mpi-source - method: source - - task: mpi-pip - method: pip - - task: gpu-source - method: source - python_version: 3.5 - - task: gpu-pip - method: pip - python_version: 3.6 exclude: - os: macOS-latest - task: pylint - - os: macOS-latest - task: gpu-source - - os: macOS-latest - task: gpu-pip - - os: windows-latest - task: if-else - - os: windows-latest - task: pylint - - os: windows-latest - task: mpi-source - - os: windows-latest - task: mpi-pip + task: lint - os: windows-latest - task: gpu-source - - os: windows-latest - task: gpu-pip + task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -55,18 +26,7 @@ jobs: if: matrix.os != 'windows-latest' shell: bash run: | - if [[ "${{ matrix.task }}" == "gpu-source" || "${{ matrix.task }}" == "gpu-pip" ]]; then - export TASK="gpu" - elif [[ "${{ matrix.task }}" == "mpi-source" || "${{ matrix.task }}" == "mpi-pip" ]]; then - export TASK="mpi" - fi - export METHOD="${{ matrix.method }}" - if [ -z ${{ matrix.python_version }} ]; then - export PYTHON_VERSION="3.7" - else - export PYTHON_VERSION=${{ matrix.python_version }} - fi - + export TASK="{{ matrix.task }}" export HOME_DIRECTORY="$HOME" export BUILD_DIRECTORY="$GITHUB_WORKSPACE" if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then @@ -79,9 +39,6 @@ jobs: export GITHUB_ACTIONS="true" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) - export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors - $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh From 1a6d12858f9a52365dece084eae337175edf5311 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:29:23 -0500 Subject: [PATCH 012/105] PATH --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ddbc68bf5dd2..2c52c58fe150 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,9 +36,12 @@ jobs: export OS_NAME="linux" export COMPILER="clang" fi + export CONDA="$HOME/miniconda" + export PATH="$CONDA/bin:$PATH" export GITHUB_ACTIONS="true" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) + export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh From 6c72e48254e5c21e71759f5cc35d9b98be72676d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:36:33 -0500 Subject: [PATCH 013/105] actually use R task --- .ci/test.sh | 4 ++-- .github/workflows/main.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 3cb25ee10d14..4a1144733df8 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -13,7 +13,7 @@ source activate $CONDA_ENV cd $BUILD_DIRECTORY -if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then +if [[ $TASK == "check-docs" ]]; then cd $BUILD_DIRECTORY/docs conda install -q -y -n $CONDA_ENV -c conda-forge doxygen pip install --user -r requirements.txt rstcheck @@ -40,7 +40,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then exit 0 fi -if [[ $TRAVIS == "true" ]] && [[ $TASK == "lint" ]]; then +if [[ $TASK == "lint" ]]; then conda install -q -y -n $CONDA_ENV \ pycodestyle \ pydocstyle \ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c52c58fe150..7f21466aeb15 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,5 +43,6 @@ jobs: export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" + echo "--- TASK: ${TASK}" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh From 6fdeffa516e80d9b1c26a5d4e5764e2b380473cc Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:39:44 -0500 Subject: [PATCH 014/105] TASK --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f21466aeb15..f13a833433bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: if: matrix.os != 'windows-latest' shell: bash run: | - export TASK="{{ matrix.task }}" + export TASK="${{ matrix.task }}" export HOME_DIRECTORY="$HOME" export BUILD_DIRECTORY="$GITHUB_WORKSPACE" if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then @@ -44,5 +44,10 @@ jobs: export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" echo "--- TASK: ${TASK}" - $GITHUB_WORKSPACE/.ci/setup.sh - $GITHUB_WORKSPACE/.ci/test.sh + - name: run tests + if: matrix.os != 'windows-latest' + shell: bash + run: | + + $GITHUB_WORKSPACE/.ci/setup.sh + $GITHUB_WORKSPACE/.ci/test.sh From 0d6844b40f2029c1970b6176a424a073b3d1cbe2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 21:41:16 -0500 Subject: [PATCH 015/105] be right, often --- .github/workflows/main.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f13a833433bd..3b98ded6eade 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,11 +43,5 @@ jobs: export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - echo "--- TASK: ${TASK}" - - name: run tests - if: matrix.os != 'windows-latest' - shell: bash - run: | - - $GITHUB_WORKSPACE/.ci/setup.sh - $GITHUB_WORKSPACE/.ci/test.sh + $GITHUB_WORKSPACE/.ci/setup.sh + $GITHUB_WORKSPACE/.ci/test.sh From 07ba035d9b9448c94959942bd1c4550f174b532a Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:07:30 -0500 Subject: [PATCH 016/105] doing stuff --- .ci/test_r_package.sh | 2 +- .github/workflows/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index fcd515d23c18..d9377857a518 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -13,7 +13,7 @@ export PATH="$R_LIB_PATH/R/bin:$PATH" # # This only needs to get run on Travis because R environment for Linux # used by Azure pipelines is set up in https://github.com/guolinke/lightgbm-ci-docker -if [[ $TRAVIS == "true" ]] && [[ $OS_NAME == "linux" ]]; then +if [[ $AZURE != "true" ]] && [[ $OS_NAME == "linux" ]]; then sudo apt-key adv \ --keyserver keyserver.ubuntu.com \ --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b98ded6eade..f97a2ee57db7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,7 @@ jobs: fi export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:$PATH" + echo "COONDA: $CONDA" export GITHUB_ACTIONS="true" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) From 62db734b78680f9fc91701598a45edd0cad1efc3 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:09:46 -0500 Subject: [PATCH 017/105] trying stuff --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f97a2ee57db7..60712f12b02d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,8 @@ jobs: fi export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:$PATH" - echo "COONDA: $CONDA" + echo "PATH: $PATH" + which activate export GITHUB_ACTIONS="true" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) From 4af638ce2ff612ae0d6aec96023d84bb55f61cc8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:13:14 -0500 Subject: [PATCH 018/105] more paths --- .github/workflows/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60712f12b02d..dccec6b95e12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - task: [lint, r-package] + task: [lint] # r-package os: [ubuntu-latest, macOS-latest, windows-latest] exclude: - os: macOS-latest @@ -36,11 +36,9 @@ jobs: export OS_NAME="linux" export COMPILER="clang" fi + export GITHUB_ACTIONS="true" export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:$PATH" - echo "PATH: $PATH" - which activate - export GITHUB_ACTIONS="true" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK From 2be6044209c770580274ae07dcbe6e6885ccce08 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:16:07 -0500 Subject: [PATCH 019/105] conda activate --- .ci/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/test.sh b/.ci/test.sh index 4a1144733df8..fa0055f9071f 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -9,7 +9,8 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then fi conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION -source activate $CONDA_ENV +#source activate $CONDA_ENV +conda activate $CONDA_ENV cd $BUILD_DIRECTORY From 26885096b88b3c2de37a4ef8aef6f262b630d08f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:19:15 -0500 Subject: [PATCH 020/105] updating PATH --- .ci/test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index fa0055f9071f..813cd8c6bf57 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -9,8 +9,7 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then fi conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION -#source activate $CONDA_ENV -conda activate $CONDA_ENV +source ${CONDA}/bin/activate $CONDA_ENV cd $BUILD_DIRECTORY From 96badbd8d86c9408903f3efdda485b9584df3a45 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:23:10 -0500 Subject: [PATCH 021/105] trying bash --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dccec6b95e12..ed3394815a97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,5 +43,5 @@ jobs: export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - $GITHUB_WORKSPACE/.ci/setup.sh - $GITHUB_WORKSPACE/.ci/test.sh + bash $GITHUB_WORKSPACE/.ci/setup.sh + bash $GITHUB_WORKSPACE/.ci/test.sh From 81f50e17e3187d840e6ff9d07b1baff4b30bce84 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:33:05 -0500 Subject: [PATCH 022/105] where the hell is activate --- .ci/test.sh | 2 +- .github/workflows/main.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 813cd8c6bf57..4a1144733df8 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -9,7 +9,7 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then fi conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION -source ${CONDA}/bin/activate $CONDA_ENV +source activate $CONDA_ENV cd $BUILD_DIRECTORY diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed3394815a97..608dea22680d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,9 +39,16 @@ jobs: export GITHUB_ACTIONS="true" export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:$PATH" + echo '----- CONDA/bin -----' + ls $CONDA/bin + echo '----- CONDA -----' + ls $CONDA + echo '----- PATH -----' + echo "PATH: $PATH" + echo '--------------' export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - bash $GITHUB_WORKSPACE/.ci/setup.sh - bash $GITHUB_WORKSPACE/.ci/test.sh + $GITHUB_WORKSPACE/.ci/setup.sh + $GITHUB_WORKSPACE/.ci/test.sh From 7754d01b3c80ed3b183c6347541dfa520bf832ea Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:35:59 -0500 Subject: [PATCH 023/105] WHERE IS ACTIVATE --- .ci/setup.sh | 8 ++++++++ .github/workflows/main.yml | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 0c4101189346..1fcc773f98f5 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -46,3 +46,11 @@ if [[ $TRAVIS == "true" ]] || [[ $OS_NAME == "macos" ]]; then fi conda config --set always_yes yes --set changeps1 no conda update -q -y conda + +echo '----- CONDA/bin -----' +ls $CONDA/bin +echo '----- CONDA -----' +ls $CONDA +echo '----- PATH -----' +echo "PATH: $PATH" +echo '--------------' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 608dea22680d..dccec6b95e12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,13 +39,6 @@ jobs: export GITHUB_ACTIONS="true" export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:$PATH" - echo '----- CONDA/bin -----' - ls $CONDA/bin - echo '----- CONDA -----' - ls $CONDA - echo '----- PATH -----' - echo "PATH: $PATH" - echo '--------------' export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK From f3a11f13b132329c2e52e782d2a05f9f66b9de9c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:39:18 -0500 Subject: [PATCH 024/105] set up conda --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 1fcc773f98f5..d0487b4c6ba7 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -36,7 +36,7 @@ else # Linux mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/ echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd fi - if [[ $TRAVIS == "true" ]]; then + if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIOONS == "true" ]]; then wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh fi fi From 0b896bf82bfc3a839f4ba18cd7266f60161da1f4 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:40:52 -0500 Subject: [PATCH 025/105] more conda --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index d0487b4c6ba7..faadb227d9a9 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -41,7 +41,7 @@ else # Linux fi fi -if [[ $TRAVIS == "true" ]] || [[ $OS_NAME == "macos" ]]; then +if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]] || [[ $OS_NAME == "macos" ]]; then sh conda.sh -b -p $CONDA fi conda config --set always_yes yes --set changeps1 no From 4a60c9dbda8197bcf8bb1e6716a91dcba6b1a28e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:42:55 -0500 Subject: [PATCH 026/105] PLEASE WORK --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index faadb227d9a9..b04889c53e22 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -36,7 +36,7 @@ else # Linux mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/ echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd fi - if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIOONS == "true" ]]; then + if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]]; then wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh fi fi From f60d356573228366bd93c9678f981c3bc94d3280 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:47:19 -0500 Subject: [PATCH 027/105] installing cpplint --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dccec6b95e12..58f07b4b623b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: fi export GITHUB_ACTIONS="true" export CONDA="$HOME/miniconda" - export PATH="$CONDA/bin:$PATH" + export PATH="$CONDA/bin:${HOME}/.local/bin:$PATH" export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) export AMDAPPSDK_PATH=$HOME/AMDAPPSDK From 4b556655f8da2bfb2a82e4817a1bcc8f14fe6f5c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:51:50 -0500 Subject: [PATCH 028/105] try r-package --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58f07b4b623b..9280080ee3a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - task: [lint] # r-package + task: [lint, r-package] os: [ubuntu-latest, macOS-latest, windows-latest] exclude: - os: macOS-latest From 5c9745623263c4a924fabc9683cea05599f80a38 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 22:57:02 -0500 Subject: [PATCH 029/105] R version --- .github/workflows/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9280080ee3a4..1ac6f6ea55a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,6 +26,17 @@ jobs: if: matrix.os != 'windows-latest' shell: bash run: | + export HOME_DIRECTORY="$HOME" + export BUILD_DIRECTORY="$GITHUB_WORKSPACE" + if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then + export OS_NAME="macos" + export COMPILER="gcc" + export R_MAC_VERSION=3.6.3 + elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + export OS_NAME="linux" + export COMPILER="clang" + export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; + fi export TASK="${{ matrix.task }}" export HOME_DIRECTORY="$HOME" export BUILD_DIRECTORY="$GITHUB_WORKSPACE" From f0408c01b69db068624dbeb8652b2c93f4ecb603 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:15:49 -0500 Subject: [PATCH 030/105] try windows job --- .ci/test_windows.ps1 | 2 ++ .github/workflows/main.yml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index fd0e9f95a5e4..dbee579ef812 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -10,6 +10,8 @@ function Check-Output { if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" $env:BUILD_SOURCESDIRECTORY = $env:APPVEYOR_BUILD_FOLDER +} elseif ($env:APPVEYOR -eq "true") { + $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } if ($env:TASK -eq "r-package") { diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ac6f6ea55a1..41bdee2f23f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,16 @@ jobs: matrix: task: [lint, r-package] os: [ubuntu-latest, macOS-latest, windows-latest] + include: + - os: ubuntu-latest + task: r-package + - os: macOS-latest + task: r-package + - os: windows-latest + task: r-package + compiler: MINGW + - os: ubuntu-latest + task: lint exclude: - os: macOS-latest task: lint @@ -37,6 +47,9 @@ jobs: export COMPILER="clang" export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; fi + if [ -z ${{ matrix.compiler }} ]; then + export COMPILER=${{ matrix.compiler }} + fi export TASK="${{ matrix.task }}" export HOME_DIRECTORY="$HOME" export BUILD_DIRECTORY="$GITHUB_WORKSPACE" @@ -56,3 +69,12 @@ jobs: export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh + - name: Setup and run tests on Windows + if: matrix.os == 'windows-latest' + shell: pwsh + run: | + $env:HOME_DIRECTORY=$env:HOME + $env:GITHUB_ACTIONS="true" + $env:CONDA_ENV="test-env" + & "conda init powershell" + & "powershell -ExecutionPolicy Bypass -File %BUILD_DIRECTORY%/.ci/test_windows.ps1" From bd30d4b809bbadd43f0e3fbdb8862ff9b6c686dd Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:20:57 -0500 Subject: [PATCH 031/105] make windows work --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41bdee2f23f9..93277e7c09b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,6 +75,4 @@ jobs: run: | $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" - $env:CONDA_ENV="test-env" - & "conda init powershell" & "powershell -ExecutionPolicy Bypass -File %BUILD_DIRECTORY%/.ci/test_windows.ps1" From 4d96541c1707a13432fd5d9c714a0e845a66fd88 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:23:01 -0500 Subject: [PATCH 032/105] use powershell --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93277e7c09b0..bf0e6e2e9855 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: $GITHUB_WORKSPACE/.ci/test.sh - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: pwsh + shell: cmd run: | $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" From def0258bfb0f18b6611c6540ba182018c4a97ef1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:26:37 -0500 Subject: [PATCH 033/105] exe --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf0e6e2e9855..a93b018a7ed9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,4 +75,4 @@ jobs: run: | $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" - & "powershell -ExecutionPolicy Bypass -File %BUILD_DIRECTORY%/.ci/test_windows.ps1" + powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From 7790c0e3dc5c32cb78ae2c958cb4ddbf7d9dcfc2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:50:20 -0500 Subject: [PATCH 034/105] use conda --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a93b018a7ed9..449ca80d3a9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: task: [lint, r-package] - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [windows-latest] # ubuntu-latest, macOS-latest, include: - os: ubuntu-latest task: r-package @@ -69,6 +69,12 @@ jobs: export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh + # reference: https://github.com/marketplace/actions/setup-conda + - name: Use conda on Windows + if: matrix.os == 'windows-latest' + uses: s-weigand/setup-conda@v1 + with: + activate-conda: true - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: cmd From 08a75b8027ea7b23fb835abe20ccf0cc6a27a479 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 23:57:51 -0500 Subject: [PATCH 035/105] conda init powershell --- .github/workflows/main.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 449ca80d3a9b..3bb91a039f5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,23 +9,21 @@ jobs: strategy: fail-fast: false matrix: - task: [lint, r-package] - os: [windows-latest] # ubuntu-latest, macOS-latest, include: - - os: ubuntu-latest - task: r-package - - os: macOS-latest - task: r-package + # - os: ubuntu-latest + # task: r-package + # - os: macOS-latest + # task: r-package - os: windows-latest task: r-package compiler: MINGW - - os: ubuntu-latest - task: lint - exclude: - - os: macOS-latest - task: lint - - os: windows-latest - task: lint + # - os: ubuntu-latest + # task: lint + # exclude: + # - os: macOS-latest + # task: lint + # - os: windows-latest + # task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -81,4 +79,5 @@ jobs: run: | $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" + conda init powershell powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From a21c56ca7a60e76d053a74f37e521e06bf9d8892 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 00:09:50 -0500 Subject: [PATCH 036/105] different conda approach --- .appveyor.yml | 2 -- .github/workflows/main.yml | 12 +++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index f27fa78fb89c..5aa149bfe5d3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,8 +13,6 @@ branches: environment: matrix: - - COMPILER: MINGW - TASK: r-package - COMPILER: MSVC TASK: r-package APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3bb91a039f5c..8f35b17e1605 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,12 +67,18 @@ jobs: export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh - # reference: https://github.com/marketplace/actions/setup-conda + # # reference: https://github.com/marketplace/actions/setup-conda + # - name: Use conda on Windows + # if: matrix.os == 'windows-latest' + # uses: s-weigand/setup-conda@v1 + # with: + # activate-conda: true + # https://github.com/marketplace/actions/setup-miniconda - name: Use conda on Windows if: matrix.os == 'windows-latest' - uses: s-weigand/setup-conda@v1 + uses: goanpeca/setup-miniconda@v1 with: - activate-conda: true + auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: cmd From 54b32def197e87153cb68379320c3558b06fc807 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 00:13:36 -0500 Subject: [PATCH 037/105] make it work --- .ci/test_windows.ps1 | 2 +- .github/workflows/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index dbee579ef812..04df3f2970a7 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -10,7 +10,7 @@ function Check-Output { if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" $env:BUILD_SOURCESDIRECTORY = $env:APPVEYOR_BUILD_FOLDER -} elseif ($env:APPVEYOR -eq "true") { +} elseif ($env:GITHUB_ACTIONS -eq "true") { $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f35b17e1605..1e8228ea31e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -85,5 +85,6 @@ jobs: run: | $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" + $env:TASK="r-package" conda init powershell powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From 7d51c4f99ab9c1fe533b452f5f66e97a9d726718 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 00:21:18 -0500 Subject: [PATCH 038/105] cleaning up --- .ci/setup.sh | 8 -------- .ci/test_r_package_windows.ps1 | 2 ++ .ci/test_windows.ps1 | 4 ++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index b04889c53e22..73adee173ca8 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -46,11 +46,3 @@ if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]] || [[ $OS_NAME == fi conda config --set always_yes yes --set changeps1 no conda update -q -y conda - -echo '----- CONDA/bin -----' -ls $CONDA/bin -echo '----- CONDA -----' -ls $CONDA -echo '----- PATH -----' -echo "PATH: $PATH" -echo '--------------' diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 966cc3dc0e91..3e4d1b2b1e2d 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -12,6 +12,8 @@ function Download-File-With-Retries { } while(!$?); } +Write-Output "schmibberty" + $env:R_WINDOWS_VERSION = "3.6.3" $env:R_LIB_PATH = "$env:BUILD_SOURCESDIRECTORY/RLibrary" -replace '[\\]', '/' $env:R_LIBS = "$env:R_LIB_PATH" diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 04df3f2970a7..68534b0ff80b 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -5,16 +5,20 @@ function Check-Output { Exit -1 } } +Write-Output "here" # unify environment variables for Azure devops and AppVeyor if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" $env:BUILD_SOURCESDIRECTORY = $env:APPVEYOR_BUILD_FOLDER } elseif ($env:GITHUB_ACTIONS -eq "true") { + Write-Output "there" $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } +Write-Output "libberty" if ($env:TASK -eq "r-package") { + Write-Output "bibberty" & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? Exit 0 } From 684f7f1dcc4f7e6bcf0a2a2a4dbf181cf185048b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 00:25:24 -0500 Subject: [PATCH 039/105] init powershell --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e8228ea31e7..1fc486de1ad1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,10 @@ jobs: uses: goanpeca/setup-miniconda@v1 with: auto-update-conda: false + - name: conda init powershell + if: matrix.os == 'windows-latest' + shell: cmd + run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: cmd @@ -86,5 +90,4 @@ jobs: $env:HOME_DIRECTORY=$env:HOME $env:GITHUB_ACTIONS="true" $env:TASK="r-package" - conda init powershell powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From c4db9cfc3818e367b1982b40f1de0fbc0566b0b5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:08:31 -0500 Subject: [PATCH 040/105] fixing windows --- .ci/test_windows.ps1 | 5 +---- .github/workflows/main.yml | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 68534b0ff80b..885a37f2e59a 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -5,20 +5,17 @@ function Check-Output { Exit -1 } } -Write-Output "here" # unify environment variables for Azure devops and AppVeyor if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" $env:BUILD_SOURCESDIRECTORY = $env:APPVEYOR_BUILD_FOLDER } elseif ($env:GITHUB_ACTIONS -eq "true") { - Write-Output "there" $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } -Write-Output "libberty" if ($env:TASK -eq "r-package") { - Write-Output "bibberty" + Write-Output "libberty" & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? Exit 0 } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fc486de1ad1..df2ad2ab2ea1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -87,7 +87,17 @@ jobs: if: matrix.os == 'windows-latest' shell: cmd run: | - $env:HOME_DIRECTORY=$env:HOME - $env:GITHUB_ACTIONS="true" - $env:TASK="r-package" + set HOME_DIRECTORY=%HOME% + set GITHUB_ACTIONS="true" + set TASK="r-package" powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + +# links +# * https://github.com/microsoft/LightGBM/issues/2353 +# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun +# * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +# * https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable +# * https://github.com/marketplace/actions/setup-miniconda +# * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources +# * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md +# * From 1055b139129b85f1640881a0a8ae0adc617e89aa Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:14:53 -0500 Subject: [PATCH 041/105] more windows --- .ci/test_windows.ps1 | 1 + .github/workflows/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 885a37f2e59a..886c83ed7e78 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -14,6 +14,7 @@ if (Test-Path env:APPVEYOR) { $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } +Write-Output "TASK: $env:TASK" if ($env:TASK -eq "r-package") { Write-Output "libberty" & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df2ad2ab2ea1..1e183dc6844f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,10 +86,10 @@ jobs: - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: cmd + env: + GITHUB_ACTIONS: "true" + TASK: "r-package" run: | - set HOME_DIRECTORY=%HOME% - set GITHUB_ACTIONS="true" - set TASK="r-package" powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 # links From 2f73f3ca306e2d190371f191387ab603a763d88b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:25:52 -0500 Subject: [PATCH 042/105] build directory --- .ci/test_r_package_windows.ps1 | 1 + .ci/test_windows.ps1 | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 3e4d1b2b1e2d..509565155373 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -13,6 +13,7 @@ function Download-File-With-Retries { } Write-Output "schmibberty" +Write-Output "BUILD_SOURCESDIRECTORY (test-r): $env:BUILD_SOURCESDIRECTORY" $env:R_WINDOWS_VERSION = "3.6.3" $env:R_LIB_PATH = "$env:BUILD_SOURCESDIRECTORY/RLibrary" -replace '[\\]', '/' diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 886c83ed7e78..ceb9d6d975d2 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -13,10 +13,9 @@ if (Test-Path env:APPVEYOR) { } elseif ($env:GITHUB_ACTIONS -eq "true") { $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } +Write-Output "BUILD_SOURCESDIRECTORY (test): $env:BUILD_SOURCESDIRECTORY" -Write-Output "TASK: $env:TASK" if ($env:TASK -eq "r-package") { - Write-Output "libberty" & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? Exit 0 } From ef522ced00d5d666b7267841b0d967af835efe05 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:34:24 -0500 Subject: [PATCH 043/105] no way right --- .ci/test_r_package_windows.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 509565155373..89060339fa6d 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -70,7 +70,9 @@ if ($env:COMPILER -eq "MINGW") { Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? + +# have to divert stderr to null because GitHub Actions treats writing to stderr as a failed task +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" 2> $null ; Check-Output $? Write-Output "Building R package" From f26b7d6dcfe615152b786c5acbf391ef55846cb9 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:41:29 -0500 Subject: [PATCH 044/105] maybe it will work --- .ci/test_r_package_windows.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 89060339fa6d..078472b6f380 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -12,7 +12,6 @@ function Download-File-With-Retries { } while(!$?); } -Write-Output "schmibberty" Write-Output "BUILD_SOURCESDIRECTORY (test-r): $env:BUILD_SOURCESDIRECTORY" $env:R_WINDOWS_VERSION = "3.6.3" @@ -72,7 +71,7 @@ Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" # have to divert stderr to null because GitHub Actions treats writing to stderr as a failed task -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" 2> $null ; Check-Output $? +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" 2> $null # ; Check-Output $? Write-Output "Building R package" From 90ae3437537e8ee0e1224424b951ecb11fe4db49 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 21:53:48 -0500 Subject: [PATCH 045/105] trying Visual Studio --- .appveyor.yml | 10 +++++----- .ci/test_r_package_windows.ps1 | 8 ++------ .ci/test_windows.ps1 | 1 - .github/workflows/main.yml | 8 +++----- .travis.yml | 20 ++++++++++---------- 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5aa149bfe5d3..1ce545ac0121 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,11 +13,11 @@ branches: environment: matrix: - - COMPILER: MSVC - TASK: r-package - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - COMPILER: MSVC - TASK: python + # - COMPILER: MSVC + # TASK: r-package + # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + # - COMPILER: MSVC + # TASK: python - COMPILER: MINGW TASK: python diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 078472b6f380..4657d8fe3ae5 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -12,8 +12,6 @@ function Download-File-With-Retries { } while(!$?); } -Write-Output "BUILD_SOURCESDIRECTORY (test-r): $env:BUILD_SOURCESDIRECTORY" - $env:R_WINDOWS_VERSION = "3.6.3" $env:R_LIB_PATH = "$env:BUILD_SOURCESDIRECTORY/RLibrary" -replace '[\\]', '/' $env:R_LIBS = "$env:R_LIB_PATH" @@ -52,7 +50,7 @@ Write-Output "Done installing Rtools" # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those -if ($env:COMPILER -eq "MINGW") { +if ($env:COMPILER -ne "MSVC") { Write-Output "Downloading MiKTeX" Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem @@ -69,9 +67,7 @@ if ($env:COMPILER -eq "MINGW") { Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" - -# have to divert stderr to null because GitHub Actions treats writing to stderr as a failed task -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" 2> $null # ; Check-Output $? +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" Write-Output "Building R package" diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index ceb9d6d975d2..04df3f2970a7 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -13,7 +13,6 @@ if (Test-Path env:APPVEYOR) { } elseif ($env:GITHUB_ACTIONS -eq "true") { $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } -Write-Output "BUILD_SOURCESDIRECTORY (test): $env:BUILD_SOURCESDIRECTORY" if ($env:TASK -eq "r-package") { & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e183dc6844f..2083bba36010 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,13 +17,11 @@ jobs: - os: windows-latest task: r-package compiler: MINGW + - os: windows-latest + task: r-package + compiler: MSVC # - os: ubuntu-latest # task: lint - # exclude: - # - os: macOS-latest - # task: lint - # - os: windows-latest - # task: lint steps: - name: Checkout repository uses: actions/checkout@v1 diff --git a/.travis.yml b/.travis.yml index 882d0f85f7ed..7e608b567e03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,17 @@ env: global: # default values - PYTHON_VERSION=3.8 matrix: - - TASK=regular PYTHON_VERSION=3.6 - - TASK=sdist PYTHON_VERSION=2.7 - - TASK=bdist - - TASK=if-else + # - TASK=regular PYTHON_VERSION=3.6 + # - TASK=sdist PYTHON_VERSION=2.7 + # - TASK=bdist + # - TASK=if-else - TASK=lint - - TASK=check-docs - - TASK=mpi METHOD=source - - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 - - TASK=gpu METHOD=source PYTHON_VERSION=3.5 - - TASK=gpu METHOD=pip PYTHON_VERSION=3.6 - - TASK=r-package + # - TASK=check-docs + # - TASK=mpi METHOD=source + # - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 + # - TASK=gpu METHOD=source PYTHON_VERSION=3.5 + # - TASK=gpu METHOD=pip PYTHON_VERSION=3.6 + # - TASK=r-package matrix: exclude: From 3fba5d9b49d8e21345148d76387a6d984cc89211 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 22:20:08 -0500 Subject: [PATCH 046/105] do this --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2083bba36010..6096bdc88990 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,7 +88,7 @@ jobs: GITHUB_ACTIONS: "true" TASK: "r-package" run: | - powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + powershell.exe -ExecutionPolicy Bypass ErrorActionPreference Continue -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 # links # * https://github.com/microsoft/LightGBM/issues/2353 @@ -98,4 +98,4 @@ jobs: # * https://github.com/marketplace/actions/setup-miniconda # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources # * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md -# * +# * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide From ee32623eea7200e489285975d2ab6eab7009681c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 22:49:06 -0500 Subject: [PATCH 047/105] Windows is interesting --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6096bdc88990..2de8a0828812 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,12 +83,12 @@ jobs: run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: cmd + shell: pwsh env: GITHUB_ACTIONS: "true" TASK: "r-package" run: | - powershell.exe -ExecutionPolicy Bypass ErrorActionPreference Continue -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links # * https://github.com/microsoft/LightGBM/issues/2353 From 09b87d9a8f85ec0e485547a29cd73453d8dc6f6b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 22:59:54 -0500 Subject: [PATCH 048/105] put back check-output --- .ci/test_r_package_windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 4657d8fe3ae5..eb09bdf28dae 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -67,7 +67,7 @@ if ($env:COMPILER -ne "MSVC") { Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? Write-Output "Building R package" From b9978cadf256b9fff183eafbb4da4e76753987a4 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 23:06:29 -0500 Subject: [PATCH 049/105] set compiler --- .github/workflows/main.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2de8a0828812..b16db00ee9fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - os: windows-latest task: r-package compiler: MSVC - # - os: ubuntu-latest - # task: lint + - os: ubuntu-latest + task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -32,8 +32,6 @@ jobs: if: matrix.os != 'windows-latest' shell: bash run: | - export HOME_DIRECTORY="$HOME" - export BUILD_DIRECTORY="$GITHUB_WORKSPACE" if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then export OS_NAME="macos" export COMPILER="gcc" @@ -65,12 +63,6 @@ jobs: export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh - # # reference: https://github.com/marketplace/actions/setup-conda - # - name: Use conda on Windows - # if: matrix.os == 'windows-latest' - # uses: s-weigand/setup-conda@v1 - # with: - # activate-conda: true # https://github.com/marketplace/actions/setup-miniconda - name: Use conda on Windows if: matrix.os == 'windows-latest' @@ -88,6 +80,9 @@ jobs: GITHUB_ACTIONS: "true" TASK: "r-package" run: | + if ("${{ matrix.compiler }}" -ne "") { + $env:COMPILER = "${{ matrix.compiler }}" + } & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links From edbe16f9b045bc36a7eab221d3fe18e4b7c96db6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 23:25:58 -0500 Subject: [PATCH 050/105] stuff --- .github/workflows/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b16db00ee9fb..008f838694c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,11 +17,11 @@ jobs: - os: windows-latest task: r-package compiler: MINGW - - os: windows-latest - task: r-package - compiler: MSVC - - os: ubuntu-latest - task: lint + # - os: windows-latest + # task: r-package + # compiler: MSVC + # - os: ubuntu-latest + # task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -86,11 +86,9 @@ jobs: & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links -# * https://github.com/microsoft/LightGBM/issues/2353 -# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun +# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners # * https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable # * https://github.com/marketplace/actions/setup-miniconda # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources # * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md -# * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide From bdc365f99544fad2692c436f8f58911c91e57a1a Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 23:33:50 -0500 Subject: [PATCH 051/105] more fixes --- .ci/test_r_package_windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index eb09bdf28dae..3f899be11c83 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -67,12 +67,12 @@ if ($env:COMPILER -ne "MSVC") { Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? Write-Output "Building R package" # R CMD check is not used for MSVC builds -if ($env:COMPILER -ne "MSVC") { +if ($env:COMPILER -eq "MINGW") { Rscript build_r.R --skip-install ; Check-Output $? $PKG_FILE_NAME = Get-Item *.tar.gz From f07d799ed02e6a8eaf2acd9453167ebaabbba57b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 23:42:10 -0500 Subject: [PATCH 052/105] fix the broken things --- .ci/test_r_package_windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 3f899be11c83..966cc3dc0e91 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -50,7 +50,7 @@ Write-Output "Done installing Rtools" # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those -if ($env:COMPILER -ne "MSVC") { +if ($env:COMPILER -eq "MINGW") { Write-Output "Downloading MiKTeX" Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem @@ -72,7 +72,7 @@ Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.pac Write-Output "Building R package" # R CMD check is not used for MSVC builds -if ($env:COMPILER -eq "MINGW") { +if ($env:COMPILER -ne "MSVC") { Rscript build_r.R --skip-install ; Check-Output $? $PKG_FILE_NAME = Get-Item *.tar.gz From fb2cc48da975749969d7f195ae05adbf6bb99d84 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 22 May 2020 23:56:25 -0500 Subject: [PATCH 053/105] updating jobs --- .appveyor.yml | 7 ++----- .ci/test_windows.ps1 | 2 -- .github/workflows/main.yml | 19 ++++++++++--------- .travis.yml | 21 ++++++++++----------- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1ce545ac0121..f3404faa68b9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,11 +13,8 @@ branches: environment: matrix: - # - COMPILER: MSVC - # TASK: r-package - # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - # - COMPILER: MSVC - # TASK: python + - COMPILER: MSVC + TASK: python - COMPILER: MINGW TASK: python diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 04df3f2970a7..fd0e9f95a5e4 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -10,8 +10,6 @@ function Check-Output { if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" $env:BUILD_SOURCESDIRECTORY = $env:APPVEYOR_BUILD_FOLDER -} elseif ($env:GITHUB_ACTIONS -eq "true") { - $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE } if ($env:TASK -eq "r-package") { diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 008f838694c7..ba765439d667 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,18 +10,18 @@ jobs: fail-fast: false matrix: include: - # - os: ubuntu-latest - # task: r-package - # - os: macOS-latest - # task: r-package + - os: ubuntu-latest + task: r-package + - os: macOS-latest + task: r-package - os: windows-latest task: r-package compiler: MINGW - # - os: windows-latest - # task: r-package - # compiler: MSVC - # - os: ubuntu-latest - # task: lint + - os: windows-latest + task: r-package + compiler: MSVC + - os: ubuntu-latest + task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -83,6 +83,7 @@ jobs: if ("${{ matrix.compiler }}" -ne "") { $env:COMPILER = "${{ matrix.compiler }}" } + $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links diff --git a/.travis.yml b/.travis.yml index 7e608b567e03..0649ec89d0dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,16 @@ env: global: # default values - PYTHON_VERSION=3.8 matrix: - # - TASK=regular PYTHON_VERSION=3.6 - # - TASK=sdist PYTHON_VERSION=2.7 - # - TASK=bdist - # - TASK=if-else - - TASK=lint - # - TASK=check-docs - # - TASK=mpi METHOD=source - # - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 - # - TASK=gpu METHOD=source PYTHON_VERSION=3.5 - # - TASK=gpu METHOD=pip PYTHON_VERSION=3.6 - # - TASK=r-package + - TASK=regular PYTHON_VERSION=3.6 + - TASK=sdist PYTHON_VERSION=2.7 + - TASK=bdist + - TASK=if-else + - TASK=check-docs + - TASK=mpi METHOD=source + - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 + - TASK=gpu METHOD=source PYTHON_VERSION=3.5 + - TASK=gpu METHOD=pip PYTHON_VERSION=3.6 + - TASK=r-package matrix: exclude: From dcc1b12bfc133032be226d376449c31799078fba Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:05:45 -0500 Subject: [PATCH 054/105] continuing --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba765439d667..05d5afef89c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,11 +79,15 @@ jobs: env: GITHUB_ACTIONS: "true" TASK: "r-package" + # https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide + # https://stackoverflow.com/a/11826589/3986677 run: | if ("${{ matrix.compiler }}" -ne "") { $env:COMPILER = "${{ matrix.compiler }}" } $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE + Write-Output "CI default for Errors: $ErrorActionPreference" + $ErrorActionPreference = "Continue" & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links From 732c1c8e4209bbe8586fcca7ebf7fd2dd4e6e862 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:16:24 -0500 Subject: [PATCH 055/105] poweshell is bad --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 05d5afef89c4..f53fd5cfea3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,7 +88,7 @@ jobs: $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE Write-Output "CI default for Errors: $ErrorActionPreference" $ErrorActionPreference = "Continue" - & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" + & cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1 2>&1" # links # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun From 99d90f5374aa65e0df318b161629ebb233c6aa55 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:34:54 -0500 Subject: [PATCH 056/105] ok so maybe not powershell --- .github/workflows/main.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f53fd5cfea3b..566e127afa38 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: [push] jobs: test: - name: ${{ matrix.task }} (${{ matrix.os }}) + name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.subtitle }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -12,14 +12,18 @@ jobs: include: - os: ubuntu-latest task: r-package + subtitle: "" - os: macOS-latest task: r-package + subtitle: "" - os: windows-latest task: r-package compiler: MINGW + subtitle: MINGW - os: windows-latest task: r-package compiler: MSVC + subtitle: MSVC - os: ubuntu-latest task: lint steps: @@ -81,14 +85,20 @@ jobs: TASK: "r-package" # https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide # https://stackoverflow.com/a/11826589/3986677 + # run: | + # if ("${{ matrix.compiler }}" -ne "") { + # $env:COMPILER = "${{ matrix.compiler }}" + # } + # $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE + # cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" run: | - if ("${{ matrix.compiler }}" -ne "") { - $env:COMPILER = "${{ matrix.compiler }}" - } - $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE - Write-Output "CI default for Errors: $ErrorActionPreference" - $ErrorActionPreference = "Continue" - & cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1 2>&1" + set COMPILER="${{ matrix.compiler }}" + set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% + powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + + +# Write-Output "CI default for Errors: $ErrorActionPreference" +# $ErrorActionPreference = "Continue" # links # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun From d54ac80273fba04f84f554a306955604446e4f01 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:36:12 -0500 Subject: [PATCH 057/105] cmon now --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 566e127afa38..fe8cb6778048 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,10 +79,9 @@ jobs: run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: pwsh + shell: cmd env: GITHUB_ACTIONS: "true" - TASK: "r-package" # https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide # https://stackoverflow.com/a/11826589/3986677 # run: | @@ -94,6 +93,7 @@ jobs: run: | set COMPILER="${{ matrix.compiler }}" set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% + set TASK="{{ matrix.task }}" powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From fd15a1873ea4ff6409b23e2c402d1bde57de12e8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:42:45 -0500 Subject: [PATCH 058/105] ok so --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe8cb6778048..91871155adf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: run: | set COMPILER="${{ matrix.compiler }}" set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% - set TASK="{{ matrix.task }}" + set TASK="${{ matrix.task }}" powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From f8977115329e709a0ca02d0d85f0a1fd71185409 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 00:49:53 -0500 Subject: [PATCH 059/105] fixing env variables --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91871155adf0..5cc13999ddb0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,9 @@ jobs: if: matrix.os == 'windows-latest' shell: cmd env: + COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" + TASK: "${{ matrix.task }}" # https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide # https://stackoverflow.com/a/11826589/3986677 # run: | @@ -91,9 +93,7 @@ jobs: # $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE # cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" run: | - set COMPILER="${{ matrix.compiler }}" set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% - set TASK="${{ matrix.task }}" powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 From 0ca95717a8f41dfbdb122195d9d79d2a3dc32c23 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 21:18:09 -0500 Subject: [PATCH 060/105] maybe this --- .github/workflows/main.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5cc13999ddb0..c6797dd6d4de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,16 +10,16 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - task: r-package - subtitle: "" - - os: macOS-latest - task: r-package - subtitle: "" - - os: windows-latest - task: r-package - compiler: MINGW - subtitle: MINGW + # - os: ubuntu-latest + # task: r-package + # subtitle: "" + # - os: macOS-latest + # task: r-package + # subtitle: "" + # - os: windows-latest + # task: r-package + # compiler: MINGW + # subtitle: MINGW - os: windows-latest task: r-package compiler: MSVC @@ -79,7 +79,7 @@ jobs: run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: cmd + shell: pwsh env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" @@ -93,9 +93,14 @@ jobs: # $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE # cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" run: | - set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% - powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + if ("${{ matrix.compiler }}" -ne "") { + $env:COMPILER = "${{ matrix.compiler }}" + } + $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE + & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" +# set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% +# powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 # Write-Output "CI default for Errors: $ErrorActionPreference" # $ErrorActionPreference = "Continue" @@ -107,3 +112,5 @@ jobs: # * https://github.com/marketplace/actions/setup-miniconda # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources # * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md +# * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide/2095623#2095623 +# From f121e8fd8f4773a68d763b943729d737bf2185e5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 21:27:12 -0500 Subject: [PATCH 061/105] MINGW job --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c6797dd6d4de..61fcfec70155 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,16 +16,16 @@ jobs: # - os: macOS-latest # task: r-package # subtitle: "" - # - os: windows-latest - # task: r-package - # compiler: MINGW - # subtitle: MINGW + - os: windows-latest + task: r-package + compiler: MINGW + subtitle: MINGW - os: windows-latest task: r-package compiler: MSVC subtitle: MSVC - - os: ubuntu-latest - task: lint + # - os: ubuntu-latest + # task: lint steps: - name: Checkout repository uses: actions/checkout@v1 From 3106c58a88a2e76cb6607dc594e78daa429bbd6c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 21:38:24 -0500 Subject: [PATCH 062/105] cleaning up --- .github/workflows/main.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61fcfec70155..e6e7f528ce23 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,17 +24,25 @@ jobs: task: r-package compiler: MSVC subtitle: MSVC - # - os: ubuntu-latest - # task: lint + - os: ubuntu-latest + task: lint steps: - name: Checkout repository uses: actions/checkout@v1 with: - fetch-depth: 1 + fetch-depth: 5 submodules: true - name: Setup and run tests on Linux and macOS if: matrix.os != 'windows-latest' shell: bash + # export AMDAPPSDK_PATH=$HOME/AMDAPPSDK + # export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" + # export HOME_DIRECTORY="$HOME" + env: + COMPILER: "${{ matrix.compiler }}" + CONDA_ENV: "test-env" + GITHUB_ACTIONS: "true" + TASK: "${{ matrix.task }}" run: | if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then export OS_NAME="macos" @@ -48,23 +56,10 @@ jobs: if [ -z ${{ matrix.compiler }} ]; then export COMPILER=${{ matrix.compiler }} fi - export TASK="${{ matrix.task }}" - export HOME_DIRECTORY="$HOME" export BUILD_DIRECTORY="$GITHUB_WORKSPACE" - if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then - export OS_NAME="macos" - export COMPILER="gcc" - elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then - export OS_NAME="linux" - export COMPILER="clang" - fi - export GITHUB_ACTIONS="true" export CONDA="$HOME/miniconda" export PATH="$CONDA/bin:${HOME}/.local/bin:$PATH" - export CONDA_ENV="test-env" export LGB_VER=$(head -n 1 VERSION.txt) - export AMDAPPSDK_PATH=$HOME/AMDAPPSDK - export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh # https://github.com/marketplace/actions/setup-miniconda @@ -93,9 +88,6 @@ jobs: # $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE # cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" run: | - if ("${{ matrix.compiler }}" -ne "") { - $env:COMPILER = "${{ matrix.compiler }}" - } $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" From 98f837fd29af86200aa5e75e6d448467aed1be01 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 21:48:48 -0500 Subject: [PATCH 063/105] conda init powershell --- .github/workflows/main.yml | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6e7f528ce23..7ef095d475b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,9 +10,9 @@ jobs: fail-fast: false matrix: include: - # - os: ubuntu-latest - # task: r-package - # subtitle: "" + - os: ubuntu-latest + task: r-package + subtitle: "" # - os: macOS-latest # task: r-package # subtitle: "" @@ -35,9 +35,6 @@ jobs: - name: Setup and run tests on Linux and macOS if: matrix.os != 'windows-latest' shell: bash - # export AMDAPPSDK_PATH=$HOME/AMDAPPSDK - # export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH" - # export HOME_DIRECTORY="$HOME" env: COMPILER: "${{ matrix.compiler }}" CONDA_ENV: "test-env" @@ -68,10 +65,10 @@ jobs: uses: goanpeca/setup-miniconda@v1 with: auto-update-conda: false - - name: conda init powershell - if: matrix.os == 'windows-latest' - shell: cmd - run: conda init powershell + # - name: conda init powershell + # if: matrix.os == 'windows-latest' + # shell: cmd + # run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: pwsh @@ -79,24 +76,14 @@ jobs: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" TASK: "${{ matrix.task }}" - # https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide - # https://stackoverflow.com/a/11826589/3986677 - # run: | - # if ("${{ matrix.compiler }}" -ne "") { - # $env:COMPILER = "${{ matrix.compiler }}" - # } - # $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE - # cmd /c "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" run: | $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE + conda init powershell & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% # powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 -# Write-Output "CI default for Errors: $ErrorActionPreference" -# $ErrorActionPreference = "Continue" - # links # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners @@ -105,4 +92,4 @@ jobs: # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources # * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md # * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide/2095623#2095623 -# +# * https://stackoverflow.com/a/11826589/3986677 From 40a6b841f5e362530c88a193e90bb0b9fe13841d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:04:08 -0500 Subject: [PATCH 064/105] moving more R stuff into GitHub Actions --- .github/workflows/main.yml | 31 ++++++++++++++++--------------- .travis.yml | 3 --- .vsts-ci.yml | 6 +----- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ef095d475b0..b3312dd709a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,10 +12,20 @@ jobs: include: - os: ubuntu-latest task: r-package - subtitle: "" - # - os: macOS-latest - # task: r-package - # subtitle: "" + compiler: gcc + subtitle: gcc + - os: ubuntu-latest + task: r-package + compiler: clang + subtitle: clang + - os: macOS-latest + task: r-package + compiler: gcc + subtitle: gcc + - os: macOS-latest + task: r-package + compiler: clang + subtitle: clang - os: windows-latest task: r-package compiler: MINGW @@ -43,11 +53,9 @@ jobs: run: | if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then export OS_NAME="macos" - export COMPILER="gcc" export R_MAC_VERSION=3.6.3 elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then export OS_NAME="linux" - export COMPILER="clang" export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; fi if [ -z ${{ matrix.compiler }} ]; then @@ -59,16 +67,11 @@ jobs: export LGB_VER=$(head -n 1 VERSION.txt) $GITHUB_WORKSPACE/.ci/setup.sh $GITHUB_WORKSPACE/.ci/test.sh - # https://github.com/marketplace/actions/setup-miniconda - name: Use conda on Windows if: matrix.os == 'windows-latest' uses: goanpeca/setup-miniconda@v1 with: auto-update-conda: false - # - name: conda init powershell - # if: matrix.os == 'windows-latest' - # shell: cmd - # run: conda init powershell - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' shell: pwsh @@ -79,10 +82,7 @@ jobs: run: | $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE conda init powershell - & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" - -# set BUILD_SOURCESDIRECTORY=%GITHUB_WORKSPACE% -# powershell.exe -ExecutionPolicy Bypass -File %GITHUB_WORKSPACE%/.ci/test_windows.ps1 + & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1 2&>1" # links # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun @@ -93,3 +93,4 @@ jobs: # * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md # * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide/2095623#2095623 # * https://stackoverflow.com/a/11826589/3986677 +# * https://github.com/marketplace/actions/setup-miniconda diff --git a/.travis.yml b/.travis.yml index 0649ec89d0dc..c61976e3f96d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ env: - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 - TASK=gpu METHOD=source PYTHON_VERSION=3.5 - TASK=gpu METHOD=pip PYTHON_VERSION=3.6 - - TASK=r-package matrix: exclude: @@ -31,8 +30,6 @@ matrix: env: TASK=gpu METHOD=source PYTHON_VERSION=3.5 - os: osx env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6 - - os: osx - env: TASK=lint - os: osx env: TASK=check-docs diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 359ecc4389b9..c1aa60d7c6d6 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -41,8 +41,6 @@ jobs: TASK: gpu METHOD: source PYTHON_VERSION: 3.6 - r_package: - TASK: r-package steps: - script: | echo "##vso[task.setvariable variable=HOME_DIRECTORY]$AGENT_HOMEDIRECTORY" @@ -75,7 +73,7 @@ jobs: pool: vmImage: 'macOS-10.14' strategy: - maxParallel: 4 + maxParallel: 3 matrix: regular: TASK: regular @@ -85,8 +83,6 @@ jobs: PYTHON_VERSION: 3.5 bdist: TASK: bdist - r_package: - TASK: r-package steps: - script: | echo "##vso[task.setvariable variable=HOME_DIRECTORY]$AGENT_HOMEDIRECTORY" From 7f35639b018d6520e047cea525cd3b7329279739 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:14:47 -0500 Subject: [PATCH 065/105] everything else --- .github/workflows/main.yml | 2 +- .travis.yml | 2 -- .vsts-ci.yml | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b3312dd709a5..e39ba68a886e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: run: | $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE conda init powershell - & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1 2&>1" + & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" # links # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun diff --git a/.travis.yml b/.travis.yml index c61976e3f96d..052a04d3e5b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,11 +41,9 @@ before_install: - if [[ $TRAVIS_OS_NAME == "osx" ]]; then export OS_NAME="macos"; export COMPILER="gcc"; - export R_MAC_VERSION=3.6.3; else export OS_NAME="linux"; export COMPILER="clang"; - export R_TRAVIS_LINUX_VERSION=3.6.3-1bionic; fi - export CONDA="$HOME/miniconda" - export PATH="$CONDA/bin:$PATH" diff --git a/.vsts-ci.yml b/.vsts-ci.yml index c1aa60d7c6d6..0d061dec7743 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -22,7 +22,7 @@ jobs: vmImage: 'ubuntu-latest' container: ubuntu1404 strategy: - maxParallel: 7 + maxParallel: 6 matrix: regular: TASK: regular @@ -94,7 +94,6 @@ jobs: echo "##vso[task.setvariable variable=CONDA]$CONDA" echo "##vso[task.prependpath]$CONDA/bin" echo "##vso[task.setvariable variable=JAVA_HOME]$JAVA_HOME_8_X64" - echo "##vso[task.setvariable variable=R_MAC_VERSION]3.6.3" displayName: 'Set variables' - bash: $(Build.SourcesDirectory)/.ci/setup.sh displayName: Setup From ee9450481d9312f29523c3f86d710523f43b152f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:19:23 -0500 Subject: [PATCH 066/105] use powershell --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e39ba68a886e..2de780590be8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: pwsh + shell: powershell env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" @@ -94,3 +94,4 @@ jobs: # * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide/2095623#2095623 # * https://stackoverflow.com/a/11826589/3986677 # * https://github.com/marketplace/actions/setup-miniconda +# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions From b91a1419bf207041f32326c045fabaf932561f4d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:30:58 -0500 Subject: [PATCH 067/105] cmon now powershell --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2de780590be8..a94cc1cf762c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,6 +80,7 @@ jobs: GITHUB_ACTIONS: "true" TASK: "${{ matrix.task }}" run: | + $ErrorActionPreference = "Continue" $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE conda init powershell & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" From 0ead97162f8cf5caa5cd973ab3d7d5da2fb93a32 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:53:26 -0500 Subject: [PATCH 068/105] ttry to Continue --- .ci/test_r_package_windows.ps1 | 4 ++++ .github/workflows/main.yml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 966cc3dc0e91..a0d1b8ca175d 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -12,6 +12,10 @@ function Download-File-With-Retries { } while(!$?); } +# GitHub Actions puts $ErrorActionPreference = 'stop' on the top of powershell scripts, +# which causes the script to fail if anything is written to stderr +$ErrorActionPreference = "Continue" + $env:R_WINDOWS_VERSION = "3.6.3" $env:R_LIB_PATH = "$env:BUILD_SOURCESDIRECTORY/RLibrary" -replace '[\\]', '/' $env:R_LIBS = "$env:R_LIB_PATH" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a94cc1cf762c..6c2fd6dfd888 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,13 +74,12 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: powershell + shell: pwsh env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" TASK: "${{ matrix.task }}" run: | - $ErrorActionPreference = "Continue" $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE conda init powershell & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" @@ -96,3 +95,4 @@ jobs: # * https://stackoverflow.com/a/11826589/3986677 # * https://github.com/marketplace/actions/setup-miniconda # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# * see "fail-fast behavior" in https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions From 5fb260a1c9fe8830ca55f23ca6c69103bb9d2b24 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 22:59:19 -0500 Subject: [PATCH 069/105] override powershell --- .ci/test_r_package_windows.ps1 | 4 ---- .github/workflows/main.yml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index a0d1b8ca175d..966cc3dc0e91 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -12,10 +12,6 @@ function Download-File-With-Retries { } while(!$?); } -# GitHub Actions puts $ErrorActionPreference = 'stop' on the top of powershell scripts, -# which causes the script to fail if anything is written to stderr -$ErrorActionPreference = "Continue" - $env:R_WINDOWS_VERSION = "3.6.3" $env:R_LIB_PATH = "$env:BUILD_SOURCESDIRECTORY/RLibrary" -replace '[\\]', '/' $env:R_LIBS = "$env:R_LIB_PATH" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c2fd6dfd888..07a7be58b8bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: pwsh + shell: pwsh -File {0} env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From 247fa75036f0eae561b164cab201956d91bc2afd Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 23 May 2020 23:33:55 -0500 Subject: [PATCH 070/105] peg MiKTeX URL --- .ci/test_r_package_windows.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 966cc3dc0e91..50a0ba38b099 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -18,6 +18,7 @@ $env:R_LIBS = "$env:R_LIB_PATH" $env:PATH = "$env:R_LIB_PATH/Rtools/bin;" + "$env:R_LIB_PATH/R/bin/x64;" + "$env:R_LIB_PATH/miktex/texmfs/install/miktex/bin/x64;" + $env:PATH $env:CRAN_MIRROR = "https://cloud.r-project.org/" $env:CTAN_MIRROR = "https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" +$env:MIKTEX_ZIP = "https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-2.9.7442-x64.zip" if ($env:COMPILER -eq "MINGW") { $env:CXX = "$env:R_LIB_PATH/Rtools/mingw_64/bin/g++.exe" @@ -52,7 +53,7 @@ Write-Output "Done installing Rtools" # build the package documentation for those if ($env:COMPILER -eq "MINGW") { Write-Output "Downloading MiKTeX" - Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" + Download-File-With-Retries -url "$env:MIKTEX_ZIP" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory("miktexsetup-x64.zip", "miktex") Write-Output "Setting up MiKTeX" From 0feff03e0630c980582beb91c1bbd9d707d0f1ce Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 00:05:20 -0500 Subject: [PATCH 071/105] what is happening --- .ci/test_r_package_windows.ps1 | 2 ++ .github/workflows/main.yml | 44 +++++++++++++++++----------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 50a0ba38b099..16ba76ecaefc 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -96,6 +96,8 @@ if ($env:COMPILER -ne "MSVC") { } $note_str = Get-Content "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? + Write-Output "note_str:" + Write-Output $note_str $relevant_line = $note_str -match '.*Status: (\d+) NOTE.*' $NUM_CHECK_NOTES = $matches[1] $ALLOWED_CHECK_NOTES = 3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07a7be58b8bf..a985a97da671 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,32 +10,32 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - task: r-package - compiler: gcc - subtitle: gcc - - os: ubuntu-latest - task: r-package - compiler: clang - subtitle: clang - - os: macOS-latest - task: r-package - compiler: gcc - subtitle: gcc - - os: macOS-latest - task: r-package - compiler: clang - subtitle: clang + # - os: ubuntu-latest + # task: r-package + # compiler: gcc + # subtitle: gcc + # - os: ubuntu-latest + # task: r-package + # compiler: clang + # subtitle: clang + # - os: macOS-latest + # task: r-package + # compiler: gcc + # subtitle: gcc + # - os: macOS-latest + # task: r-package + # compiler: clang + # subtitle: clang - os: windows-latest task: r-package compiler: MINGW subtitle: MINGW - - os: windows-latest - task: r-package - compiler: MSVC - subtitle: MSVC - - os: ubuntu-latest - task: lint + # - os: windows-latest + # task: r-package + # compiler: MSVC + # subtitle: MSVC + # - os: ubuntu-latest + # task: lint steps: - name: Checkout repository uses: actions/checkout@v1 From a002a10df2076c6b5892476ec7c238c49d37022f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 17:32:12 -0500 Subject: [PATCH 072/105] try powershell -File --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a985a97da671..da80eceaf265 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: pwsh -File {0} + shell: powershell -File {0} env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From cd751f3f8f24c185b6c3ab22ea2e2c30e59bbbf6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 17:39:50 -0500 Subject: [PATCH 073/105] trying stuff --- .ci/test_r_package_windows.ps1 | 6 ++++++ .github/workflows/main.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 16ba76ecaefc..5cef5dd98f30 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -98,6 +98,12 @@ if ($env:COMPILER -ne "MSVC") { $note_str = Get-Content "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? Write-Output "note_str:" Write-Output $note_str + $stuff = Get-Content "${LOG_FILE_NAME}" + Write-Output "---- stuff ----" + Write-Output $stuff + $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" + Write-Output "---- stuff2 ----" + Write-Output $stuff2 $relevant_line = $note_str -match '.*Status: (\d+) NOTE.*' $NUM_CHECK_NOTES = $matches[1] $ALLOWED_CHECK_NOTES = 3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da80eceaf265..a985a97da671 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - shell: powershell -File {0} + shell: pwsh -File {0} env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From b5759a17277fb321aedf4e9c573afc6b795b411b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 18:41:47 -0500 Subject: [PATCH 074/105] path --- .ci/test_r_package_windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 5cef5dd98f30..72028534b00a 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -95,7 +95,7 @@ if ($env:COMPILER -ne "MSVC") { Check-Output $False } - $note_str = Get-Content "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? + $note_str = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? Write-Output "note_str:" Write-Output $note_str $stuff = Get-Content "${LOG_FILE_NAME}" From 3ea1c4b9cbfaa90049f1aeafa4ff7c238fe2f541 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 19:21:05 -0500 Subject: [PATCH 075/105] more testing of output --- .ci/test_r_package_windows.ps1 | 4 +++- .github/workflows/main.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 72028534b00a..dabe63f356d6 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -101,10 +101,12 @@ if ($env:COMPILER -ne "MSVC") { $stuff = Get-Content "${LOG_FILE_NAME}" Write-Output "---- stuff ----" Write-Output $stuff - $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" + $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String Write-Output "---- stuff2 ----" Write-Output $stuff2 $relevant_line = $note_str -match '.*Status: (\d+) NOTE.*' + Write-Output "----- matches -----" + Write-Output $matches $NUM_CHECK_NOTES = $matches[1] $ALLOWED_CHECK_NOTES = 3 if ([int]$NUM_CHECK_NOTES -gt $ALLOWED_CHECK_NOTES) { diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a985a97da671..cb0efc1610bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,8 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' + # have to use 'pwsh' because with 'powershell', anything writing to + # stderr causes the job to fail shell: pwsh -File {0} env: COMPILER: "${{ matrix.compiler }}" From b99e5359bf271330f1c4dc4e233a6b27b8f514c9 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 19:56:07 -0500 Subject: [PATCH 076/105] Matches uppercase --- .ci/test_r_package_windows.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index dabe63f356d6..0afababf525f 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -98,8 +98,8 @@ if ($env:COMPILER -ne "MSVC") { $note_str = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? Write-Output "note_str:" Write-Output $note_str - $stuff = Get-Content "${LOG_FILE_NAME}" Write-Output "---- stuff ----" + $stuff = Get-Content "${LOG_FILE_NAME}" Write-Output $stuff $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String Write-Output "---- stuff2 ----" @@ -107,7 +107,10 @@ if ($env:COMPILER -ne "MSVC") { $relevant_line = $note_str -match '.*Status: (\d+) NOTE.*' Write-Output "----- matches -----" Write-Output $matches - $NUM_CHECK_NOTES = $matches[1] + Write-Output "----- Matches ----" + Write-Output $Matches + Write-Outpu "-----------" + $NUM_CHECK_NOTES = $Matches[1] $ALLOWED_CHECK_NOTES = 3 if ([int]$NUM_CHECK_NOTES -gt $ALLOWED_CHECK_NOTES) { Write-Output "Found ${NUM_CHECK_NOTES} NOTEs from R CMD check. Only ${ALLOWED_CHECK_NOTES} are allowed" From 578a1602ecf891a8b71dc911705572382ba80d24 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 21:21:46 -0500 Subject: [PATCH 077/105] more regex stuff --- .ci/test_r_package_windows.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 0afababf525f..f8b9c07bce2e 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -95,22 +95,24 @@ if ($env:COMPILER -ne "MSVC") { Check-Output $False } - $note_str = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String ; Check-Output $? + $note_str = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern '.*Status.* NOTE' | Out-String ; Check-Output $? Write-Output "note_str:" Write-Output $note_str Write-Output "---- stuff ----" $stuff = Get-Content "${LOG_FILE_NAME}" Write-Output $stuff - $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern ' NOTE' | Out-String + $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern '.*Status.* NOTE' | Out-String Write-Output "---- stuff2 ----" Write-Output $stuff2 - $relevant_line = $note_str -match '.*Status: (\d+) NOTE.*' + $relevant_line = $note_str -match '(\d+) NOTE' Write-Output "----- matches -----" Write-Output $matches Write-Output "----- Matches ----" Write-Output $Matches - Write-Outpu "-----------" - $NUM_CHECK_NOTES = $Matches[1] + Write-Output "-----------" + Write-Output "----- relevant_line -----" + Write-Output $relevant_line + $NUM_CHECK_NOTES = $matches[1] $ALLOWED_CHECK_NOTES = 3 if ([int]$NUM_CHECK_NOTES -gt $ALLOWED_CHECK_NOTES) { Write-Output "Found ${NUM_CHECK_NOTES} NOTEs from R CMD check. Only ${ALLOWED_CHECK_NOTES} are allowed" From 963de65f28f4b9ca68dfe344f9b3fb2a3a892f07 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 21:26:47 -0500 Subject: [PATCH 078/105] empty commit From b0c02e659b39f754c61843f5610d51c55581adf2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 21:51:33 -0500 Subject: [PATCH 079/105] this is getting ridiculous --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb0efc1610bd..2d48e4dccffd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,7 +76,7 @@ jobs: if: matrix.os == 'windows-latest' # have to use 'pwsh' because with 'powershell', anything writing to # stderr causes the job to fail - shell: pwsh -File {0} + shell: pwsh -NonInteractive -ExecutionPolicy Bypass -File {0} env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From bfe0f300da4549a378ebfcc8ab389b63510280fb Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 21:56:52 -0500 Subject: [PATCH 080/105] back to powershell I guess --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d48e4dccffd..3336daffade9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,7 +76,7 @@ jobs: if: matrix.os == 'windows-latest' # have to use 'pwsh' because with 'powershell', anything writing to # stderr causes the job to fail - shell: pwsh -NonInteractive -ExecutionPolicy Bypass -File {0} + shell: powershell -NonInteractive -ExecutionPolicy Bypass -File {0} env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From 7b5057ce6fc9b7462d42e6d645d6c9bd86e8d2c5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 22:04:13 -0500 Subject: [PATCH 081/105] more commands --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3336daffade9..a6534a0d9002 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,7 +76,7 @@ jobs: if: matrix.os == 'windows-latest' # have to use 'pwsh' because with 'powershell', anything writing to # stderr causes the job to fail - shell: powershell -NonInteractive -ExecutionPolicy Bypass -File {0} + shell: pwsh -NonInteractive -ExecutionPolicy Bypass -Command "& '{0}'" env: COMPILER: "${{ matrix.compiler }}" GITHUB_ACTIONS: "true" From 861f82daeb6f521c7029137bef2067cfd3a865d1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 22:25:10 -0500 Subject: [PATCH 082/105] this might work --- .ci/test_r_package_windows.ps1 | 18 +----------- .github/workflows/main.yml | 50 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index f8b9c07bce2e..371eda68210d 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -18,7 +18,6 @@ $env:R_LIBS = "$env:R_LIB_PATH" $env:PATH = "$env:R_LIB_PATH/Rtools/bin;" + "$env:R_LIB_PATH/R/bin/x64;" + "$env:R_LIB_PATH/miktex/texmfs/install/miktex/bin/x64;" + $env:PATH $env:CRAN_MIRROR = "https://cloud.r-project.org/" $env:CTAN_MIRROR = "https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" -$env:MIKTEX_ZIP = "https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-2.9.7442-x64.zip" if ($env:COMPILER -eq "MINGW") { $env:CXX = "$env:R_LIB_PATH/Rtools/mingw_64/bin/g++.exe" @@ -53,7 +52,7 @@ Write-Output "Done installing Rtools" # build the package documentation for those if ($env:COMPILER -eq "MINGW") { Write-Output "Downloading MiKTeX" - Download-File-With-Retries -url "$env:MIKTEX_ZIP" -destfile "miktexsetup-x64.zip" + Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory("miktexsetup-x64.zip", "miktex") Write-Output "Setting up MiKTeX" @@ -96,22 +95,7 @@ if ($env:COMPILER -ne "MSVC") { } $note_str = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern '.*Status.* NOTE' | Out-String ; Check-Output $? - Write-Output "note_str:" - Write-Output $note_str - Write-Output "---- stuff ----" - $stuff = Get-Content "${LOG_FILE_NAME}" - Write-Output $stuff - $stuff2 = Get-Content -Path "${LOG_FILE_NAME}" | Select-String -Pattern '.*Status.* NOTE' | Out-String - Write-Output "---- stuff2 ----" - Write-Output $stuff2 $relevant_line = $note_str -match '(\d+) NOTE' - Write-Output "----- matches -----" - Write-Output $matches - Write-Output "----- Matches ----" - Write-Output $Matches - Write-Output "-----------" - Write-Output "----- relevant_line -----" - Write-Output $relevant_line $NUM_CHECK_NOTES = $matches[1] $ALLOWED_CHECK_NOTES = 3 if ([int]$NUM_CHECK_NOTES -gt $ALLOWED_CHECK_NOTES) { diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6534a0d9002..55e9501a6a31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,32 +10,32 @@ jobs: fail-fast: false matrix: include: - # - os: ubuntu-latest - # task: r-package - # compiler: gcc - # subtitle: gcc - # - os: ubuntu-latest - # task: r-package - # compiler: clang - # subtitle: clang - # - os: macOS-latest - # task: r-package - # compiler: gcc - # subtitle: gcc - # - os: macOS-latest - # task: r-package - # compiler: clang - # subtitle: clang + - os: ubuntu-latest + task: r-package + compiler: gcc + subtitle: gcc + - os: ubuntu-latest + task: r-package + compiler: clang + subtitle: clang + - os: macOS-latest + task: r-package + compiler: gcc + subtitle: gcc + - os: macOS-latest + task: r-package + compiler: clang + subtitle: clang - os: windows-latest task: r-package compiler: MINGW subtitle: MINGW - # - os: windows-latest - # task: r-package - # compiler: MSVC - # subtitle: MSVC - # - os: ubuntu-latest - # task: lint + - os: windows-latest + task: r-package + compiler: MSVC + subtitle: MSVC + - os: ubuntu-latest + task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -74,8 +74,8 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - # have to use 'pwsh' because with 'powershell', anything writing to - # stderr causes the job to fail + # have to use this explicit command to override the GitHub Actions + # default, where any command writing to stderr causes build failures shell: pwsh -NonInteractive -ExecutionPolicy Bypass -Command "& '{0}'" env: COMPILER: "${{ matrix.compiler }}" @@ -86,7 +86,7 @@ jobs: conda init powershell & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" -# links +# references # * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun # * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners # * https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable From 99566ba60cf45d7916512f0ab59d6d13bd25c759 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 22:56:36 -0500 Subject: [PATCH 083/105] empty commit From f879a9f234ce86f429349da63bf878c28245a089 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:14:08 -0500 Subject: [PATCH 084/105] adding more reliable miktex download --- .ci/download-miktex.R | 25 +++++++++++++++++++++++++ .ci/test_r_package_windows.ps1 | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .ci/download-miktex.R diff --git a/.ci/download-miktex.R b/.ci/download-miktex.R new file mode 100644 index 000000000000..89ce4f1fc5fa --- /dev/null +++ b/.ci/download-miktex.R @@ -0,0 +1,25 @@ +# mirrors that host miktexsetup.zip do so only with explicitly-named +# files like miktexsetup-2.4.5.zip, so hard-coding a link to an archive as a +# way to peg to one mirror does not work +# +# this script will find the specific version of miktexsetup.zip at a given +# mirror +library(httr) +args <- commandArgs(trailingOnly = TRUE) +DESTFILE <- args[[1L]] +MIRROR <- "https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/" +mirror_contents <- httr::content( + httr::RETRY("GET", mirror) + , as = "text" +) +content_lines <- strsplit(mirror_contents, "\n")[[1L]] +content_lines <- content_lines[grepl("miktexsetup-.*", content_lines)] +zip_loc <- regexpr(">miktexsetup-[0-9]+.*x64\\.zip", content_lines) +zip_name <- gsub(">", "", regmatches(content_lines, zip_loc)) +full_zip_url <- file.path(MIRROR, zip_name) +print(sprintf("downloading %s", full_zip_url)) +download.file( + url = full_zip_url + , destfile = DESTFILE +) +print(sprintf("MiKTeX setup downloaded to %s", DESTFILE)) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 371eda68210d..ff1bf0b74696 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -52,7 +52,8 @@ Write-Output "Done installing Rtools" # build the package documentation for those if ($env:COMPILER -eq "MINGW") { Write-Output "Downloading MiKTeX" - Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" + Rscript $env:BUILD_SOURCESDIRECTORY\.ci\download-miktex.R "miktexsetup-x64.zip" + #Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory("miktexsetup-x64.zip", "miktex") Write-Output "Setting up MiKTeX" From 54e986ac2d9564ff74c65defe76b53e9b2cfd83c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:18:32 -0500 Subject: [PATCH 085/105] trying to download miktex --- .ci/test_r_package_windows.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index ff1bf0b74696..7d4e2e7b44d9 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -48,6 +48,10 @@ Write-Output "Installing Rtools" Start-Process -FilePath Rtools.exe -NoNewWindow -Wait -ArgumentList "/VERYSILENT /DIR=$env:R_LIB_PATH/Rtools" ; Check-Output $? Write-Output "Done installing Rtools" +Write-Output "Installing dependencies" +$packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? + # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those if ($env:COMPILER -eq "MINGW") { @@ -66,10 +70,6 @@ if ($env:COMPILER -eq "MINGW") { conda install -q -y --no-deps pandoc } -Write-Output "Installing dependencies" -$packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? - Write-Output "Building R package" # R CMD check is not used for MSVC builds From b55d75650c60b6d7364ef2838df27eda4e48d32c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:29:22 -0500 Subject: [PATCH 086/105] empty commit From 759f0f0a743da3fb1bf01ef8b9049d547a167434 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:33:37 -0500 Subject: [PATCH 087/105] installing httr --- .ci/test_r_package_windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 7d4e2e7b44d9..7b53be1e4bbd 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -49,7 +49,7 @@ Start-Process -FilePath Rtools.exe -NoNewWindow -Wait -ArgumentList "/VERYSILENT Write-Output "Done installing Rtools" Write-Output "Installing dependencies" -$packages = "c('data.table', 'jsonlite', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" +$packages = "c('data.table', 'jsonlite', 'httr', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't From e9e0e0064acdffe1b3756f04e7884e2e40600c70 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:37:01 -0500 Subject: [PATCH 088/105] fix error in MiKTeX script --- .ci/download-miktex.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/download-miktex.R b/.ci/download-miktex.R index 89ce4f1fc5fa..f0d4b98cac5a 100644 --- a/.ci/download-miktex.R +++ b/.ci/download-miktex.R @@ -9,7 +9,7 @@ args <- commandArgs(trailingOnly = TRUE) DESTFILE <- args[[1L]] MIRROR <- "https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/" mirror_contents <- httr::content( - httr::RETRY("GET", mirror) + httr::RETRY("GET", MIRROR) , as = "text" ) content_lines <- strsplit(mirror_contents, "\n")[[1L]] From 0a3a9d4b11e45170679076e90dfb24bd01fdec35 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 24 May 2020 23:57:32 -0500 Subject: [PATCH 089/105] remove comments --- .ci/test_r_package_windows.ps1 | 1 - .github/workflows/main.yml | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 7b53be1e4bbd..73712d5d8c9a 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -57,7 +57,6 @@ Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.pac if ($env:COMPILER -eq "MINGW") { Write-Output "Downloading MiKTeX" Rscript $env:BUILD_SOURCESDIRECTORY\.ci\download-miktex.R "miktexsetup-x64.zip" - #Download-File-With-Retries -url "https://miktex.org/download/win/miktexsetup-x64.zip" -destfile "miktexsetup-x64.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory("miktexsetup-x64.zip", "miktex") Write-Output "Setting up MiKTeX" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55e9501a6a31..f653753a7e54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -85,16 +85,3 @@ jobs: $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE conda init powershell & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" - -# references -# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun -# * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners -# * https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable -# * https://github.com/marketplace/actions/setup-miniconda -# * https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources -# * https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md -# * https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide/2095623#2095623 -# * https://stackoverflow.com/a/11826589/3986677 -# * https://github.com/marketplace/actions/setup-miniconda -# * https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions -# * see "fail-fast behavior" in https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions From 80c07f12135ca2552ac9a4f9fec55a3d0ac3bf03 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 25 May 2020 23:18:15 -0500 Subject: [PATCH 090/105] redirect output --- .ci/test_r_package_windows.ps1 | 6 +++--- .ci/test_windows.ps1 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 73712d5d8c9a..604fb508b29a 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -50,7 +50,7 @@ Write-Output "Done installing Rtools" Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'httr', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" ; Check-Output $? +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" | Out-String -Stream ; Check-Output $? # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those @@ -65,7 +65,7 @@ if ($env:COMPILER -eq "MINGW") { .\miktex\download\miktexsetup.exe --remote-package-repository="$env:CTAN_MIRROR" --portable="$env:R_LIB_PATH/miktex" --quiet install ; Check-Output $? Write-Output "Done installing MiKTeX" - initexmf --set-config-value [MPM]AutoInstall=1 + initexmf --set-config-value [MPM]AutoInstall=1 | Out-String -Stream conda install -q -y --no-deps pandoc } @@ -80,7 +80,7 @@ if ($env:COMPILER -ne "MSVC") { $env:_R_CHECK_FORCE_SUGGESTS_ = 0 Write-Output "Running R CMD check as CRAN" - R.exe CMD check --no-multiarch --as-cran ${PKG_FILE_NAME} ; $check_succeeded = $? + R.exe CMD check --no-multiarch --as-cran ${PKG_FILE_NAME} | Out-String -Stream ; $check_succeeded = $? Write-Output "R CMD check build logs:" $INSTALL_LOG_FILE_NAME = "$env:BUILD_SOURCESDIRECTORY\lightgbm.Rcheck\00install.out" diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index fd0e9f95a5e4..fd246cbc0695 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -13,7 +13,7 @@ if (Test-Path env:APPVEYOR) { } if ($env:TASK -eq "r-package") { - & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? + & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 | Out-String -Stream ; Check-Output $? Exit 0 } From 0ec3805fed67775c7286b521d8784097bc6e236d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 25 May 2020 23:40:12 -0500 Subject: [PATCH 091/105] move linting back to Travis --- .github/workflows/main.yml | 12 +----------- .travis.yml | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f653753a7e54..d59f83afe5f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: [push] jobs: test: - name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.subtitle }}) + name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.compiler }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -13,29 +13,21 @@ jobs: - os: ubuntu-latest task: r-package compiler: gcc - subtitle: gcc - os: ubuntu-latest task: r-package compiler: clang - subtitle: clang - os: macOS-latest task: r-package compiler: gcc - subtitle: gcc - os: macOS-latest task: r-package compiler: clang - subtitle: clang - os: windows-latest task: r-package compiler: MINGW - subtitle: MINGW - os: windows-latest task: r-package compiler: MSVC - subtitle: MSVC - - os: ubuntu-latest - task: lint steps: - name: Checkout repository uses: actions/checkout@v1 @@ -74,8 +66,6 @@ jobs: auto-update-conda: false - name: Setup and run tests on Windows if: matrix.os == 'windows-latest' - # have to use this explicit command to override the GitHub Actions - # default, where any command writing to stderr causes build failures shell: pwsh -NonInteractive -ExecutionPolicy Bypass -Command "& '{0}'" env: COMPILER: "${{ matrix.compiler }}" diff --git a/.travis.yml b/.travis.yml index 052a04d3e5b0..c8220461f1b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ env: - TASK=sdist PYTHON_VERSION=2.7 - TASK=bdist - TASK=if-else + - TASK=lint - TASK=check-docs - TASK=mpi METHOD=source - TASK=mpi METHOD=pip PYTHON_VERSION=3.7 From b1bffdc4ef5e29e7499aa350907f0922357c83c6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 25 May 2020 23:46:34 -0500 Subject: [PATCH 092/105] change redirection --- .ci/test_r_package_windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 604fb508b29a..0e91a9b8612e 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -50,7 +50,7 @@ Write-Output "Done installing Rtools" Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'httr', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" | Out-String -Stream ; Check-Output $? +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" | Out-String -Stream # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those @@ -80,7 +80,7 @@ if ($env:COMPILER -ne "MSVC") { $env:_R_CHECK_FORCE_SUGGESTS_ = 0 Write-Output "Running R CMD check as CRAN" - R.exe CMD check --no-multiarch --as-cran ${PKG_FILE_NAME} | Out-String -Stream ; $check_succeeded = $? + R.exe CMD check --no-multiarch --as-cran ${PKG_FILE_NAME} ; $check_succeeded = $? Write-Output "R CMD check build logs:" $INSTALL_LOG_FILE_NAME = "$env:BUILD_SOURCESDIRECTORY\lightgbm.Rcheck\00install.out" From 52ac67a39449a8bbc0ab7a592f60f2b04a8076c0 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:25:11 -0500 Subject: [PATCH 093/105] to null --- .ci/test_r_package_windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 0e91a9b8612e..0625e3f7cbad 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -50,7 +50,7 @@ Write-Output "Done installing Rtools" Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'httr', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" | Out-String -Stream +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" > $null # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those @@ -65,7 +65,7 @@ if ($env:COMPILER -eq "MINGW") { .\miktex\download\miktexsetup.exe --remote-package-repository="$env:CTAN_MIRROR" --portable="$env:R_LIB_PATH/miktex" --quiet install ; Check-Output $? Write-Output "Done installing MiKTeX" - initexmf --set-config-value [MPM]AutoInstall=1 | Out-String -Stream + initexmf --set-config-value [MPM]AutoInstall=1 > $null conda install -q -y --no-deps pandoc } From 6ac1c9540d2bf1875378f374985a2e39b5f301f5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:33:41 -0500 Subject: [PATCH 094/105] more null --- .ci/test_windows.ps1 | 2 +- .github/workflows/main.yml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index fd246cbc0695..fd0e9f95a5e4 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -13,7 +13,7 @@ if (Test-Path env:APPVEYOR) { } if ($env:TASK -eq "r-package") { - & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 | Out-String -Stream ; Check-Output $? + & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_windows.ps1 ; Check-Output $? Exit 0 } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d59f83afe5f9..a6446a23ec1a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,18 +10,18 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - task: r-package - compiler: gcc - - os: ubuntu-latest - task: r-package - compiler: clang - - os: macOS-latest - task: r-package - compiler: gcc - - os: macOS-latest - task: r-package - compiler: clang + # - os: ubuntu-latest + # task: r-package + # compiler: gcc + # - os: ubuntu-latest + # task: r-package + # compiler: clang + # - os: macOS-latest + # task: r-package + # compiler: gcc + # - os: macOS-latest + # task: r-package + # compiler: clang - os: windows-latest task: r-package compiler: MINGW From a5264bdc219436aea7bfd59cbdf749e1a9ec71ed Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:38:38 -0500 Subject: [PATCH 095/105] quieter --- .ci/test_r_package_windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 0625e3f7cbad..870e188914e5 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -50,7 +50,7 @@ Write-Output "Done installing Rtools" Write-Output "Installing dependencies" $packages = "c('data.table', 'jsonlite', 'httr', 'Matrix', 'processx', 'R6', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')" -Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH')" > $null +Rscript --vanilla -e "options(install.packages.check.source = 'no'); install.packages($packages, repos = '$env:CRAN_MIRROR', type = 'binary', lib = '$env:R_LIB_PATH', verbose = FALSE)" > $null # MiKTeX and pandoc can be skipped on non-MINGW builds, since we don't # build the package documentation for those From ba57f136eaac7e0079a6f502a156d71d355c368d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:38:41 -0500 Subject: [PATCH 096/105] empty commit From 0d57b3b03a23c371ceefff0b2ae13a58b987199c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:38:45 -0500 Subject: [PATCH 097/105] empty commit From 010153be02533c95eb221708f4c6f0c50ce81e74 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:41:02 -0500 Subject: [PATCH 098/105] empty commit From 129b8db4e3f1f8d1b6452ba5c504b8f36b5fdf9f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:41:06 -0500 Subject: [PATCH 099/105] empty commit From d35420af7d6a56b6b6575b9180cec0ae12f2e129 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:44:57 -0500 Subject: [PATCH 100/105] empty commit From eab338a7b776e3e512ac206dfebc406d5276d005 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:45:03 -0500 Subject: [PATCH 101/105] empty commit From 18b7b63ebd8daf7ae8277917e7079f7a2928ccd2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:45:07 -0500 Subject: [PATCH 102/105] empty commit From d09aa6c2edf39b5c4aeb6662f8c7f320a462a3ae Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:45:19 -0500 Subject: [PATCH 103/105] empty commit From 5a6bf51302ccc8aaaf41b9da56f0ee3dcb71cec1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:45:23 -0500 Subject: [PATCH 104/105] empty commit From 92925c532f16482922aa48313245b0092020e503 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 26 May 2020 22:45:43 -0500 Subject: [PATCH 105/105] empty commit