test36 #54
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
name: test-in-implementations | |
on: [push] | |
env: | |
SBCL_DOWNLOAD_URL: https://prdownloads.sourceforge.net/sbcl/sbcl-2.1.1-x86-64-linux-binary.tar.bz2 | |
ECL_DOWNLOAD_URL: | |
CCL_DOWNLOAD_URL: https://github.com/Clozure/ccl/releases/download/v1.12/ccl-1.12-linuxx86.tar.gz | |
CL_LAUNCH_DOWNLOAD_URL: https://github.com/fare/cl-launch/raw/master/cl-launch.sh | |
# https://xcvb.common-lisp.dev/cl-launch/cl-launch.sh | |
QUICKLISP_DOWNLOAD_URL: https://beta.quicklisp.org/quicklisp.lisp | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
implementation: [ sbcl, ccl ] # TODO ecl | |
steps: | |
- uses: actions/checkout@v3 | |
# Install SBCL (with cache) | |
- uses: actions/cache@v3 | |
id: sbcl-cache | |
if: matrix.implementation == 'sbcl' | |
with: | |
path: /tmp/sbcl | |
key: sbcl-cache | |
- name: install implementation SBCL | |
if: (matrix.implementation == 'sbcl') | |
&& (steps.sbcl-cache.outputs.cache-hit != 'true') | |
working-directory: /tmp/ | |
run: | | |
curl -L "${SBCL_DOWNLOAD_URL}" | tar -xj | |
( cd sbcl-* && INSTALL_ROOT="/tmp/sbcl" sh install.sh ) | |
# Install ECL (with cache) | |
- uses: actions/cache@v3 | |
id: ecl-cache | |
if: matrix.implementation == 'ecl' | |
with: | |
path: /tmp/ecl | |
key: ecl-cache | |
- name: build implementation ECL | |
if: (matrix.implementation == 'ecl') | |
&& (steps.ecl-cache.outputs.cache-hit != 'true') | |
working-directory: /tmp | |
run: | | |
curl -L https://github.com/ecl/ecl/releases/download/ecl-1.4.14/ecl.tgz | tar -xz | |
mv ecl ecl-src | |
cd ecl-src | |
./configure --prefix=/tmp/ecl/ | |
make | |
make install | |
echo '(setf *debugger-hook* (lambda (c fun) (princ c) (si::tpl-backtrace) (quit 1)))' > ~/.eclrc | |
# Install CCL (with cache) | |
- uses: actions/cache@v3 | |
id: ccl-cache | |
if: matrix.implementation == 'ccl' | |
with: | |
path: /tmp/ccl | |
key: ccl-cache | |
- name: install implementation CCL | |
if: (matrix.implementation == 'ccl') | |
&& (steps.ccl-cache.outputs.cache-hit != 'true') | |
working-directory: /tmp | |
run: | | |
curl -L "${CCL_DOWNLOAD_URL}" | tar -xz | |
# Install cl-launch and Quicklisp | |
- name: install cl-launch | |
run: | | |
curl -L -o cl "${CL_LAUNCH_DOWNLOAD_URL}" | |
chmod +x cl | |
echo "SBCL=/tmp/sbcl/bin/sbcl" >> ~/.cl-launchrc | |
echo "ECL=/tmp/ecl/bin/ecl" >> ~/.cl-launchrc | |
echo CCL=/tmp/ccl/lx86cl64 >> ~/.cl-launchrc | |
- name: install quicklisp | |
run: | | |
curl -L -o quicklisp.lisp "${QUICKLISP_DOWNLOAD_URL}" | |
./cl --rc --lisp "${{ matrix.implementation }}" -L quicklisp.lisp '(quicklisp-quickstart:install)' | |
rm quicklisp.lisp | |
# Run tests | |
- name: test | |
run: | | |
./cl \ | |
--rc --quicklisp --lisp ${{ matrix.implementation }} \ | |
-S '(:source-registry (:directory "'$(pwd)'") :ignore-inherited-configuration)' \ | |
-s eclector/test -s eclector-concrete-syntax-tree/test \ | |
'(or (and (eclector.test:run-tests) | |
(eclector.concrete-syntax-tree.test:run-tests)) | |
(uiop:quit -1))' | |
# Build documentation | |
- name: documentation | |
if: matrix.implementation == 'sbcl' | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y install texinfo texlive | |
cd documentation | |
SBCL=/tmp/sbcl/bin/sbcl make all |