Skip to content

Commit

Permalink
Merge pull request #2 from 40ants/update-deps
Browse files Browse the repository at this point in the history
Update deps.
  • Loading branch information
svetlyak40wt authored Jul 8, 2024
2 parents ca36f5c + d888637 commit c90b2da
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 119 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"matrix": {
"lisp": [
"sbcl-bin",
"ccl-bin/1.12.0"
"ccl-bin"
]
}
},
Expand All @@ -33,41 +33,15 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
},
{
"name": "Grant All Perms to Make Cache Restoring Possible",
"run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin",
"shell": "bash"
},
{
"name": "Get Current Month",
"id": "current-month",
"run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT",
"shell": "bash"
},
{
"name": "Cache Roswell Setup",
"id": "cache",
"uses": "actions/cache@v3",
"with": {
"path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot",
"key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-${{ matrix.lisp }}-${{ hashFiles('qlfile.lock', '*.asd') }}"
}
},
{
"name": "Restore Path To Cached Files",
"run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH",
"shell": "bash",
"if": "steps.cache.outputs.cache-hit == 'true'"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v2",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-project-templates"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"asdf-system": "40ants-project-templates",
"cache": "true"
}
},
{
"name": "Run Tests",
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,15 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
},
{
"name": "Grant All Perms to Make Cache Restoring Possible",
"run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin",
"shell": "bash"
},
{
"name": "Get Current Month",
"id": "current-month",
"run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT",
"shell": "bash"
},
{
"name": "Cache Roswell Setup",
"id": "cache",
"uses": "actions/cache@v3",
"with": {
"path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot",
"key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}"
}
},
{
"name": "Restore Path To Cached Files",
"run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH",
"shell": "bash",
"if": "steps.cache.outputs.cache-hit == 'true'"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v2",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-project-templates-docs"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"asdf-system": "40ants-project-templates-docs",
"cache": "true"
}
},
{
"name": "Build Docs",
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,15 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
},
{
"name": "Grant All Perms to Make Cache Restoring Possible",
"run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin",
"shell": "bash"
},
{
"name": "Get Current Month",
"id": "current-month",
"run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT",
"shell": "bash"
},
{
"name": "Cache Roswell Setup",
"id": "cache",
"uses": "actions/cache@v3",
"with": {
"path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot",
"key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}"
}
},
{
"name": "Restore Path To Cached Files",
"run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH",
"shell": "bash",
"if": "steps.cache.outputs.cache-hit == 'true'"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v2",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-project-templates"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"asdf-system": "40ants-project-templates",
"cache": "true"
}
},
{
"name": "Change dist to Ultralisp if qlfile does not exist",
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"API"
"JSON-RPC"
"HTTP"))
(0.4.0 2024-05-18
"* Update dependencies. Renamed asd files to prevent qlot from trying to process dependencies from these files.")
(0.3.0 2023-05-06
"* Add API section into the docs.
* Add dependency on `clack-handler-hunchentoot` system.")
Expand Down
6 changes: 3 additions & 3 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-10-21"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org/" :%version :latest)
:version "20240303155001"))
:initargs (:distribution "https://dist.ultralisp.org/" :%version :latest)
:version "20240517095000"))
("slynk" .
(:class qlot/source/github:source-github
:initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil)
Expand Down
4 changes: 1 addition & 3 deletions src/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@
:jobs ((run-tests
:asdf-system "40ants-project-templates"
:lisp ("sbcl-bin"
;; Issue https://github.com/roswell/roswell/issues/534
;; is still reproduces on 2023-02-06:
"ccl-bin/1.12.0")
"ccl-bin")
:coverage t)))
2 changes: 1 addition & 1 deletion src/jsonrpc-app.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
(make-pathname :directory '(:relative
"templates"
"jsonrpc-app"))
:renames '(("system.asd" . "{{ name }}.asd")
:renames '(("system.asd.template" . "{{ name }}.asd")
("roswell/app.ros" . "roswell/{{ name }}.ros")))
args))))
(apply #'call-next-method template new-args)))
Expand Down
2 changes: 1 addition & 1 deletion src/library.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Use 40ANTS-PROJECT-TEMPLATES:CREATE-LIBRARY function to generate a skeleton for
(:documentation "Should return a file object, which creates `{{ name }}.asd` file.")
(:method ((template library-template))
(make-file :40ants-project-templates
"library/system.asd"
"library/system.asd.template"
"{{ name }}.asd")))


Expand Down
2 changes: 1 addition & 1 deletion src/mixin/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(setf (slot-value self 'files)
(list*
(make-file :40ants-project-templates
"mixin/ci/system.asd"
"mixin/ci/system.asd.template"
"{{ name }}-ci.asd")
(make-file :40ants-project-templates
"mixin/ci/ci.lisp"
Expand Down
2 changes: 1 addition & 1 deletion src/mixin/docs.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"mixin/docs/empty.md"
"ChangeLog.md")
(make-file :40ants-project-templates
"mixin/docs/system.asd"
"mixin/docs/system.asd.template"
"{{ name }}-docs.asd")
(make-file :40ants-project-templates
"mixin/docs/index.lisp"
Expand Down
2 changes: 1 addition & 1 deletion src/mixin/rove-tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(setf (slot-value self 'files)
(list*
(make-file :40ants-project-templates
"mixin/rove-tests/system.asd"
"mixin/rove-tests/system.asd.template"
"{{ name }}-tests.asd")
(make-file :40ants-project-templates
"mixin/rove-tests/core.lisp"
Expand Down
2 changes: 1 addition & 1 deletion src/reblocks-app.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
(make-pathname :directory '(:relative
"templates"
"reblocks-app"))
:renames '(("system.asd" . "{{ name }}.asd")))
:renames '(("system.asd.template" . "{{ name }}.asd")))
args))))
(apply #'call-next-method template new-args)))

Expand Down
39 changes: 26 additions & 13 deletions t/core.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@
(:import-from #:rove
#:deftest
#:ok)
(:import-from #:docs-builder))
(:import-from #:docs-builder)
(:import-from #:alexandria
#:once-only
#:with-gensyms))
(in-package #:40ants-project-templates-tests/core)


(defmacro with-temp-path ((lib-name tmp-path-var) &body body)
(alexandria:once-only (lib-name)
`(let ((,tmp-path-var (uiop:ensure-directory-pathname
(uiop:tmpize-pathname
(make-pathname :name ,lib-name
:directory '(:absolute "tmp"))))))
(uiop:delete-file-if-exists ,tmp-path-var)

(unwind-protect
(progn ,@body)
(when (probe-file ,tmp-path-var)
(uiop:delete-directory-tree ,tmp-path-var :validate t))))))
(with-gensyms (temp-file)
(once-only (lib-name)
`(let* ((,temp-file (uiop:tmpize-pathname
(make-pathname :name ,lib-name
:directory '(:absolute "tmp"))))
(,tmp-path-var (uiop:ensure-directory-pathname ,temp-file)))
(uiop:delete-file-if-exists ,temp-file)

(unwind-protect
(progn ,@body)
(when (probe-file ,tmp-path-var)
(uiop:delete-directory-tree ,tmp-path-var :validate t)))))))


(deftest test-a-library-has-docs
Expand All @@ -44,7 +48,16 @@
(let* ((asdf:*central-registry* (cons tmp-path
asdf:*central-registry*))
(resulting-path (progn (asdf:load-system docs-system-name)
(docs-builder:build docs-system-name)))
(handler-bind ((docs-builder:documentation-has-problems
;; Here we ignore documentation warnings
;; because on CCL we have some problems with them:
#+ccl
#'continue
;; But for other implementations
;; will require for no warnings:
#-ccl
#'identity))
(docs-builder:build docs-system-name))))
(index.html (merge-pathnames
(make-pathname :name "index"
:type "html")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c90b2da

Please sign in to comment.