This commit is contained in:
dickmao 2020-01-03 13:13:37 -05:00
parent e410d55a6d
commit 290e5fc88e
12 changed files with 77 additions and 39 deletions

View file

@ -1,10 +1,11 @@
name: CI
on:
pull-request:
push:
paths-ignore:
- '**.md'
- 'tools/*'
branches-ignore:
- 'master'
jobs:
build:
@ -21,7 +22,6 @@ jobs:
lint_ignore: 1
env:
EMACS_LINT_IGNORE: ${{ matrix.lint_ignore }}
PATH: ~/local/bin:~/local/cask/bin:~/local/R/bin:~/local/julia-1.1.0/bin:${PATH}
steps:
- uses: actions/checkout@v1
@ -40,41 +40,63 @@ jobs:
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
key: ${{ runner.os }}-pip
- uses: actions/cache@v1
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
key: ${{ runner.os }}-pip
- uses: actions/cache@v1
with:
path: ~/local
key: ${{ runner.os }}-local
- uses: actions/cache@v1
with:
path: ~/.emacs.d
key: emacs.d
- uses: actions/cache@v1
with:
path: ~/.cask
key: cask
- name: paths
uses: dickmao/setup-paths@master
with:
paths: local/bin:local/cask/bin:local/R/bin:local/julia-1.1.0/bin
- name: apt-get
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get -yq update
DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install gnutls-bin sharutils nodejs gfortran gnupg2 dirmngr libreadline-dev libcurl4-openssl-dev texlive-latex-base
- name: dependencies
run: |
mkdir -p ~/local/bin
python -m pip install --upgrade pip
pip install setuptools wheel jupyter ipykernel ipython
pip install setuptools wheel jupyter ipykernel ipython\<=7.8.0 numpy\<=1.16.4 matplotlib\<=3.0.3
python -m ipykernel install --user
sh tools/install-R.sh
sh tools/install-julia.sh
hash -r
- name: julia
if: startsWith(runner.os, 'Linux')
run: sh tools/install-julia.sh
- name: versions
run: |
jupyter kernelspec list
curl --version
ipython --version
emacs --version
- name: gnupg
if: startsWith(runner.os, 'macOS')
run: brew list gnupg &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install gnupg
- name: cask
run: |
sh tools/install-cask.sh

View file

@ -54,7 +54,7 @@ install:
pyenv activate $TOXENV ;
fi
- ${PIP} --upgrade pip
- ${PIP} wheel jupyter ipython\<=$IPYTHON ipykernel
- ${PIP} wheel jupyter ipython\<=$IPYTHON ipykernel numpy\<=1.16.0 matplotlib\<=3.0.2
- ${PY} -m ipykernel install --user
- sh tools/install-R.sh
- sh tools/install-julia.sh

View file

@ -23,7 +23,7 @@ README.rst: README.in.rst lisp/ein.el
(describe-minor-mode \"ein:notebook-mode\") \
(with-current-buffer \"*Help*\" (princ (buffer-string))))" 2>/dev/null \
| tools/readme-sed.sh "KEYS NOTEBOOK" README.in.rst "key.*binding" > README.rst0
sed "/CI VERSION/c"`grep -o 'emacs-[0-9][.0-9-]*' .travis.yml | sort -n | head -1` README.rst0 > README.rst1
sed "/CI VERSION/c"`yq .jobs.build.strategy.matrix.emacs_version .github/workflows/test.yml | jq .[] | sort -n | head -1` README.rst0 > README.rst1
grep ';;' lisp/ein.el \
| awk '/;;;\s*Commentary/{within=1;next}/;;;\s*/{within=0}within' \
| sed -e 's/^\s*;;*\s*//g' \

View file

@ -5,8 +5,8 @@
.. COMMENTARY (see Makefile)
.. |build-status|
image:: https://travis-ci.com/dickmao/emacs-ipython-notebook.svg?branch=master
:target: http://travis-ci.com/dickmao/emacs-ipython-notebook
image:: https://github.com/dickmao/emacs-ipython-notebook/workflows/CI/badge.svg
:target: https://github.com/dickmao/emacs-ipython-notebook/actions
:alt: Build Status
.. |melpa-dev|
image:: http://melpa.milkbox.net/packages/ein-badge.svg

View file

@ -14,8 +14,8 @@ EIN was originally written by `[tkf]`_. A jupyter Babel_ backend was first
introduced by `[gregsexton]`_.
.. |build-status|
image:: https://travis-ci.com/dickmao/emacs-ipython-notebook.svg?branch=master
:target: http://travis-ci.com/dickmao/emacs-ipython-notebook
image:: https://github.com/dickmao/emacs-ipython-notebook/workflows/CI/badge.svg
:target: https://github.com/dickmao/emacs-ipython-notebook/actions
:alt: Build Status
.. |melpa-dev|
image:: http://melpa.milkbox.net/packages/ein-badge.svg
@ -53,7 +53,7 @@ Alternatively, ob-ein_.
Reporting bugs
--------------
EIN is tested on GNU Emacs versions
emacs-25-2
25.1
and later.
**Please file issues using** ``M-x ein:dev-bug-report-template``.

View file

@ -29,14 +29,10 @@
(when (file-exists-p (concat default-directory "features/support/test-poly.el"))
(load-file (concat default-directory "features/support/test-poly.el")))
(when ein:polymode
(!cons "evil" ecukes-exclude-tags))
(cond ((not ein:polymode)
(!cons "julia" ecukes-exclude-tags)
(!cons "memory" ecukes-exclude-tags))
((string= (getenv "TRAVIS_OS_NAME") "linux")
(!cons "memory" ecukes-exclude-tags)))
(!cons "evil" ecukes-exclude-tags)
(!cons "memory" ecukes-exclude-tags)
(when (eq system-type 'darwin) ;; julia bogs github actions catalina
(!cons "julia" ecukes-exclude-tags))
(defvar ein:testing-jupyter-server-root (f-parent (f-dirname load-file-name)))

View file

@ -235,7 +235,9 @@ a number will limit the number of lines in a cell output."
(when (listp ein:slice-image) ein:slice-image)
(insert-sliced-image img "." nil (or rows 20) cols))
(insert-image img ".")))
(error (ein:log 'warn "Could not insert image: %s" err) nil)))
(error (ein:log 'warn "Could not insert image: %s"
(error-message-string err))
nil)))
;;; Cell factory

View file

@ -4,7 +4,7 @@
'((emacs "25")
(websocket "20190620.338")
(anaphora "20180618")
(request "20190621.1622")
(request "20191211.0000")
(deferred "0.5")
(polymode "20190426.1729")
(markdown-mode "20171116.756")

View file

@ -47,7 +47,7 @@
(ein:filename-translations
`((,port . ,(ein:tramp-create-filename-translator "DUMMY")))))
(cl-loop with python-filename = "/file/name"
for emacs-filename in '("/scpc:HOST:/file/name"
for emacs-filename in '("/scp:HOST:/file/name"
"/ssh:USER@HOST:/file/name")
do (should
(equal (ein:filename-to-python port emacs-filename)

View file

@ -1,22 +1,24 @@
#!/bin/bash
# install R for Travis CI
# install R for Actions CI
set -x
WORKDIR=${HOME}/local
UNAME=$(uname -s)
cd $WORKDIR
if [ "x$TRAVIS_OS_NAME" = "xlinux" ] ; then
if [ "x$UNAME" = "xLinux" ] ; then
if [ ! -d ${WORKDIR}/R ]; then
wget http://cran.mirrors.hoobly.com/src/base/R-3/R-3.4.1.tar.gz
tar xvf R-3.4.1.tar.gz
cd R-3.4.1
./configure --prefix=${WORKDIR}/R
make && make install
find ${WORKDIR}/R -name R -print
fi
R -e "install.packages('IRkernel', repos='http://cran.mirrors.hoobly.com')"
R -e "IRkernel::installspec()"
elif [ "x$TRAVIS_OS_NAME" = "xosx" ]; then
elif [ "x$UNAME" = "xDarwin" ]; then
brew list r &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install r
R -e "install.packages('IRkernel', repos='http://cran.mirrors.hoobly.com')"
R -e "IRkernel::installspec()"

View file

@ -15,8 +15,22 @@ update_elpa_keys() {
mkdir -p $HOME/.emacs.d/elpa/gnupg || true
chmod 700 $HOME/.emacs.d/elpa/gnupg
GPG=gpg
if which gpg2 ; then GPG=gpg2 ; fi
travis_retry ${GPG} --keyserver hkp://pool.sks-keyservers.net:80 --homedir $HOME/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
if which gpg2 ; then
GPG=gpg2
fi
for i in 1 2 3 ; do
if ${GPG} -q --homedir $HOME/.emacs.d/elpa/gnupg -k | grep 81E42C40 ; then
return 0
fi
if [ $i -gt 1 ] ; then
sleep 5
fi
${GPG} --keyserver hkp://ipv4.pool.sks-keyservers.net --homedir $HOME/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
done
return 1
}
copy_keys() {
mkdir -p $(cask package-directory) || true
mkdir -p $HOME/.cask || true
rsync -azSHe ssh $HOME/.cask $(dirname $(dirname $(dirname $(cask package-directory))))
@ -41,9 +55,10 @@ if [ ! -d $CASKDIR ] ; then
git clone https://github.com/cask/cask.git $CASKDIR
fi
# Install dependencies for cider as descriped in ./Cask
# Install dependencies for cider as described in ./Cask
# Effect is identical to "make elpa", but here we can retry
# in the event of network failures.
update_elpa_keys
copy_keys
travis_retry cask_upgrade_cask_or_reset
travis_retry cask_install_or_reset && touch elpa-emacs

View file

@ -1,12 +1,13 @@
#!/bin/bash
# install julia for Travis CI
# install julia for Actions CI
set -x
WORKDIR=${HOME}/local
UNAME=$(uname -s)
cd $WORKDIR
if [ "x$TRAVIS_OS_NAME" = "xlinux" ] ; then
if [ "x$UNAME" = "xLinux" ] ; then
if [ ! -d ${WORKDIR}/julia-1.1.0 ]; then
wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz
tar zxvf julia-1.1.0-linux-x86_64.tar.gz
@ -15,7 +16,7 @@ if [ "x$TRAVIS_OS_NAME" = "xlinux" ] ; then
hash
julia --version
julia -e 'import Pkg; Pkg.add("IJulia")'
elif [ "x$TRAVIS_OS_NAME" = "xosx" ]; then
elif [ "x$UNAME" = "xDarwin" ]; then
brew update
brew cask list julia &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew cask install julia
julia --version