Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
lisp: [sbcl, ecl]
exclude:
- os: windows-latest
lisp: ecl
defaults:
run:
shell: bash
Expand All @@ -32,26 +36,29 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Install SBCL (Linux)
- name: Install ${{ matrix.lisp }} (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y sbcl
run: sudo apt-get install -y ${{ matrix.lisp }}

- name: Install SBCL (macOS)
- name: Install ${{ matrix.lisp }} (macOS)
if: runner.os == 'macOS'
run: brew install sbcl
run: brew install ${{ matrix.lisp }}

- name: Install SBCL (Windows)
if: runner.os == 'Windows'
run: choco install sbcl

- name: Install Quicklisp and ql-https
env:
LISP: ${{matrix.lisp}}
run: ./install.sh

- name: Run tests
env:
CI: 1
LISP: ${{matrix.lisp}}
run: |
sbcl <<EOF
$LISP <<EOF
(require 'asdf)
(push (uiop:getcwd) asdf:*central-registry*)
(ql:quickload "ql-https/test")
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if test "$SKIP_USERINIT" = no; then
(quicklisp:setup)
(ql-util:without-prompting
(ql:add-to-init-file))
(uiop:quit)
EOF

cat > "$QL_TOPDIR"/setup.lisp <<EOF
Expand Down
13 changes: 13 additions & 0 deletions t/tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@

(def-suite* :ql-https)

#+(and sbcl sb-thread)
(defmacro wait ((&key (timeout 20)) &body body)
(let ((gthread (gensym "thread")))
`(let ((,gthread (sb-thread:make-thread (lambda ()
(progn ,@body)))))
(sb-thread:join-thread ,gthread :timeout ,timeout))))

#+ecl
(defmacro wait ((&key (timeout 20)) &body body)
(decalre (ignore timeout))
(let ((gthread (gensym "thread")))
`(let ((,gthread (mp:process-run-function 'wait-thread (lambda () (progn ,@body)))))
(mp:process-join ,gthread))))

#-(or sbcl ecl)
(defmacro wait ((&key (timeout 20)) &body body)
(declare (ignore timeout))
`(progn ,@body))

(test test-ql-https-is-initialized-correctly
(let ((http-function (cdr (assoc "http" ql-http:*fetch-scheme-functions* :test #'string=)))
(https-function (cdr (assoc "https" ql-http:*fetch-scheme-functions* :test #'string=))))
Expand Down
Loading