From d57f1f46c12ba847dd6ff9486071954c8232abcc Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Mon, 4 Jan 2021 11:56:54 +0100 Subject: Add Github Actions CI --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ README.org | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b854974 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + pull_request: + branches: [master] + +jobs: + test: + name: ${{matrix.lisp}} on ${{matrix.os}} + strategy: + matrix: + lisp: [abcl-bin, allegro, ccl-bin, ccl-bin READTABLE_CASE_INVERT=1, ecl, sbcl-bin] + os: [ubuntu-latest] + fail-fast: false + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v2 + - name: Install Roswell + shell: bash + env: + LISP: ${{matrix.lisp}} + run: curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh -x + + - name: Get Lisp info + continue-on-error: true + shell: bash + run: | + ros -e '(format t "Lisp: ~a ~a on ~a~%" (lisp-implementation-type) (lisp-implementation-version) (machine-type))' + ros -e '(format t "Fixnum bits: ~a~%" (integer-length most-positive-fixnum))' + ros -e '(ql:quickload "trivial-features" :silent t)' -e '(format t "Features: ~s~%" *features*)' + + - name: Allegro workaround + # Compiling and testing can fail on Allegro CL Express Free edition + # because of the 50 MB heap size limitation, so let's try to split + # the work in two as a possible workaround... + if: ${{matrix.lisp == 'allegro'}} + shell: bash + run: ros -e '(setf *debugger-hook* (lambda (&rest ignorable) (declare (ignore ignorable)) (uiop:quit 0)))' -e '(ql:quickload "ironclad/tests")' + + - name: Run tests + shell: bash + run: ros -e '(setf *debugger-hook* (lambda (&rest ignorable) (declare (ignore ignorable)) (uiop:quit -1)))' -e '(when (uiop:getenvp "READTABLE_CASE_INVERT") (format t "changing readtable-case to :invert~%") (setq *readtable* (let ((rt (copy-readtable))) (setf (readtable-case rt) :invert) rt)))' -e '(ql:quickload "ironclad/tests")' -e '(unless (rt:do-tests) (uiop:quit -1))' diff --git a/README.org b/README.org index 00e7466..6c07033 100644 --- a/README.org +++ b/README.org @@ -22,6 +22,8 @@ #+ATTR_HTML: :style width: 0; height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; [[https://travis-ci.org/sharplispers/ironclad][file:https://travis-ci.org/sharplispers/ironclad.svg]] +#+ATTR_HTML: :style width: 0; height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; +[[https://github.com/sharplispers/ironclad/workflows/CI/badge.svg?branch=master][file:https://github.com/sharplispers/ironclad/workflows/CI/badge.svg?branch=master]] Ironclad is a cryptography library written entirely in Common Lisp. It includes support for several popular [[#ciphers][ciphers]], [[#digests][digests]], [[#message-authentication-codes][MACs]] and -- cgit v1.2.3-70-g09d2