[ci] specify OS #169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
jobs: | |
test: | |
name: ${{ matrix.lisp }} | |
strategy: | |
matrix: | |
lisp: [sbcl, ccl, ecl] | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Update $PATH | |
run: | | |
echo $PATH | |
echo "PATH=$HOME/bin:$PATH" >> $GITHUB_ENV | |
- name: Check $PATH | |
run: echo $PATH | |
- name: Download implementation | |
env: | |
LISP: ${{ matrix.lisp }} | |
OS: ubuntu-22.04 | |
run: | | |
pwd | |
ls -l | |
bash <(curl -s https://raw.githubusercontent.com/digikar99/lisp-travis-lite/master/run.sh) | |
- name: Test without numpy | |
run: | | |
ls | |
cl --eval '(push #P"./" ql:*local-project-directories*)' --eval '(ql:quickload "py4cl2")' --eval '(assert (= 5 (py4cl2:pyeval 5)))' --eval '(print py4cl2:*internal-features*)' | |
# We avoid caching the apt and python modules; need to deal with recursive dependencies | |
- name: Install python modules | |
run: | # need to use sudo | |
sudo apt install python3-pip | |
pip3 install numpy | |
pip3 install networkx | |
pip3 install matplotlib | |
- name: Download download-dependencies | |
run: | | |
git clone https://github.com/digikar99/download-dependencies $HOME/quicklisp/local-projects/download-dependencies | |
- name: Download Tests | |
run: | | |
git clone https://github.com/digikar99/py4cl2-tests ./tests | |
pwd | |
ls -l | |
- name: Download Test Dependencies | |
run: > | |
cl --eval '(ql:quickload "download-dependencies")' \ | |
--eval '(in-package :download-dependencies)' \ | |
--eval '(push #P"./" ql:*local-project-directories*)' \ | |
--eval '(let ((*dependencies-home* (first ql:*local-project-directories*))) (ensure-system "py4cl2-tests"))' | |
- name: Set up directory with exotic name | |
run: | | |
ls -l $HOME/bin/ | |
echo $PATH | |
export EXOTIC_DIR="$HOME/(some exotic name')/" | |
export EXOTIC_DIR_PYTHON="$EXOTIC_DIR/python" | |
echo "EXOTIC_DIR=$EXOTIC_DIR" >> $GITHUB_ENV | |
echo "EXOTIC_DIR_PYTHON=$EXOTIC_DIR_PYTHON" >> $GITHUB_ENV | |
mkdir -p "$EXOTIC_DIR" | |
rsync -rR "$HOME/work/py4cl2/py4cl2" "$EXOTIC_DIR" | |
ln -s "/usr/bin/python3" "$EXOTIC_DIR_PYTHON" | |
cd ~/ | |
ls -l | |
ls "$EXOTIC_DIR" | |
nproc | |
pwd | |
python3 --version | |
/"$EXOTIC_DIR_PYTHON" --version | |
- name: Compile Tests | |
run: cl --load "$EXOTIC_DIR/$HOME/work/py4cl2/py4cl2/ci-pre-test.lisp" | |
# Testing it on the second load confirms that functionalities do not | |
# solely eval-when compile-toplevel, and that they persist across multiple loads. | |
- name: Run Tests | |
run: cl --load "$EXOTIC_DIR/$HOME/work/py4cl2/py4cl2/ci-test.lisp" || cl --load "$EXOTIC_DIR/$HOME/work/py4cl2/py4cl2/ci-test.lisp" | |