-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f6aa11
commit 43fd963
Showing
3 changed files
with
270 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,74 @@ | ||
name: 'Docs' | ||
|
||
on: | ||
# This will run tests on pushes | ||
# to master branch and every monday: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'master' | ||
schedule: | ||
- cron: '0 10 * * 1' | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
LISP: sbcl-bin | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Grant All Perms to Make Cache Restoring Possible | ||
run: | | ||
sudo mkdir -p /usr/local/etc/roswell | ||
sudo chown "${USER}" /usr/local/etc/roswell | ||
# Here the ros binary will be restored: | ||
sudo chown "${USER}" /usr/local/bin | ||
- name: Get Current Month | ||
id: current-month | ||
run: | | ||
echo "::set-output name=value::$(date -u "+%Y-%m")" | ||
- name: Cache Roswell Setup | ||
id: cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-roswell | ||
with: | ||
path: | | ||
qlfile | ||
qlfile.lock | ||
/usr/local/bin/ros | ||
~/.cache/common-lisp/ | ||
~/.roswell | ||
/usr/local/etc/roswell | ||
.qlot | ||
key: "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles('qlfile.lock') }}" | ||
- name: Restore Path To Cached Files | ||
run: | | ||
echo $HOME/.roswell/bin >> $GITHUB_PATH | ||
echo .qlot/bin >> $GITHUB_PATH | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
- uses: 40ants/setup-lisp@v1 | ||
with: | ||
asdf-system: cl-info | ||
qlfile-template: | | ||
github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- uses: 40ants/build-docs@v1 | ||
with: | ||
asdf-system: cl-info | ||
# ngrok-auth-token: ${{ secrets.NGROK_AUTH_TOKEN }} | ||
{ | ||
"name": "DOCS", | ||
"on": { | ||
"push": { | ||
"branches": [ | ||
"workflow-generator", | ||
"master" | ||
] | ||
}, | ||
"schedule": [ | ||
{ | ||
"cron": "0 10 * * 1" | ||
} | ||
] | ||
}, | ||
"jobs": { | ||
"build-docs": { | ||
"runs-on": "ubuntu-latest", | ||
"env": { | ||
"OS": "ubuntu-latest", | ||
"QUICKLISP_DIST": "quicklisp", | ||
"LISP": "sbcl-bin" | ||
}, | ||
"steps": [ | ||
{ | ||
"name": "Checkout Code", | ||
"uses": "actions/checkout@v1" | ||
}, | ||
{ | ||
"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 \"::set-output name=value::$(date -u \"+%Y-%m\")\"", | ||
"shell": "bash" | ||
}, | ||
{ | ||
"name": "Cache Roswell Setup", | ||
"id": "cache", | ||
"uses": "actions/cache@v2", | ||
"with": { | ||
"path": "qlfile\n qlfile.lock\n /usr/local/bin/ros\n ~/.cache/common-lisp/\n ~/.roswell\n /usr/local/etc/roswell\n .qlot", | ||
"key": "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock') }}" | ||
} | ||
}, | ||
{ | ||
"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'" | ||
}, | ||
{ | ||
"name": "Setup Common Lisp Environment", | ||
"uses": "40ants/setup-lisp@v1", | ||
"with": { | ||
"asdf-system": "cl-info", | ||
"qlfile-template": "github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal" | ||
}, | ||
"if": "steps.cache.outputs.cache-hit != 'true'" | ||
}, | ||
{ | ||
"name": "Build Docs", | ||
"uses": "40ants/build-docs@v1", | ||
"with": { | ||
"asdf-system": "cl-info" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
(defpackage #:cl-info/ci | ||
(:use #:cl) | ||
(:import-from #:40ants-ci/jobs/linter | ||
#:linter) | ||
(:import-from #:40ants-ci/jobs/run-tests | ||
#:run-tests) | ||
(:import-from #:40ants-ci/jobs/docs | ||
#:build-docs) | ||
(:import-from #:40ants-ci/steps/sh | ||
#:sh | ||
#:sections) | ||
(:import-from #:40ants-ci/workflow | ||
#:defworkflow)) | ||
(in-package cl-info/ci) | ||
|
||
|
||
(defworkflow docs | ||
:on-push-to ("workflow-generator" | ||
"master") | ||
:by-cron "0 10 * * 1" | ||
:cache t | ||
:jobs ((build-docs))) | ||
|
||
|
||
(defclass run-tests-with-additional-steps (run-tests) | ||
()) | ||
|
||
|
||
(defmethod 40ants-ci/jobs/job:steps ((job run-tests-with-additional-steps)) | ||
(append | ||
(call-next-method) | ||
(list | ||
(sh "Run Command Line Version" | ||
(sections | ||
("Help Argument" | ||
"qlot exec cl-info --help") | ||
("Version Argument" | ||
"qlot exec cl-info --version") | ||
("Lisp Systems Info" | ||
"qlot exec cl-info cl-info defmain")))))) | ||
|
||
|
||
(defworkflow ci | ||
:on-push-to ("workflow-generator" | ||
"master") | ||
:by-cron "0 10 * * 1" | ||
:on-pull-request t | ||
:cache t | ||
:jobs ((linter) | ||
(run-tests-with-additional-steps | ||
:os ("ubuntu-latest" | ||
;; "macos-latest" | ||
) | ||
:quicklisp ("quicklisp" | ||
;; "ultralisp" | ||
) | ||
:lisp ("sbcl-bin" | ||
;; "ccl-bin" | ||
;; "allegro" | ||
) | ||
;; :exclude (:os "macos-latest" :lisp "allegro") | ||
|
||
:coverage t | ||
:qlfile "{% ifequal quicklisp_dist \"ultralisp\" %} | ||
dist ultralisp http://dist.ultralisp.org | ||
{% endifequal %} | ||
github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal"))) |