Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] use GitHub Actions for R CI jobs (fixes #2353) #3119

Merged
merged 95 commits into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
7e9d16a
GitHub Actions
jameslamb May 22, 2020
4c9d0cc
ok
jameslamb May 22, 2020
740d1d9
fixing on list
jameslamb May 22, 2020
6b619cc
stuff
jameslamb May 22, 2020
d83f54d
directories
jameslamb May 22, 2020
2e8be83
directories
jameslamb May 22, 2020
275119e
things
jameslamb May 22, 2020
6186106
env variables
jameslamb May 22, 2020
faf2e8d
working dir
jameslamb May 22, 2020
b6423d3
running a bunch of tasks
jameslamb May 22, 2020
482ae93
more builds
jameslamb May 22, 2020
6f783d8
PATH
jameslamb May 22, 2020
48eb0ef
actually use R task
jameslamb May 22, 2020
8bef95c
TASK
jameslamb May 22, 2020
e515ae7
be right, often
jameslamb May 22, 2020
deda7f6
doing stuff
jameslamb May 22, 2020
1f00cd2
trying stuff
jameslamb May 22, 2020
da5de22
more paths
jameslamb May 22, 2020
115bbe1
conda activate
jameslamb May 22, 2020
8822def
updating PATH
jameslamb May 22, 2020
d741afc
trying bash
jameslamb May 22, 2020
4828392
where the hell is activate
jameslamb May 22, 2020
ceb2ff2
WHERE IS ACTIVATE
jameslamb May 22, 2020
3c5a64e
set up conda
jameslamb May 22, 2020
b019735
more conda
jameslamb May 22, 2020
a8340c8
PLEASE WORK
jameslamb May 22, 2020
106402b
installing cpplint
jameslamb May 22, 2020
ebff0f6
try r-package
jameslamb May 22, 2020
0626247
R version
jameslamb May 22, 2020
b627d82
try windows job
jameslamb May 22, 2020
05b9b87
make windows work
jameslamb May 22, 2020
dcefc10
use powershell
jameslamb May 22, 2020
1ce1a97
exe
jameslamb May 22, 2020
7c08d5d
use conda
jameslamb May 22, 2020
ee1c6c3
conda init powershell
jameslamb May 22, 2020
72240c4
different conda approach
jameslamb May 22, 2020
2ec6808
make it work
jameslamb May 22, 2020
d5a97b9
cleaning up
jameslamb May 22, 2020
9372b41
init powershell
jameslamb May 22, 2020
56e94e6
fixing windows
jameslamb May 23, 2020
22c082f
more windows
jameslamb May 23, 2020
b4f96e1
build directory
jameslamb May 23, 2020
2b24d8c
no way right
jameslamb May 23, 2020
1a63eef
maybe it will work
jameslamb May 23, 2020
54a58c3
trying Visual Studio
jameslamb May 23, 2020
045d530
do this
jameslamb May 23, 2020
68a17ee
Windows is interesting
jameslamb May 23, 2020
eb75583
put back check-output
jameslamb May 23, 2020
81e387e
set compiler
jameslamb May 23, 2020
f2a0d10
stuff
jameslamb May 23, 2020
5b786ed
more fixes
jameslamb May 23, 2020
38f5e5d
fix the broken things
jameslamb May 23, 2020
a384208
updating jobs
jameslamb May 23, 2020
20ad23e
continuing
jameslamb May 23, 2020
39fdc4f
poweshell is bad
jameslamb May 23, 2020
adb7751
ok so maybe not powershell
jameslamb May 23, 2020
fefa2ab
cmon now
jameslamb May 23, 2020
b4a2325
ok so
jameslamb May 23, 2020
0d04289
fixing env variables
jameslamb May 23, 2020
294c32c
maybe this
jameslamb May 24, 2020
8918cb3
MINGW job
jameslamb May 24, 2020
cf2b784
cleaning up
jameslamb May 24, 2020
ff365e0
conda init powershell
jameslamb May 24, 2020
0454738
moving more R stuff into GitHub Actions
jameslamb May 24, 2020
e6230fa
everything else
jameslamb May 24, 2020
70e657e
use powershell
jameslamb May 24, 2020
19c7ac5
cmon now powershell
jameslamb May 24, 2020
b5aceda
ttry to Continue
jameslamb May 24, 2020
66c15a1
override powershell
jameslamb May 24, 2020
cd3f72c
peg MiKTeX URL
jameslamb May 24, 2020
8aa0b12
what is happening
jameslamb May 24, 2020
0cf6913
try powershell -File
jameslamb May 24, 2020
68de8ad
trying stuff
jameslamb May 24, 2020
b85213c
path
jameslamb May 24, 2020
f6469bf
more testing of output
jameslamb May 25, 2020
fe9a80c
Matches uppercase
jameslamb May 25, 2020
58ad283
more regex stuff
jameslamb May 25, 2020
7af8130
this is getting ridiculous
jameslamb May 25, 2020
295c7d0
back to powershell I guess
jameslamb May 25, 2020
95b2ad5
more commands
jameslamb May 25, 2020
f6fc655
this might work
jameslamb May 25, 2020
3ebeccd
adding more reliable miktex download
jameslamb May 25, 2020
9b23823
trying to download miktex
jameslamb May 25, 2020
0077756
installing httr
jameslamb May 25, 2020
ba94d94
fix error in MiKTeX script
jameslamb May 25, 2020
19179a9
remove comments
jameslamb May 25, 2020
c2c6a39
redirect output
jameslamb May 26, 2020
75fc7c1
redirect output
jameslamb May 26, 2020
4278d61
move linting back to Travis
jameslamb May 26, 2020
2e8d8a8
change redirection
jameslamb May 26, 2020
6efe52f
switch back to just mac and linux
jameslamb May 28, 2020
f06fd22
put linting exclude back
jameslamb May 28, 2020
1ea7a36
renamed R_TRAVIS_LINUX
jameslamb May 30, 2020
728d7f0
revert changes to non-R tasks and update events
jameslamb May 30, 2020
0710aae
simplify
jameslamb May 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ 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_ACTIONS == "true" ]]; then
wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
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
Expand Down
4 changes: 2 additions & 2 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,7 +23,7 @@ if [[ $TRAVIS == "true" ]] && [[ $OS_NAME == "linux" ]]; then
sudo apt-get install \
--no-install-recommends \
-y \
r-base-dev=${R_TRAVIS_LINUX_VERSION} \
r-base-dev=${R_LINUX_VERSION} \
texinfo \
texlive-latex-recommended \
texlive-fonts-recommended \
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: GitHub Actions

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
strategy:
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
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 5
submodules: true
- name: Setup and run tests on Linux and macOS
if: matrix.os != 'windows-latest'
shell: bash
run: |
export TASK="${{ matrix.task }}"
export COMPILER="${{ matrix.compiler }}"
export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
export OS_NAME="macos"
export R_MAC_VERSION=3.6.3
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux"
export R_LINUX_VERSION=3.6.3-1bionic;
fi
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export CONDA_ENV="test-env"
export CONDA="$HOME/miniconda"
export PATH="$CONDA/bin:${HOME}/.local/bin:$PATH"
export LGB_VER=$(head -n 1 VERSION.txt)
$GITHUB_WORKSPACE/.ci/setup.sh
$GITHUB_WORKSPACE/.ci/test.sh
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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:
Expand All @@ -44,11 +43,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"
Expand Down
9 changes: 2 additions & 7 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
vmImage: 'ubuntu-latest'
container: ubuntu1404
strategy:
maxParallel: 7
maxParallel: 6
matrix:
regular:
TASK: regular
Expand All @@ -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=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
Expand Down Expand Up @@ -74,7 +72,7 @@ jobs:
pool:
vmImage: 'macOS-10.14'
strategy:
maxParallel: 4
maxParallel: 3
matrix:
regular:
TASK: regular
Expand All @@ -84,8 +82,6 @@ jobs:
PYTHON_VERSION: 3.5
bdist:
TASK: bdist
r_package:
TASK: r-package
steps:
- script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
Expand All @@ -96,7 +92,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
Expand Down