Skip to content

Guard for nsymbols/star loading, fixing tests. #38

Guard for nsymbols/star loading, fixing tests.

Guard for nsymbols/star loading, fixing tests. #38

Workflow file for this run

# SPDX-FileCopyrightText: Atlas Engineer LLC
# SPDX-License-Identifier: BSD-3-Clause
# Inspired by http://3bb.cc/blog/2020/09/11/github-ci/.
name: Tests
# We tell GitHub to not duplicate the checks in pull requests. See
# https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/15
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [ opened, synchronize, closed ]
jobs:
test:
name: ${{ matrix.lisp }} on ${{ matrix.os }}
strategy:
matrix:
# Use ccl-bin/1.12.1 instead of 'ccl' because of
# https://github.com/roswell/roswell/issues/534.
# TODO: Revert when Roswell is functional again.
lisp: [sbcl-bin, ccl-bin/1.12.1, ecl/21.2.1]
rosargs: [dynamic-space-size=3072]
os: [ubuntu-latest, macos-latest] # try windows-latest when we understand commands to install Roswell on it
# run the job on every combination of "lisp" and "os" above
runs-on: ${{ matrix.os }}
steps:
# Check out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Cache .roswell
id: cache-dot-roswell
uses: actions/cache@v1
with:
path: ~/.roswell
key: ${{ runner.os }}-dot-roswell-${{ matrix.lisp }}-${{ hashFiles('**/*.asd') }}
restore-keys: |
${{ runner.os }}-dot-roswell-${{ matrix.lisp }}-
${{ runner.os }}-dot-roswell-
- name: Install Roswell
shell: bash
# always run install, since it does some global installs and setup that isn't cached
env:
LISP: ${{ matrix.lisp }}
# TODO: Update Roswell to latest version (may need Ubuntu 20.* or above).
run: curl -L https://raw.githubusercontent.com/roswell/roswell/v20.06.14.107/scripts/install-for-ci.sh | sh -x
- name: Check Lisp
continue-on-error: true
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(format t "~a:~a on ~a~%...~%~%" (lisp-implementation-type) (lisp-implementation-version) (machine-type))'
ros ${{ matrix.rosargs }} -e '(format t " fixnum bits:~a~%" (integer-length most-positive-fixnum))'
ros ${{ matrix.rosargs }} -e "(ql:quickload 'trivial-features)" -e '(format t "features = ~s~%" *features*)'
- name: Update Quickdist if we have one cached
shell: bash
run: ros -e "(ql:update-all-dists :prompt nil)"
# TODO: This should rather include submodules and ASDF-loading,
# but we usually use no submodules for libraries. Maybe we should?
- name: Load the system
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(push (uiop:getcwd) ql:*local-project-directories*)' -e '(handler-case (ql:quickload :nsymbols) (error (a) (format t "caught error ~s~%~a~%" a a) (uiop:quit 17)))'
- name: Run tests
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(setf *debugger-hook* nil)' -e '(push (uiop:getcwd) ql:*local-project-directories*)' -e '(handler-case (ql:quickload :nsymbols) (error (a) (format t "caught error ~s~%~a~%" a a) (uiop:quit 17)))' -e '(ql:quickload :lisp-unit2)' -e '(asdf:test-system :nsymbols)'
- name: Compilation warnings
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(push (uiop:getcwd) ql:*local-project-directories*)' -e '(load ".github/report-warnings.lisp")' -e '(compilation-conditions :nsymbols)'
- name: Unbound exports
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(push (uiop:getcwd) ql:*local-project-directories*)' -e '(ql:quickload :nsymbols)' -e '(load ".github/report-unbound-exports.lisp")' -e '(unbound-exports :nsymbols)'