Skip to content

Commit

Permalink
Merge branch 'fix-nasdf'
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Nov 28, 2023
2 parents 2ca6822 + e59f35d commit 2e93508
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 1,136 deletions.
79 changes: 15 additions & 64 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Inspired by http://3bb.cc/blog/2020/09/11/github-ci/.
# SPDX-FileCopyrightText: Atlas Engineer LLC
# SPDX-License-Identifier: BSD-3 Clause

name: Tests

# We tell GitHub to not duplicate the checks in pull requests. See
# https://github.saobby.my.eu.orgmunity/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/15
on:
push:
branches: [ master ]
Expand All @@ -15,77 +15,28 @@ jobs:
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] # try windows-latest when we understand commands to install Roswell on it

# run the job on every combination of "lisp" and "os" above
lisp: [sbcl-bin]
os: [ubuntu-latest]
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
- uses: actions/checkout@v4
with:
path: ~/.roswell
key: ${{ runner.os }}-dot-roswell-${{ matrix.lisp }}-${{ hashFiles('**/*.asd') }}
restore-keys: |
${{ runner.os }}-dot-roswell-${{ matrix.lisp }}-
${{ runner.os }}-dot-roswell-
show-progress: 'false'
submodules: 'true'

- name: Install dependencies
shell: bash
if: ${{ matrix.os != 'macos-latest' }}
- name: Register submodules in ASDF
run: |
sudo apt-get update -qq
sudo apt-get install -y libfixposix3 libfixposix-dev
mkdir -p ~/.config/common-lisp/source-registry.conf.d/
echo "(:tree \"$PWD\")" > ~/.config/common-lisp/source-registry.conf.d/asdf.conf
echo "(:tree \"$PWD/_build\")" >> ~/.config/common-lisp/source-registry.conf.d/asdf.conf
- 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 "ASDF: ~a~%" (asdf:asdf-version))'
ros ${{ matrix.rosargs }} -e '(format t "fixnum bits: ~a~%" (integer-length most-positive-fixnum))'
ros ${{ matrix.rosargs }} -e '(format t "features: ~s~%" *features*)'
- name: Fetch Common Lisp third-party dependencies
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(handler-bind ((error (lambda (a) (uiop:print-backtrace) (format *error-output* "Error: ~a~&" a) (uiop:quit 17)))) (asdf:load-system :nfiles/submodules))'
mkdir -p ~/.config/common-lisp/source-registry.conf.d/
echo "(:tree \"$PWD/_build/submodules\")" >> ~/.config/common-lisp/source-registry.conf.d/asdf.conf
- name: Load the system
shell: bash
run: |
# TODO: Can we make CCL backtraces more readable? With trivial-backtrace maybe?
ros ${{ matrix.rosargs }} -e '(asdf:load-system :nfiles/submodules)' -e '(handler-bind ((error (lambda (a) (uiop:print-condition-backtrace a) (format *error-output* "Error: ~a~&" a) (uiop:quit 17)))) (asdf:load-system :nfiles))'
# Load tests separately to not clutter the test output.
- name: Load tests
shell: bash
run: |
ros ${{ matrix.rosargs }} -e '(asdf:load-system :nfiles/submodules)' -e '(handler-bind ((error (lambda (a) (uiop:print-backtrace) (format *error-output* "~a~&" a) (uiop:quit 17)))) (asdf:load-system :nfiles/tests))'
run: curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh -x

- name: Run tests
shell: bash
# Export CI to tell ASDF to quit on test errors.
env:
NASDF_TESTS_QUIT_ON_FAIL: yes
run: |
ros ${{ matrix.rosargs }} -e '(asdf:load-system :nfiles/submodules)' -e '(asdf:test-system :nfiles)'
ros -e '(handler-case (asdf:load-system :nfiles/tests) (error (c) (format t "Error: ~s~%~a~%" c c) (uiop:quit 1)))' \
-e '(let ((output (lisp-unit2:run-tests :package :nfiles/tests))) (lisp-unit2:print-summary output) (when (or (lisp-unit2:failed output) (lisp-unit2:errors output)) (uiop:quit 1)))'
168 changes: 0 additions & 168 deletions nasdf/compilation-tests.lisp

This file was deleted.

Loading

0 comments on commit 2e93508

Please sign in to comment.