Skip to content

Commit

Permalink
Add CI using github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TatriX committed Aug 4, 2021
1 parent 3722e35 commit 4bda7d9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on: [push]

jobs:
test:
name: ${{ matrix.lisp }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
lisp: [sbcl-bin]
os: [ubuntu-latest] # , macOS-latest

steps:
- uses: actions/checkout@v2

- name: Install SDL2
run: |
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev
- name: Install Roswell
env:
LISP: ${{ matrix.lisp }}
run: |
curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh
- name: Run tests
run: |
./tests/test.ros
9 changes: 8 additions & 1 deletion sdl2-tutorial.asd
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
(:file "13/tutorial-13")
(:file "14/tutorial-14")
(:file "15/tutorial-15")
(:file "16/tutorial-16")))
(:file "16/tutorial-16"))
:in-order-to ((test-op (test-op "sdl2-tutorial/tests"))))


(defsystem "sdl2-tutorial/tests"
:depends-on ("parachute")
:components ((:file "tests/tests"))
:perform (test-op (op c) (symbol-call :parachute :test :sdl2-tutorial-tests)))
17 changes: 17 additions & 0 deletions tests/test.ros
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp(ql:quickload '(sdl2-tutorial sdl2-tutorial/tests) :silent t))

(defpackage :ros.script.test
(:use :cl))
(in-package :ros.script.test)

(defun main (&rest argv)
(declare (ignorable argv))
(asdf:test-system :sdl2-tutorial))
;;; vim: set ft=lisp lisp:
7 changes: 7 additions & 0 deletions tests/tests.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(defpackage #:sdl2-tutorial-tests
(:use :cl :parachute))

(in-package #:sdl2-tutorial-tests)

(define-test hello
(true t))

0 comments on commit 4bda7d9

Please sign in to comment.