Skip to content

Commit

Permalink
[fix #477] rewrite travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
fmichonneau committed Aug 7, 2020
1 parent b12821e commit 790278e
Showing 1 changed file with 48 additions and 15 deletions.
63 changes: 48 additions & 15 deletions bin/boilerplate/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,57 @@
# Travis CI is only used to check the lesson and is not involved in its deployment
dist: xenial # Ubuntu 16.04 (required for python 3.7)
language: python
python: 3.7
dist: bionic
language: ruby
rvm:
- 2.7.1

branches:
only:
- gh-pages
- /.*/

cache:
apt: true
bundler: true
directories:
- /home/travis/.rvm/
- $R_LIBS_USER
- $HOME/.cache/pip

env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
- R_LIBS_USER=~/R/Library
- R_LIBS_SITE=/usr/local/lib/R/site-library:/usr/lib/R/site-library
- R_VERSION=4.0.2

before_install:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- echo "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -y
- sudo apt-get install -y r-base
- sudo Rscript -e "install.packages('knitr', repos = 'https://', dependencies = TRUE)"
- sudo Rscript -e "install.packages('stringr', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- sudo Rscript -e "install.packages('checkpoint', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- sudo Rscript -e "install.packages('ggplot2', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- rvm default
- gem install json kramdown jekyll bundler
install:
- pip install pyyaml
## Install R + pandoc + dependencies
- sudo add-apt-repository -y "ppa:marutter/rrutter4.0"
- sudo add-apt-repository -y "ppa:c2d4u.team/c2d4u4.0+"
- sudo add-apt-repository -y "ppa:ubuntugis/ppa"
- sudo add-apt-repository -y "ppa:cran/travis"
- travis_apt_get_update
- 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
- export PATH=${TRAVIS_HOME}/R-bin/bin:$PATH
- export LD_LIBRARY_PATH=${TRAVIS_HOME}/R-bin/lib:$LD_LIBRARY_PATH
- sudo mkdir -p /usr/local/lib/R/site-library $R_LIBS_USER
- sudo chmod 2777 /usr/local/lib/R /usr/local/lib/R/site-library $R_LIBS_USER
- echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"))' > ~/.Rprofile.site
- export R_PROFILE=~/.Rprofile.site
- curl -fLo /tmp/texlive.tar.gz https://github.com/jimhester/ubuntu-bin/releases/download/latest/texlive.tar.gz
- tar xzf /tmp/texlive.tar.gz -C ~
- export PATH=${TRAVIS_HOME}/texlive/bin/x86_64-linux:$PATH
- tlmgr update --self
- curl -fLo /tmp/pandoc-2.2-1-amd64.deb https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-1-amd64.deb
- sudo dpkg -i /tmp/pandoc-2.2-1-amd64.deb
- sudo apt-get install -f
- rm /tmp/pandoc-2.2-1-amd64.deb
- 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)"
- Rscript -e 'sessionInfo()'
## Install python and dependencies
- python3 -m pip install --upgrade pip setuptools wheel
- python3 -m pip install pyyaml

script:
- make lesson-check-all
- make --always-make site

0 comments on commit 790278e

Please sign in to comment.