Skip to content

fosskers/common-lisp

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Github Action for Common Lisp

This Action:

  • Installs a Common Lisp compiler of your choice (SBCL, ECL, ABCL, or Clisp).
  • Uses the vend tool to fetch dependencies.
  • Enables trivial testing of your project.
  • Caches your build artifacts (FASL files).

⚠ Currently only the ubuntu runner is supported.

Table of Contents

Usage

Basics

Create a .github/workflows/cl.yaml file with the following contents:

on:
  push:
    branches: [master]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    name: Unit Tests
    steps:
      - name: Clone the Project
        uses: actions/checkout@v4

      - name: Set up Common Lisp
        uses: fosskers/common-lisp@v1

      - name: Test
        run: |
          vend test

Your dependencies will be automatically fetched by vend, so you’re free to do what you please in subseqent steps. In the example here, we simply call vend test, which returns the proper error code to fail the job if any tests failed.

Compiler Selection

By default vend operates with SBCL, but we can customize this:

- name: Install Vend
  uses: fosskers/common-lisp@v1
  with:
    compiler: ecl

then subsequent steps will have ECL available to them:

- name: Test
  run: |
    vend test ecl

Matrices: a job per compiler

Since you can only request one compiler at a time to be installed, but may want to test multiple of them, it’s useful to use a matrix. This will spawn a CI job per requested compiler:

on:
  push:
    branches: [master]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    name: Unit Tests
    strategy:
      matrix:
        compiler: ["sbcl", "ecl"]
    steps:
      - name: Clone the Project
        uses: actions/checkout@v4

      - name: Set up Common Lisp
        uses: fosskers/common-lisp@v1
        with:
          compiler: ${{ matrix.compiler }}

      - name: Test
        run: |
          vend test ${{ matrix.compiler }}

Each per-compiler job will also get its own cache, so subsequent runs should be faster.

About

An all-inclusive testing and caching Action for Common Lisp.

Topics

Resources

License

Stars

Watchers

Forks