|
1 | 1 | # Travis CI is only used to check the lesson and is not involved in its deployment |
2 | | -dist: xenial # Ubuntu 16.04 (required for python 3.7) |
3 | | -language: python |
4 | | -python: 3.7 |
| 2 | +dist: bionic |
| 3 | +language: ruby |
| 4 | +rvm: |
| 5 | + - 2.7.1 |
| 6 | + |
5 | 7 | branches: |
6 | 8 | only: |
7 | 9 | - gh-pages |
8 | 10 | - /.*/ |
| 11 | + |
| 12 | +cache: |
| 13 | + apt: true |
| 14 | + bundler: true |
| 15 | + directories: |
| 16 | + - /home/travis/.rvm/ |
| 17 | + - $R_LIBS_USER |
| 18 | + - $HOME/.cache/pip |
| 19 | + |
| 20 | +env: |
| 21 | + global: |
| 22 | + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer |
| 23 | + - R_LIBS_USER=~/R/Library |
| 24 | + - R_LIBS_SITE=/usr/local/lib/R/site-library:/usr/lib/R/site-library |
| 25 | + - R_VERSION=4.0.2 |
| 26 | + |
9 | 27 | before_install: |
10 | | - - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 |
11 | | - - echo "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" | sudo tee -a /etc/apt/sources.list |
12 | | - - sudo apt-get update -y |
13 | | - - sudo apt-get install -y r-base |
14 | | - - sudo Rscript -e "install.packages('knitr', repos = 'https://', dependencies = TRUE)" |
15 | | - - sudo Rscript -e "install.packages('stringr', repos = 'https://cran.rstudio.com', dependencies = TRUE)" |
16 | | - - sudo Rscript -e "install.packages('checkpoint', repos = 'https://cran.rstudio.com', dependencies = TRUE)" |
17 | | - - sudo Rscript -e "install.packages('ggplot2', repos = 'https://cran.rstudio.com', dependencies = TRUE)" |
18 | | - - rvm default |
19 | | - - gem install json kramdown jekyll bundler |
20 | | -install: |
21 | | - - pip install pyyaml |
| 28 | + ## Install R + pandoc + dependencies |
| 29 | + - sudo add-apt-repository -y "ppa:marutter/rrutter4.0" |
| 30 | + - sudo add-apt-repository -y "ppa:c2d4u.team/c2d4u4.0+" |
| 31 | + - sudo add-apt-repository -y "ppa:ubuntugis/ppa" |
| 32 | + - sudo add-apt-repository -y "ppa:cran/travis" |
| 33 | + - travis_apt_get_update |
| 34 | + - sudo apt-get install -y --no-install-recommends build-essential gcc g++ libblas-dev liblapack-dev libncurses5-dev libreadline-dev libjpeg-dev libpcre3-dev libpng-dev zlib1g-dev libbz2-dev liblzma-dev libicu-dev cdbs qpdf texinfo libssh2-1-dev gfortran jq python3.5 python3-pip r-base |
| 35 | + - export PATH=${TRAVIS_HOME}/R-bin/bin:$PATH |
| 36 | + - export LD_LIBRARY_PATH=${TRAVIS_HOME}/R-bin/lib:$LD_LIBRARY_PATH |
| 37 | + - sudo mkdir -p /usr/local/lib/R/site-library $R_LIBS_USER |
| 38 | + - sudo chmod 2777 /usr/local/lib/R /usr/local/lib/R/site-library $R_LIBS_USER |
| 39 | + - echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"))' > ~/.Rprofile.site |
| 40 | + - export R_PROFILE=~/.Rprofile.site |
| 41 | + - curl -fLo /tmp/texlive.tar.gz https://github.com/jimhester/ubuntu-bin/releases/download/latest/texlive.tar.gz |
| 42 | + - tar xzf /tmp/texlive.tar.gz -C ~ |
| 43 | + - export PATH=${TRAVIS_HOME}/texlive/bin/x86_64-linux:$PATH |
| 44 | + - tlmgr update --self |
| 45 | + - curl -fLo /tmp/pandoc-2.2-1-amd64.deb https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-1-amd64.deb |
| 46 | + - sudo dpkg -i /tmp/pandoc-2.2-1-amd64.deb |
| 47 | + - sudo apt-get install -f |
| 48 | + - rm /tmp/pandoc-2.2-1-amd64.deb |
| 49 | + - Rscript -e "install.packages(setdiff(c('renv', 'rprojroot'), installed.packages()), loc = Sys.getenv('R_LIBS_USER')); update.packages(lib.loc = Sys.getenv('R_LIBS_USER'), ask = FALSE, checkBuilt = TRUE)" |
| 50 | + - Rscript -e 'sessionInfo()' |
| 51 | + ## Install python and dependencies |
| 52 | + - python3 -m pip install --upgrade pip setuptools wheel |
| 53 | + - python3 -m pip install pyyaml |
| 54 | + |
22 | 55 | script: |
23 | 56 | - make lesson-check-all |
24 | 57 | - make --always-make site |
0 commit comments