Skip to content

Commit

Permalink
Merge pull request #3 from 40ants/update-ci
Browse files Browse the repository at this point in the history
Update CI Pipeline
  • Loading branch information
svetlyak40wt committed Mar 22, 2024
2 parents a5cda9e + c01c2a1 commit 9a950cd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 92 deletions.
78 changes: 18 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,29 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v1"
"uses": "actions/checkout@v4"
},
{
"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",
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v4",
"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', '*.asd') }}"
"asdf-system": "humanize-duration",
"cache": "true"
}
},
{
"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": "Change dist to Ultralisp if qlfile does not exist",
"run": "if [[ ! -e qlfile ]]; then echo 'dist ultralisp http://dist.ultralisp.org' > qlfile; fi",
"shell": "bash"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v1",
"with": {
"asdf-system": "humanize-duration"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"name": "Update Qlot",
"run": "qlot update --no-deps",
"shell": "bash"
},
{
"name": "Install SBLint",
"run": "\necho 'dist ultralisp http://dist.ultralisp.org' > qlfile\nqlot update\nqlot exec ros install 40ants-linter\n",
"name": "Install SBLint wrapper",
"run": "qlot exec ros install 40ants-asdf-system 40ants-linter",
"shell": "bash"
},
{
Expand All @@ -82,41 +66,15 @@
"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', '*.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@v1",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "humanize-duration"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"asdf-system": "humanize-duration",
"cache": "true"
}
},
{
"name": "Run Tests",
Expand Down
37 changes: 6 additions & 31 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"master"
]
},
"pull_request": null,
"schedule": [
{
"cron": "0 10 * * 1"
Expand All @@ -23,41 +24,15 @@
"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', '*.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@v1",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "humanize-duration"
},
"if": "steps.cache.outputs.cache-hit != 'true'"
"asdf-system": "humanize-duration",
"cache": "true"
}
},
{
"name": "Build Docs",
Expand Down
2 changes: 1 addition & 1 deletion qlfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org/" :%version :latest)
:version "20240303155001"))
:version "20240322141005"))
1 change: 1 addition & 0 deletions src/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

(defworkflow docs
:on-push-to "master"
:on-pull-request t
:by-cron "0 10 * * 1"
:cache t
:jobs ((build-docs)))
Expand Down

0 comments on commit 9a950cd

Please sign in to comment.