Compare commits

...

82 commits

Author SHA1 Message Date
github-actions[bot]
76212e4597 Update docs 2024-12-14 22:08:30 +00:00
Alexander Artemenko
37d6351ff1 Fixed the way how we set dynamic-space-size. 2024-12-14 22:05:20 +00:00
github-actions[bot]
0bbf4764f4 Update docs 2024-12-14 10:03:04 +00:00
Alexander Artemenko
c5aaeb1ffc
Merge pull request from 40ants/dynamic-space-size
Input variable `dynamic-space-size` was added. It can be used to default set memory size for SBCL.
2024-12-14 12:58:18 +03:00
Alexander Artemenko
55b7212e25 Fixed small problem in the docs. 2024-12-14 09:51:14 +00:00
Alexander Artemenko
9467768eb5 Input variable dynamic-space-size was added. It can be used to default set memory size for SBCL. 2024-12-14 09:37:59 +00:00
github-actions[bot]
b6c2357e52 Update docs 2024-08-04 07:22:35 +00:00
Alexander Artemenko
f3e4144589
Merge pull request from 40ants/qlot-no-deps-mode
Qlot no deps mode
2024-08-04 10:17:22 +03:00
Alexander Artemenko
da8536f4ff Fixed condition. 2024-05-18 00:22:24 +03:00
Alexander Artemenko
fe2e6f885e Add more logging. 2024-05-18 00:21:32 +03:00
Alexander Artemenko
e14ce570fc Updated the changelog. 2024-05-17 16:19:34 +03:00
Alexander Artemenko
976b3e5419 Input argument qlot-no-deps was added.
It makes Qlot to ignore asd files and their dependencies.

This this might be useful in rare cases when your project contains a non-readable asd files such as templates.
2024-05-17 15:59:07 +03:00
github-actions[bot]
1e6a66be39 Update docs 2024-04-26 07:16:07 +00:00
Alexander Artemenko
1a45deaa8e
Merge pull request from ak-coram/macos-14-cache-fixes
macos-14 caching fixes
2024-04-26 10:12:59 +03:00
Ákos Kiss
abd311bead Update changelog 2024-04-19 10:22:53 +02:00
Ákos Kiss
f4185fed53 Add macos-14 to test matrix 2024-04-19 10:18:38 +02:00
Ákos Kiss
4d80952994 Add homebrew paths to roswell cache for macos-14 2024-04-19 05:09:28 +02:00
Ákos Kiss
98a5a9d323 Extend qlot cache key with runner architecture 2024-04-19 05:05:56 +02:00
github-actions[bot]
cf2feb4223 Update docs 2024-04-18 08:10:23 +00:00
Alexander Artemenko
f243cb8ff6 Update changelog. 2024-04-18 11:07:18 +03:00
Alexander Artemenko
a5179c83cc
Merge pull request from ak-coram/extend-cache-key-with-runner-arch
Extend cache key with runner architecture (fixes )
2024-04-18 11:01:51 +03:00
Ákos Kiss
2050461d6f Extend cache key with runner architecture 2024-04-18 04:31:06 +02:00
github-actions[bot]
08730d2cc2 Update docs 2024-04-15 15:27:08 +00:00
Alexander Artemenko
48b749e1f2
Merge pull request from 40ants/fix-ql-fix-loading
Fix :HOME path component issue.
2024-04-15 18:24:25 +03:00
Alexander Artemenko
cb334f930e Fix :HOME path component issue.
First, we need to ensure that any errors in quicklisp fix loader cause failure of our own tests.
2024-04-15 18:08:08 +03:00
Alexander Artemenko
9eb7a325f3 Update deps. 2024-03-06 02:08:05 +03:00
github-actions[bot]
d59bda940d Update docs 2024-02-27 22:26:29 +00:00
Alexander Artemenko
b9bed49497
Merge pull request from 40ants/fix-recreating-of-qlfile-inside-cache
Fix recreating of qlfile inside qlot environment cache.
2024-02-28 01:23:42 +03:00
Alexander Artemenko
d1afc4a2c7 Update changelog. 2024-02-28 01:17:35 +03:00
Alexander Artemenko
78562d4bed Fix recreating of qlfile inside qlot environment cache. 2024-02-28 00:28:17 +03:00
github-actions[bot]
9e4feeebbc Update docs 2024-02-25 16:05:23 +00:00
Alexander Artemenko
0fe284ebfe
Merge pull request from 40ants/fix-ql-osx-fix
Fixed loading of quicklisp-osx-fix
2024-02-25 19:02:46 +03:00
Alexander Artemenko
397c5328a9 Disabled test for allegro. 2024-02-25 13:55:01 +00:00
Alexander Artemenko
a7e183c1bc Fixed loading of quicklisp-osx-fix
Previously the script made unnecessary output and when you had a `qlfile` template in your workflow this output leaked into `qlfile` broking following `qlot install`.
2024-02-25 13:47:08 +00:00
github-actions[bot]
f1fddbf686 Update docs 2024-02-24 21:40:02 +00:00
Alexander Artemenko
d05de90b76
Merge pull request from 40ants/use-cache
Use cache
2024-02-25 00:37:17 +03:00
Alexander Artemenko
d52785caf1 Added cache support inside the action itself. Now it can run up to 10 times faster! 2024-02-24 21:30:03 +00:00
github-actions[bot]
c5aa55df5c Update docs 2024-01-30 16:32:25 +00:00
Alexander Artemenko
24ec3e22bd
Merge pull request from 40ants/fix-test-ros
Fix test ros
2024-01-30 19:30:22 +03:00
Alexander Artemenko
487d54503a Fixed calling of test.ros under the windows, simplified Roswell install and dont pollute PATH with a path to Action directory. 2024-01-30 19:02:51 +03:00
github-actions[bot]
e59ec7798f Update docs 2024-01-27 19:29:13 +00:00
Alexander Artemenko
f75805e69c
Merge pull request from 40ants/add-more-tests
Added a test to check if need lisp really was installed and activated.
2024-01-27 22:24:30 +03:00
Alexander Artemenko
b7a3e0ed16 Added a test to check if need lisp really was installed and activated. 2024-01-27 22:11:03 +03:00
github-actions[bot]
3bf08fa821 Update docs 2023-12-13 22:36:29 +00:00
Alexander Artemenko
7d38ee81a1
Merge pull request from 40ants/use-quicklisp-fix
Use quicklisp fix
2023-12-14 01:33:58 +03:00
Alexander Artemenko
df23291fee Create .roswell folder. 2023-12-13 22:29:30 +00:00
Alexander Artemenko
b07ebec1b4 Replace tab. 2023-12-13 22:17:00 +00:00
Alexander Artemenko
a25410e3b9 Updated changelog. 2023-12-13 22:11:48 +00:00
Alexander Artemenko
eafa22e5ca Use quicklisp client fix to load package-inferred systems without problems. 2023-12-13 21:40:35 +00:00
github-actions[bot]
13e1c3eee3 Update docs 2023-10-30 10:12:57 +00:00
Alexander Artemenko
9fad36ba21
Merge pull request from ak-coram/fix-issue-7
Use env. variable instead of an expression in action.yml
2023-08-23 09:37:44 +03:00
Alexander Artemenko
ba1fb09ed7 Use a hack to not signal error on missing quicklisp-client import. 2023-08-21 16:28:51 +00:00
Ákos Kiss
791d720749 Use env. variable instead of an expression in action.yml (fixes )
This is a workaround for backslashes being included in the path for
${{ github.action_path }} even when using bash on Windows.
2023-08-06 16:04:12 +02:00
github-actions[bot]
99efbd4524 Update docs 2023-06-05 10:16:31 +00:00
Alexander Artemenko
74b15495bb
Merge pull request from 40ants/move-to-fresh-msys
Switching to msys2/setup-msys2@2.14.0
2022-11-10 11:45:42 +03:00
Alexander Artemenko
5c4c392deb Lint docs and run on pull-requests. 2022-11-10 11:44:25 +03:00
Alexander Artemenko
c06cb2474c Moved to newer action msys2/setup-msys2@2.14.2 where a warning about stale Node.js version is fixed. 2022-11-10 11:36:26 +03:00
Alexander Artemenko
0d4e947bd4 Switching to msys2/setup-msys2@2.14.0 2022-11-10 10:46:13 +03:00
github-actions[bot]
de48902f5f Update docs 2022-01-22 08:29:32 +00:00
Alexander Artemenko
c0fa487efb
Merge pull request from dawranliou/patch-1
Update references in README to v2
2022-01-22 11:23:55 +03:00
Daw-Ran Liou
cdf595448e
Update references in README to v2
This commit updates the various references of `v1` and `v2-beta` to `v2.
2022-01-21 10:55:02 -08:00
github-actions[bot]
c78049a6fc Update docs 2021-12-06 10:27:20 +00:00
Alexander Artemenko
017e7f52b0 Merge branch 'master' of github.com:40ants/setup-lisp 2021-10-28 18:07:54 +03:00
Alexander Artemenko
a755b24734 Move docs workflow to setup-lisp@v2. 2021-10-28 17:22:24 +03:00
github-actions[bot]
1e551a7bfe Update docs 2021-10-28 13:56:06 +00:00
Alexander Artemenko
f2d00697d2 Fixed asdf version in docs workflow. 2021-10-28 16:50:02 +03:00
Alexander Artemenko
cc82acd63c Added creds to Matteo Landi. 2021-10-28 16:38:12 +03:00
Alexander Artemenko
021db5bdbd Updated changelog and released 2.0.0 version. 2021-10-28 16:37:04 +03:00
Alexander Artemenko
6e9fb38681
Merge pull request from iamFIREcracker/windows-work
Add support for Windows
2021-10-28 16:21:10 +03:00
Matteo Landi
8e15e10663 Compat with latest msys2/setup-msys2 2021-10-28 13:40:12 +02:00
Matteo Landi
b615572a53 Try to make it easier to use this action
1. Move the `uses` for `setup-msys2/setup-msys2` inside our action.
   Note, composite actions do not support conditional steps yet, and to
   workaround that I had to fork setup-msys2 and suppress the error when
   run on Linux or Mac OS
2. `bash-or-msys2` got renamed to `lispsh`, this way workflows can
   simply refer to that when in need to use Lisp-related tools like
   `ros`, or `qlot`

PS. The tests workflow was updated to reflect the above mentioned tests.
2021-10-27 09:30:33 +02:00
Matteo Landi
e0ec9dde9f Update all the QL dists just in case the Workflow had caching turned on 2021-10-26 19:22:14 +02:00
Matteo Landi
f178435a8a Change workflow to _use_ the action the defined in the current commit 2021-10-26 19:21:58 +02:00
Matteo Landi
b8a0985cfc Update changelog and docs 2021-10-26 18:09:46 +02:00
Matteo Landi
0b4f0353dd Add action workflow to facilitate testing
What:

- On Linux, MacOS, and Windows, installs sbcl-bin and all the _working_
  versions of Roswell, ASDF, and Qlot
- Runs `qlot exec ros` to install a project (to see if it errors out or
  not)

When:

- Each pushed change
- Each pull request action (not our own!)
- Every Saturday night

(Note: when running on the Saturday night, the workflow will try and
install the _latest_ version of Roswell, ASDF, and Qlot)
2021-10-26 18:09:38 +02:00
Matteo Landi
83e8e2c880 Switch to the latest version of Roswell
Roswell cannot be installed with git-bash anymore, so I had to set
things up again using msys2 (and that came with its own bag of
problems).

Given how unstables things seem to be (see:
https://github.com/roswell/roswell/issues/497), I went on and decided to
pin each dependency to a version which we know it's working:

- roswell-version: v21.10.14.111
- asdf-version: 3.3.5.3
- qlot-version: 0.11.5

(Note: `latest` can be used, as input, to tell the action to install the
latest version of the specific dependency)
2021-10-26 18:09:31 +02:00
Matteo Landi
40a3bed5a9 Fix copy-pasta in existing doc 2021-10-19 13:56:40 +02:00
Matteo Landi
59aa2d5f9a Update doc 2021-10-19 13:56:40 +02:00
Matteo Landi
2245ceb29f Install Roswell with sh -x to enable some debug traces 2021-10-19 13:56:40 +02:00
Matteo Landi
f0b3e3d20b Set things up correctly for Roswell to successfully install on Windows
- Set `ROSWELL_INSTALL_DIR` to a location that does not include spaces
  in its name, and add that to PATH as well so the installation script
  can find the newly unzip'd `ros` binary -- without this, it will try
  to build Roswell from sources and of course fail
- Set `MSYSCON` to let Roswell believe it's running in a msys2
  environment -- or otherwise the action would fail when trying to
  upgrade ASDF
- Add ~/.roswell/lisp/quicklisp/bin to PATH or otherwise the action
  would fail when trying to `qlot install`
2021-10-19 13:56:40 +02:00
Matteo Landi
4d14f6133e Add input: roswell-version
If not specified, the action will install the most recent version of
Roswell which is known to be compatible with this action, i.e.
v21.06.14.110; however, users can set this input equal to "master", and
the action will install the latest version of Roswell instead.
2021-10-19 13:56:40 +02:00
github-actions[bot]
26ec3d804c Update docs 2021-09-19 12:26:31 +00:00
13 changed files with 1256 additions and 190 deletions

View file

@ -6,6 +6,7 @@
"master"
]
},
"pull_request": null,
"schedule": [
{
"cron": "0 10 * * 1"
@ -23,14 +24,41 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v1"
"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'"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v1",
"uses": "40ants/setup-lisp@v2",
"with": {
"asdf-system": "project-docs"
}
},
"if": "steps.cache.outputs.cache-hit != 'true'"
},
{
"name": "Build Docs",
@ -41,6 +69,74 @@
}
}
]
},
"linter": {
"runs-on": "ubuntu-latest",
"env": {
"OS": "ubuntu-latest",
"QUICKLISP_DIST": "quicklisp",
"LISP": "sbcl-bin"
},
"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'"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v2",
"with": {
"asdf-system": "project-docs"
},
"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": "Update Qlot",
"run": "qlot update --no-deps",
"shell": "bash"
},
{
"name": "Install SBLint wrapper",
"run": "qlot exec ros install 40ants-asdf-system 40ants-linter",
"shell": "bash"
},
{
"name": "Run Linter",
"run": "qlot exec 40ants-linter --system \"project-docs\" --imports",
"shell": "bash"
}
]
}
}
}

39
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,39 @@
{
"name": "RELEASE",
"on": {
"push": {
"branches": [
"master"
]
}
},
"jobs": {
"autotag": {
"permissions": {
"contents": "write"
},
"runs-on": "ubuntu-latest",
"env": {
"OS": "ubuntu-latest"
},
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
},
{
"name": "Create release tag",
"uses": "butlerlogic/action-autotag@8bc1ad456dcdee34e8c6ffbce991cc31793578c2",
"with": {
"root": "ChangeLog.md",
"regex_pattern": "^## (?<version>\\d+\\.\\d+\\.\\d+.*?)( |\\n).*$",
"tag_prefix": "v"
},
"env": {
"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
}
}
]
}
}
}

152
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,152 @@
name: tests
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 0 * * SUN"
jobs:
tests:
strategy:
fail-fast: false # Let the workflow continue as much as possible
matrix:
include:
# Linux
- os: ubuntu-latest
lisp: abcl-bin
# See issue: https://github.com/40ants/setup-lisp/issues/22
# - os: ubuntu-latest
# lisp: allegro
- os: ubuntu-latest
lisp: ccl-bin
# See issue: https://github.com/40ants/setup-lisp/issues/16
# - os: ubuntu-latest
# lisp: clasp
- os: ubuntu-latest
lisp: clasp-bin
# See issue: https://github.com/40ants/setup-lisp/issues/15
# - os: ubuntu-latest
# lisp: clisp
- os: ubuntu-latest
lisp: clisp-head
- os: ubuntu-latest
lisp: cmu-bin
- os: ubuntu-latest
lisp: ecl
# See issue: https://github.com/40ants/setup-lisp/issues/17
# - os: ubuntu-latest
# lisp: mkcl
# See issue: https://github.com/40ants/setup-lisp/issues/18
# - os: ubuntu-latest
# lisp: npt
- os: ubuntu-latest
lisp: sbcl
# Just to ensure test.ros will not fail when version
# is specified explicitly
- os: ubuntu-latest
lisp: sbcl/2.3.1
- os: ubuntu-latest
lisp: sbcl-bin
# OSX
- os: macos-13
lisp: abcl-bin
- os: macos-13
lisp: ccl-bin
# https://github.com/40ants/setup-lisp/issues/29
# - os: macos-13
# lisp: clasp-bin
# https://github.com/40ants/setup-lisp/issues/28
# - os: macos-13
# lisp: clisp-head
# https://github.com/40ants/setup-lisp/issues/30
# - os: macos-13
# lisp: cmu-bin
- os: macos-13
lisp: ecl
- os: macos-13
lisp: sbcl-bin
- os: macos-14
lisp: abcl-bin
# - os: macos-14
# lisp: ccl-bin
# https://github.com/40ants/setup-lisp/issues/29
# - os: macos-14
# lisp: clasp-bin
# https://github.com/40ants/setup-lisp/issues/28
# - os: macos-14
# lisp: clisp-head
# https://github.com/40ants/setup-lisp/issues/30
# - os: macos-14
# lisp: cmu-bin
- os: macos-14
lisp: ecl
- os: macos-14
lisp: sbcl-bin
# Windows
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: abcl-bin
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: ccl-bin
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: clasp-bin
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: clisp-head
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: cmu-bin
# https://github.com/40ants/setup-lisp/issues/27
# - os: windows-latest
# lisp: ecl
- os: windows-latest
lisp: sbcl-bin
defaults:
run:
shell: lispsh -eo pipefail {0}
env:
LISP: ${{ matrix.lisp }}
name: test with ${{ matrix.lisp }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
# The repo already contains the qlot and qlot.lock files, and since
# we don't want those to interfere with the current test run, we
# clone the repository somewhere else (i.e. something different from
# the default './')
path: setup-lisp
- name: Call setup-lisp with default arguments
if: github.event_name != 'schedule'
uses: ./setup-lisp/
- name: Call setup-lisp and install latest
if: github.event_name == 'schedule'
uses: ./setup-lisp/
with:
roswell-version: latest
# XXX remove this override (i.e. put "latest" back in) after the
# following roswell issue has been solved:
# https://github.com/roswell/roswell/issues/497
asdf-version: 3.3.5.3
qlot-version: latest
- run: ros config
# On OSX this steps fails often:
# https://github.com/40ants/setup-lisp/issues/31
# I don't know how to fix it, so we'll skip it for now:
continue-on-error: true
- run: qlot exec ros install 40ants/cl-info
- run: qlot exec cl-info

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/env/
/.qlot
/README
*.fasl

View file

@ -2,6 +2,185 @@
# ChangeLog
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E2-2E1-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.2.1 (2024-12-15)
Fixed the way how we set dynamic-space-size.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E2-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.2.0 (2024-12-14)
Input variable `dynamic-space-size` was added. It can be used to default set memory size for `SBCL`.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E1-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.1.0 (2024-05-17)
<a id="added"></a>
### Added
* Input argument qlot-no-deps was added.
Make Qlot ignore asd files and their dependencies.
This this might be useful in rare cases when your project contains a non-readable asd files such as templates.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E5-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.5 (2024-04-19)
<a id="fixed"></a>
### Fixed
* Extended test matrix with macos-14 runner.
* Fixed Roswell cache paths for macos-14 runner.
* Extended qlot cache key with runner architecture.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E4-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.4 (2024-04-18)
<a id="fixed"></a>
### Fixed
* Cache key was extended with runner architecture. Thanks for the contribution to Ákos Kiss!
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E3-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.3 (2024-03-12)
<a id="fixed"></a>
### Fixed
* There was an error when action suceeded, but actually failed trying to load my quicklisp fix for package inferred systems.
A code to load this fix used `:HOME` as a pathname component which is not supported by some `CL` implementations. Actually,
I've already fixed this issue in 3.1.0 version, but somehow this fix was lost. Also, a handler-bind wrapper around the loader was added
and now action's tests will fail in case of any errors.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E2-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.2 (2024-02-27)
<a id="fixed"></a>
### Fixed
* Fix recreating of qlfile inside qlot environment cache.
When some jobs used qlfile-template argument + caching, a template application
result was cached and caused an error during the next run.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E1-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.1 (2024-02-25)
<a id="fixed"></a>
### Fixed
* Fixed loading of quicklisp-osx-fix. Previously the script made unnecessary output and when you had a `qlfile` template in your workflow this output leaked into `qlfile` broking following `qlot install`.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C4-2E0-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 4.0.0 (2024-02-24)
<a id="changed"></a>
### Changed
* Internal cache mechanism was added. Now action caches Roswell and Qlot files to speed up reruns. For example, without cache action could be executed about 4 minutes, and with cache it runs only 20 seconds on Ubuntu or 1 minute on Windows.
* A new input variable `cache` was added to control caching beheviour. It is `true` by default, but you can switch it to `false` to turn caching off.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C3-2E2-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 3.2.0 (2024-01-30)
<a id="changed"></a>
### Changed
* Now action uses `bash -xeo pipefail` for running Roswell install script. This way, in case of some errors inside the script, it will be interrupted immediately.
* Also, we don't attempt to set `ROSWELL_INSTALL_DIR` env variable anymore, because despite it's presence, Roswell was installed into `/mingw64/bin/` instead under Windows and it works well (at least for me).
* Now we don't add action's directory to the `PATH` using modification of `GITHUB_PATH` variable. This prevents modification of the `PATH` of a workflow called the action.
<a id="fixed"></a>
### Fixed
* Fixed running of test.ros script under Windows.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C3-2E1-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 3.1.0 (2024-01-27)
<a id="changed"></a>
### Changed
* Switched from Roswell v21.10.14.111 to v23.10.14.114.
* Now action checks if it is really installed requested Lisp implementation.
* A list of supported implementation was added to the documentation.
* Some implementation supported by Roswell, have problems. If you need them, please, contribute the fix either to this action or to the Roswell itself.
<a id="fixed"></a>
### Fixed
* Now all steps fail-fast on the first encountered error. Previously some step might be failed, but action's execution was considered success.
* Fixed Quicklisp fix activation for lisp implementations which are not support `:HOME` as part of the pathname.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C3-2E0-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 3.0.0 (2023-12-14)
Now action uses a fix for Quicklisp client which makes it possible to load package inferred `ASDF` systems by name of the subsystem.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C2-2E1-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 2.1.0 (2022-11-10)
Moved to newer action msys2/setup-msys2@2.14.2 where a warning about stale Node.js version is fixed.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C2-2E0-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 2.0.0 (2021-10-28)
<a id="new"></a>
### New
* Add Windows support.
<a id="breaking-changes"></a>
### Breaking changes
Now instead of latest version of `ASDF`, Roswell and Qlot
we pin versions which known to work in supported environments.
If you want latest version, pass "latest" as value of
"asdf-version", "roswell-version" or "qlot-version".
Currently these versions are used:
* `ASDF`: 3.3.5.3
* Roswell: v21.10.14.111
* Qlot: 0.11.5
Thanks for these changes to Matteo Landi!
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C1-2E1-2E2-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 1.1.2 (2021-09-19)
Move from Qlot 0.11.1 to 0.11.5.
<a id="x-28PROJECT-DOCS-2FCHANGELOG-3A-3A-7C1-2E1-2E1-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 1.1.1 (2021-09-12)

164
README.md
View file

@ -14,19 +14,46 @@ and [Qlot][e3ea] inside the Github `CI`.
## What this action does for you?
* It installs Roswell and all it's dependencies, doing right thing depending on
the operating system. It should work on Ubuntu, `OSX` and maybe Windows.
the operating system. It should work on Ubuntu, `OSX` and Windows.
* Upgrade `ASDF` to the latest version.
* Installs Qlot.
* Adds to `PATH` these directories: `~/.roswell/bin` and `.qlot/bin`
* Creates `.qlot` by running `qlot install`. How to override content of the
`qlfile`, see "Overriding qlfile" section.
* And finally, it can install a specified `ASDF` system and all it's dependencies.
But this step is optional.
* Installed Roswell, `.qlot` and `~/.cache/common-lisp/` files are cached to speed up
repeated builds.
<a id="x-28PROJECT-DOCS-3A-3A-40IMPLEMENTATION-SUPPORT-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Implementation support
Most implementations are tested on Linux, but for some of them Windows and `OSX` are also should work.
Note, that for correct execution, your workflow should use `lispsh -eo pipefail` instead of default `bash`.
This way a workflow will work Linux, `OSX` and Windows. You you will ignore this advice, you'll see such error
when trying to call `ros` or `qlot` scripts:
```
/c/Users/runneradmin/.roswell/lisp/quicklisp/bin/qlot: line 4: exec: ros: not found
Error: Process completed with exit code 127.
```
| **Implementation** | **Linux** | **OSX** | **Windows** |
| --- | --- | --- | --- |
| abcl-bin | ✅ | ✅ | [❌][d780] |
| allegro | [❌][d984] | | |
| ccl-bin | ✅ | ✅ | [❌][d780] |
| clasp | [❌][ecc6] | | [❌][d780] |
| clasp-bin | ✅ | [❌][bf3c] |
| clisp | [❌][78c5] | | [❌][d780] |
| clisp-head | ✅ | [❌][5334] |
| cmu-bin | ✅ | [❌][2599] | [❌][d780] |
| ecl | ✅ | ✅ | [❌][d780] |
| mkcl | [❌][2801] | | |
| npt | [❌][7189] | | |
| sbcl | ✅ | | |
| sbcl-bin | ✅ | ✅ | ✅ |
<a id="x-28PROJECT-DOCS-3A-3A-40TYPICAL-USAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
@ -58,18 +85,18 @@ jobs:
LISP: ${{ matrix.lisp }}
steps:
- uses: actions/checkout@v1
- uses: 40ants/setup-lisp@v1
- uses: actions/checkout@v4
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
- uses: 40ants/run-tests@v2-beta
- uses: 40ants/run-tests@v2
with:
asdf-system: cl-info
```
The part, corresponding to an action call is:
```yaml
- uses: 40ants/setup-lisp@v1
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
```
@ -87,17 +114,44 @@ env:
The last step in this workflow runs tests for the specified `ASDF`
system. It is documented [here][8469].
<a id="x-28PROJECT-DOCS-3A-3A-40ASDF-VERSION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
<a id="x-28PROJECT-DOCS-3A-3A-40ROSWELL-VERSION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Overriding qlfile
## Overriding Roswell version
By default, action will install the latest `ASDF` version. But sometimes you might
want to fix an `ASDF` version. In such case, use `asdf-version` argument:
By default this action will install the latest version of Roswell known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `roswell-version` argument:
```
- uses: 40ants/setup-lisp@v1
- uses: 40ants/setup-lisp@v4
with:
asdf-version: 3.3.4.18
roswell-version: v21.10.14.111
```
<a id="x-28PROJECT-DOCS-3A-3A-40ASDF-VERSION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Overriding ASDF version
By default this action will install the latest version of `ASDF` known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `asdf-version` argument:
```
- uses: 40ants/setup-lisp@v4
with:
asdf-version: 3.3.5.3
```
<a id="x-28PROJECT-DOCS-3A-3A-40QLOT-VERSION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Overriding Qlot version
By default this action will install the latest version of Qlot known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `qlot-version` argument:
```
- uses: 40ants/setup-lisp@v4
with:
qlot-version: 0.11.5
```
<a id="x-28PROJECT-DOCS-3A-3A-40QL-FILE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
@ -111,6 +165,7 @@ matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
quicklisp-dist:
- quicklisp
- ultralisp
@ -129,8 +184,8 @@ env:
QUICKLISP_DIST: ${{ matrix.quicklisp-dist }}
steps:
- uses: actions/checkout@v1
- uses: 40ants/setup-lisp@v1
- uses: actions/checkout@v4
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
qlfile-template: |
@ -142,9 +197,7 @@ Here we see a few important things.
1. We put into the env var the type of the quicklisp distribution we want to
our library to test against.
2. We pass a multiline argument `qlfile-template` to the action.
3. Template refers to `quicklisp_dist` to conditionally include a line
into `qlfile` when `quicklisp_dist == "ultralisp"`.
@ -161,65 +214,23 @@ Usually installing Roswell, a lisp implementation and dependencies
take from 2 to 10 minutes. Multiply this to the number of
matrix combinations and you'll get signifficant time.
To speed up build, you can use caching using a standad GitHub action `actions/cache@v2`.
Starting from version `4.0.0`, this action cares about caching itself
and you don't need to wrap it with `actions/cache`. This behaviour
of enabled by default. Without cache action could be executed about
4 minutes, and with cache it runs only 20 seconds on Ubuntu or 1 minute on Windows.
To make caching work, add such sections into your workflow file:
A new input variable `cache` was added to control caching beheviour.
It is `true` by default, but you can switch it to `false` to turn caching off.
```yaml
- 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: |
/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
if: steps.cache.outputs.cache-hit != 'true'
```
There are two important lines here.
* The last line `if: steps.cache.outputs.cache-hit != 'true'` skips
running lisp installation, it it was take from the cache.
* The `key` value:
`
key: "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles('qlfile.lock') }}"
`
It controls when your cache will be matched. If you are using `matrix`, put all it's components
into the key.
I also added a current month there, to make sure cache will be renewed at least monthly.
This way a new Roswell, Qlot and `ASDF` will be used in a build.
The current month is used as part of the cache key, to refresh caches every month.
This way a new Roswell, Qlot and `ASDF` will be used in a build. Also, you can set
`env.cache-name` variable to some value, to force rebuild with a fresh cache.
<a id="x-28PROJECT-DOCS-3A-3A-40ROADMAP-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Roadmap
* Support [`CLPM`][2c45].
* Support [CLPM][2c45].
* Vendor all dependencies, to make action more reliable and secure.
<a id="x-28PROJECT-DOCS-3A-3A-40CONTRIBUTION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
@ -234,6 +245,15 @@ If you want to contribute to this system, join development at GitHub:
[8469]: https://40ants.com/run-tests
[04b3]: https://docs.djangoproject.com/en/3.1/topics/templates/
[cbff]: https://github.com/40ants/setup-lisp
[78c5]: https://github.com/40ants/setup-lisp/issues/15
[ecc6]: https://github.com/40ants/setup-lisp/issues/16
[2801]: https://github.com/40ants/setup-lisp/issues/17
[7189]: https://github.com/40ants/setup-lisp/issues/18
[d984]: https://github.com/40ants/setup-lisp/issues/22
[d780]: https://github.com/40ants/setup-lisp/issues/27
[5334]: https://github.com/40ants/setup-lisp/issues/28
[bf3c]: https://github.com/40ants/setup-lisp/issues/29
[2599]: https://github.com/40ants/setup-lisp/issues/30
[e3ea]: https://github.com/fukamachi/qlot
[3dbd]: https://github.com/mmontone/djula
[795a]: https://github.com/roswell/roswell

View file

@ -1,33 +1,250 @@
name: 'Setup Common Lisp'
author: Alexander Artemenko
description: This action setup Roswell and a Common Lisp implementation plus Qlot for managing virtual environments.
inputs:
roswell-version:
description: 'Roswell version to install. If not specified, the latest working version will be used; if "latest", the latest version is used'
required: false
default: v23.10.14.114
dynamic-space-size:
description: 'If given, then will be used to change dynamic space size for SBCL. This value will be written to ~/.roswell/config'
required: false
asdf-system:
description: 'ASDF system to install'
required: false
asdf-version:
description: 'ASDF version to install. If not specified, then latest version will be used'
description: 'ASDF version to install. If not specified, the latest working version will be used; if "latest", the latest version is used'
required: false
default: 3.3.5.3
qlot-version:
description: 'Qlot version to install. If not specified, the latest working version will be used; if "latest", the latest version is used'
required: false
default: 0.11.5
qlot-no-deps:
description: 'Make Qlot ignore asd files and their dependencies. This this might be useful in rare cases when your project contains a non-readable asd files such as templates.'
required: false
default: false
qlfile-template:
description: "Djula template for qlfile. All environment variables are available in it's context"
required: false
cache:
description: 'If true (default), then cache will be created to speedup repeated action runs.'
required: false
default: true
# GitHub does not support anchors in the action
# and returns error like this:
#
# Anchors are not currently supported. Remove the anchor 'roswell-cache-paths'
#
# That is why I use "input" variable to not repeat this list in two places
roswell-cache-paths:
description: "Internal var. Don't use it."
required: false
default: |
~/.quicklisp-client-fix
~/.roswell
/usr/local/etc/roswell
/usr/local/bin/ros
/usr/local/Cellar/roswell
/opt/homebrew/bin/ros
/opt/homebrew/Cellar/roswell
qlot-cache-paths:
description: "Internal var. Don't use it."
required: false
default: |
path: |
qlfile
qlfile.lock
~/.cache/common-lisp/
.qlot
cache-suffix:
description: "Internal var. Don't use it."
required: false
default: v9
runs:
using: composite
steps:
- name: Current Env
- name: Calculate variables
id: locals
shell: bash
run: |
echo ::group::Environment
echo "Current dir:"
pwd
echo "Environment Variables:"
env | sort -u
if [[ '${{ inputs.roswell-version }}' == 'latest' ]]
then
echo "windows-package-name=mingw-w64-x86_64-roswell" >> $GITHUB_OUTPUT
else
# Strip v prefix from version number
ROS_VERSION=$(echo ${{ inputs.roswell-version }} | sed 's/v//')
echo "windows-package-name=mingw-w64-x86_64-roswell=$ROS_VERSION" >> $GITHUB_OUTPUT
fi
# echo 'roswell-cache-paths=~/.quicklisp-client-fix\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell' >> $GITHUB_OUTPUT
echo "current-month=$(date -u '+%Y-%m')" >> $GITHUB_OUTPUT
- if: runner.os == 'Windows'
uses: msys2/setup-msys2@cc11e9188b693c2b100158c3322424c4cc1dadea #v2.22.0
with:
# Msys2 has its own PATH, and the following setting enables standard
# PATH manipulation expressions like the one shown below, to succeed:
#
# $ echo /usr/local/bin >> $GITHUB_PATH
path-type: inherit
platform-check-severity: warn
# Installing ASDF requires `make`, so let's make sure it's
# available
install: >-
make
${{ steps.locals.outputs.windows-package-name }}
cache: ${{ inputs.cache }}
- name: Create lispsh
shell: bash
run: |
echo ::group::Set up link to lispsh
# All the steps below, should work without problems on Linux, Mac OS,
# and Windows, provided that they are run with the "right" shell
# parameter, i.e. bash for Linux and Mac OS, and msys2 for Windows.
#
# Unfortunately, composite actions do not support getting the shell
# parameter injected from the parent workflow (read more about this
# here: https://github.com/actions/runner/issues/835), so the
# workaround I came up with is:
#
# 1. Symlink bash/msys2 to a known location, i.e. lispsh
# 2. Use lispsh -eo pipefail {0} as shell parameter
#
# Pay attention to -eo pipefail options. We need them to exit on the
# first error. Without this option, Roswell might fail to install the
# implementation and continue to execute everything with default SBCL.
#
# It's not ideal, but the alternative is to duplicate most of the steps
# below, and have some of them with `shell: bash`, and others with
# `shell: msys2 {0}`.
if [[ "$RUNNER_OS" == "Windows" ]]; then
powershell New-Item -ItemType SymbolicLink -Force \
-Path "D:/a/_temp/setup-msys2/lispsh.cmd" \
-Target "D:/a/_temp/setup-msys2/msys2.cmd"
else
sudo ln -sf $(which bash) /usr/local/bin/lispsh
fi
echo ::endgroup::
- name: Install Roswell
- name: Set up Environment
shell: bash
run: |
echo ::group::Install Roswell
echo ::group::Set up Environment
if [[ "$RUNNER_OS" == "Windows" ]]; then
# Roswell internally checks for the MSYSCON env varible to be
# defined, and when not there, it would go and install msys2 (i.e.
# `ros install msys2+`) and rely on the `bash` bonary that comes
# with that installation.
#
# All good except that something is not quite working as it should,
# given that every time Roswell tries to run a `bash` command, it
# would spit out the following:
#
# Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
# {1005700003}>:
# Couldn't execute "C:\\Users\\runneradmin\\.roswell\\impls\\x86-64\\windows\\msys2\\NIL\\usr\\bin\\bash": The system cannot find the file specified.
#
# Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1005700003}>
# 0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "Couldn't execute ~S: ~A" {1004EEA623}> #<unused argument> :QUIT T)
# 1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "Couldn't execute ~S: ~A" {1004EEA623}>)
# 2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "Couldn't execute ~S: ~A" {1004EEA623}>)
# 3: (ERROR "Couldn't execute ~S: ~A" "C:\\Users\\runneradmin\\.roswell\\impls\\x86-64\\windows\\msys2\\NIL\\usr\\bin\\bash" "The system cannot find the file specified.")
# 4: (SB-EXT:RUN-PROGRAM "C:\\Users\\runneradmin\\.roswell\\impls\\x86-64\\windows\\msys2\\NIL\\usr\\bin\\bash" ("-lc" "cd \"C:\\\\Users\\\\runneradmin\\\\.roswell\\\\src\\\\asdf-3.3.5.3\\\\\";pwd") :ENV NIL :ENVIRONMENT NIL :WAIT NIL :SEARCH T :INPUT NIL :IF-INPUT-DOES-NOT-EXIST :ERROR :OUTPUT :STREAM :IF-OUTPUT-EXISTS :APPEND :ERROR NIL :IF-ERROR-EXISTS :APPEND :STATUS-HOOK NIL :EXTERNAL-FORMAT :UTF-8 :DIRECTORY NIL :PRESERVE-FDS NIL :ESCAPE-ARGUMENTS T :WINDOW NIL)
# 5: (UIOP/LAUNCH-PROGRAM:LAUNCH-PROGRAM ("C:\\Users\\runneradmin\\.roswell\\impls\\x86-64\\windows\\msys2\\NIL\\usr\\bin\\bash" "-lc" "cd \"C:\\\\Users\\\\runneradmin\\\\.roswell\\\\src\\\\asdf-3.3.5.3\\\\\";pwd") :INPUT NIL :OUTPUT :STREAM :ERROR-OUTPUT NIL :OUTPUT :STRING)
# 6: ((LAMBDA (UIOP/RUN-PROGRAM::REDUCED-INPUT UIOP/RUN-PROGRAM::INPUT-ACTIVITY) :IN UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM) NIL NIL)
# 7: (UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM ("C:\\Users\\runneradmin\\.roswell\\impls\\x86-64\\windows\\msys2\\NIL\\usr\\bin\\bash" "-lc" "cd \"C:\\\\Users\\\\runneradmin\\\\.roswell\\\\src\\\\asdf-3.3.5.3\\\\\";pwd") :OUTPUT :STRING)
# 8: (MINGW-NAMESTRING #P"C:/Users/runneradmin/.roswell/src/asdf-3.3.5.3/")
# 9: (ROSWELL.INSTALL.ASDF::ASDF-INSTALL (:TARGET "asdf" :VERSION "3.3.5.3" :VERSION-NOT-SPECIFIED 0 :ARGV NIL))
#
# The NIL over there, seems to be the result of evaluating the
# following form:
#
# (config "msys2.version")
#
# Now, I am not sure what's going on with that, but since
# we got msys2 installed already, I figured it would be easier to
# tell Roswell about it and ignore all the other installation
# steps.
echo MSYSCON=Stop-Roswell-From-Installing-Msys2 >> $GITHUB_ENV
# Also, for whatever reason Roswell seems to be installing
# ASDF-system-specific scripts inside .roswell/lisp/quicklisp/bin
# and not .roswell/bin, so if we want to enable users of this
# action to directly invoke these scripts, we need to add
# .roswell/lisp/quicklisp/bin to PATH.
echo $HOME/.roswell/lisp/quicklisp/bin >> $GITHUB_PATH
fi
echo $HOME/.roswell/bin >> $GITHUB_PATH
echo ::endgroup::
# TODO: comment for prod
# - name: Current Env
# shell: bash
# run: |
# echo ::group::Environment
# echo "Current dir:"
# pwd
# echo "Environment Variables:"
# env | sort -u
# echo ::endgroup::
# On Windows we dont have such problems with permission.
# Also we don't have sudo there, so just skip this step
# on this platform:
- if: inputs.cache == 'true' && runner.os != 'Windows'
name: Grant All Perms to Make Roswell Cache Restoring Possible
shell: lispsh -eo pipefail {0}
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
- if: inputs.cache == 'true'
name: Restore Roswell From Cache
id: roswell-cache-restore
uses: actions/cache/restore@v4
with:
path: ${{ inputs.roswell-cache-paths }}
key: roswell-${{ inputs.roswell-version }}-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-${{ env.LISP }}-${{ inputs.cache-suffix }}
- if: inputs.cache == 'true' && steps.roswell-cache-restore.outputs.cache-hit == 'true'
name: Restore Path To Cached Files
shell: lispsh -eo pipefail {0}
run: |
echo $HOME/.roswell/bin >> $GITHUB_PATH
echo .qlot/bin >> $GITHUB_PATH
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo $HOME/.roswell/lisp/quicklisp/bin >> $GITHUB_PATH
fi
# Start the piece which results should be cached
# On Windows we install roswell using Pacman package manager and don't need this step
- if: (inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true') && runner.os != 'Windows'
name: Install Roswell
shell: lispsh -eo pipefail {0}
run: |
echo ::group::Installing Roswell dependencies
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update
sudo apt-get -y install git build-essential automake libcurl4-openssl-dev
@ -35,15 +252,53 @@ runs:
if [[ "$RUNNER_OS" == "macOS" ]]; then
brew install automake autoconf curl
fi
curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh
echo $HOME/.roswell/bin >> $GITHUB_PATH
echo ::endgroup::
- name: Upgrade ASDF to the Latest Version
shell: bash
if [[ "${{ inputs.roswell-version }}" != "latest" ]]; then
echo ::group::Installing Roswell ${{ inputs.roswell-version }}
curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | bash -xeo pipefail
else
echo ::group::Installing latest Roswell
curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | bash -xeo pipefail
fi
if [[ "${{ inputs.dynamic-space-size }}" != "" ]]; then
echo ::group::Changing Dynamic Space Size in Roswell Config
ros config set dynamic-space-size ${{ inputs.dynamic-space-size }}
fi
echo ::endgroup::
- if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Upgrade Quicklisp dists
shell: lispsh -eo pipefail {0}
run: |
if [[ -n "${{ inputs.asdf-version }}" ]]; then
# The parent workflow might have caching enabled for Roswell and all
# the other Lisp files in general, so it's better to tell Quicklisp
# to update all its dists.
ros -e "(ql:update-all-dists :prompt nil)"
- if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Install Quicklisp patch for package-inferred systems
shell: lispsh -eo pipefail {0}
run: |
git clone \
--no-tags \
--single-branch \
--depth=1 \
https://github.com/40ants/quicklisp-client-fix \
~/.quicklisp-client-fix
mkdir -p ~/.roswell
cat $GITHUB_ACTION_PATH/load-quicklisp-fix.lisp >> ~/.roswell/init.lisp
- if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Upgrade ASDF to the Latest Version
shell: lispsh -eo pipefail {0}
run: |
if [[ "${{ inputs.asdf-version }}" != "latest" ]]; then
echo ::group::Installing ASDF ${{ inputs.asdf-version }}
ros install asdf/${{ inputs.asdf-version }}
else
@ -51,28 +306,46 @@ runs:
ros install asdf
fi
echo ::endgroup::
- name: Install Qlot
shell: bash
# Version 0.11.1 is fixed while issue
# https://github.com/fukamachi/qlot/issues/118
# will not be resolved.
- if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Install Qlot
shell: lispsh -eo pipefail {0}
run: |
echo ::group::Install Qlot
ros install fukamachi/qlot/0.11.5
if [[ "${{ inputs.qlot-version }}" != "latest" ]]; then
echo ::group::Installing Qlot ${{ inputs.qlot-version }}
ros install fukamachi/qlot/${{ inputs.qlot-version }}
else
echo ::group::Installing latest Qlot
ros install fukamachi/qlot
fi
echo .qlot/bin >> $GITHUB_PATH
echo ::endgroup::
- name: Create Qlot Environment
shell: bash
- if: inputs.cache == 'true' && steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Cache Roswell Setup
id: roswell-cache-save
uses: actions/cache/save@v4
with:
path: ${{ inputs.roswell-cache-paths }}
key: ${{ steps.roswell-cache-restore.outputs.cache-primary-key }}
# We really need this step go before cache restore,
# because it changes qlfile and cache key depends on it.
- name: Ensure qlfile exists
shell: lispsh -eo pipefail {0}
run: |
echo ::group::Create Qlot Environment
echo ::group::Ensure qlfile exists
if [[ -n "${QLFILE_TEMPLATE}" ]]; then
echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile
if [[ -n "${{ inputs.qlfile-template }}" ]]; then
echo "${{ inputs.qlfile-template }}" | $GITHUB_ACTION_PATH/templater.ros > qlfile
rm -f qlfile.lock
fi
if [[ -e qlfile ]]; then
echo "Created qlfile:"
echo '==============='
cat qlfile
echo '==============='
echo ''
elif [[ -e qlfile ]]; then
echo 'Here is content of qlfile:'
echo '==============='
cat qlfile
@ -82,8 +355,35 @@ runs:
echo 'There is no qlfile. Creating an empty one.'
touch qlfile
fi
qlot install
echo ::endgroup::
- if: inputs.cache == 'true'
name: Restore Qlot Environment
id: qlot-cache-restore
uses: actions/cache/restore@v4
with:
path: ${{ inputs.qlot-cache-paths }}
key: qlot-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-${{ env.QUICKLISP_DIST }}-${{ env.LISP }}-${{ hashFiles('qlfile', 'qlfile.lock', '*.asd') }}-${{ inputs.cache-suffix }}
- if: inputs.cache == 'true' && steps.qlot-cache-restore.outputs.cache-hit == 'true'
name: Restore Path To .qlot/bin
shell: lispsh -eo pipefail {0}
run: |
echo .qlot/bin >> $GITHUB_PATH
- if: inputs.cache == 'false' || steps.qlot-cache-restore.outputs.cache-hit != 'true'
name: Create Qlot Environment
shell: lispsh -eo pipefail {0}
run: |
echo ::group::Create Qlot Environment
if [[ "${{ inputs.qlot-no-deps }}" != 'false' ]]; then
echo 'Running Qlot with --no-deps argument'
qlot install --no-deps
else
echo 'Running Qlot as usual'
qlot install
fi
echo ::endgroup::
env:
QLFILE_TEMPLATE: ${{ inputs.qlfile-template }}
@ -91,13 +391,49 @@ runs:
# This step will install system and
# all possible roswell scripts, if the system
# has them in the roswell/ subdirectory:
- name: Install ASDF System
shell: bash
- if: inputs.asdf-system && (inputs.cache == 'false' || steps.qlot-cache-restore.outputs.cache-hit != 'true')
name: Install ASDF System
shell: lispsh -eo pipefail {0}
# Here we'll need to set CL_SOURCE_REGISTRY
# when will switch to a new qlot:
run: |
echo ::group::Install ASDF System
if [[ -n "${{ inputs.asdf-system }}" ]]; then
qlot exec ros install ${{ inputs.asdf-system }}
else
echo "ASDF system wasn't provided."
fi
qlot exec ros install ${{ inputs.asdf-system }}
echo ::endgroup::
- if: inputs.cache == 'true' && steps.qlot-cache-restore.outputs.cache-hit != 'true'
name: Cache Qlot Environment
id: qlot-cache-save
uses: actions/cache/save@v4
with:
path: ${{ inputs.qlot-cache-paths }}
key: ${{ steps.qlot-cache-restore.outputs.cache-primary-key }}
# End of the cached piece
- name: Check it is possible to run desired lisp implementation
shell: lispsh -eo pipefail {0}
# Call ${{ github.action_path }}test.ros does not work on windows
# because of backslashes.
#
# Here we are using sed to transform slashes in the path.
# Without this trick it is impossible to run test.ros on Windows.
#
# The other way to do the trick is to change write path to GITHUB_PATH.
# In this case, GitHub itself will convert backslashes. Hovewer, this
# way the path will be added to the PATH variable of the workflow
# which used setup-lisp and I consider this is not desired behaviour.
run: |
echo ::group::Checking if we installed correct Lisp implementation
if [[ "$RUNNER_OS" == "Windows" ]]; then
ACTION_PATH="$(echo '${{ github.action_path }}' | sed -e 's|/|\\|')\\"
else
ACTION_PATH='${{ github.action_path }}/'
fi
${ACTION_PATH}test.ros
echo ::endgroup::

View file

@ -1,13 +1,128 @@
(defpackage #:project-docs/changelog
(uiop:define-package #:project-docs/changelog
(:use #:cl)
(:import-from #:40ants-doc/changelog
#:defchangelog))
(in-package project-docs/changelog)
(defchangelog (:ignore-words ("ASDF"))
(defchangelog (:ignore-words ("ASDF"
"PATH"
"CL"
"SBCL"
"HOME"))
(4.2.1 2024-12-15
"Fixed the way how we set dynamic-space-size.")
(4.2.0 2024-12-14
"Input variable `dynamic-space-size` was added. It can be used to default set memory size for SBCL.")
(4.1.0 2024-05-17
"
# Added
* Input argument qlot-no-deps was added.
Make Qlot ignore asd files and their dependencies.
This this might be useful in rare cases when your project contains a non-readable asd files such as templates.")
(4.0.5 2024-04-19
"
# Fixed
* Extended test matrix with macos-14 runner.
* Fixed Roswell cache paths for macos-14 runner.
* Extended qlot cache key with runner architecture.
")
(4.0.4 2024-04-18
"
# Fixed
* Cache key was extended with runner architecture. Thanks for the contribution to Ákos Kiss!
")
(4.0.3 2024-03-12
"
# Fixed
* There was an error when action suceeded, but actually failed trying to load my quicklisp fix for package inferred systems.
A code to load this fix used :HOME as a pathname component which is not supported by some CL implementations. Actually,
I've already fixed this issue in 3.1.0 version, but somehow this fix was lost. Also, a handler-bind wrapper around the loader was added
and now action's tests will fail in case of any errors.
")
(4.0.2 2024-02-27
"
# Fixed
* Fix recreating of qlfile inside qlot environment cache.
When some jobs used qlfile-template argument + caching, a template application
result was cached and caused an error during the next run.
")
(4.0.1 2024-02-25
"
# Fixed
* Fixed loading of quicklisp-osx-fix. Previously the script made unnecessary output and when you had a `qlfile` template in your workflow this output leaked into `qlfile` broking following `qlot install`.
")
(4.0.0 2024-02-24
"
# Changed
* Internal cache mechanism was added. Now action caches Roswell and Qlot files to speed up reruns. For example, without cache action could be executed about 4 minutes, and with cache it runs only 20 seconds on Ubuntu or 1 minute on Windows.
* A new input variable `cache` was added to control caching beheviour. It is `true` by default, but you can switch it to `false` to turn caching off.
")
(3.2.0 2024-01-30
"
# Changed
* Now action uses `bash -xeo pipefail` for running Roswell install script. This way, in case of some errors inside the script, it will be interrupted immediately.
* Also, we don't attempt to set `ROSWELL_INSTALL_DIR` env variable anymore, because despite it's presence, Roswell was installed into `/mingw64/bin/` instead under Windows and it works well (at least for me).
* Now we don't add action's directory to the `PATH` using modification of `GITHUB_PATH` variable. This prevents modification of the `PATH` of a workflow called the action.
# Fixed
* Fixed running of test.ros script under Windows.
")
(3.1.0 2024-01-27
"
# Changed
* Switched from Roswell v21.10.14.111 to v23.10.14.114.
* Now action checks if it is really installed requested Lisp implementation.
* A list of supported implementation was added to the documentation.
* Some implementation supported by Roswell, have problems. If you need them, please, contribute the fix either to this action or to the Roswell itself.
# Fixed
* Now all steps fail-fast on the first encountered error. Previously some step might be failed, but action's execution was considered success.
* Fixed Quicklisp fix activation for lisp implementations which are not support :HOME as part of the pathname.
")
(3.0.0 2023-12-14
"Now action uses a fix for Quicklisp client which makes it possible to load package inferred ASDF systems by name of the subsystem.")
(2.1.0 2022-11-10
"Moved to newer action msys2/setup-msys2@2.14.2 where a warning about stale Node.js version is fixed.")
(2.0.0 2021-10-28
"# New
- Add Windows support.
# Breaking changes
Now instead of latest version of ASDF, Roswell and Qlot
we pin versions which known to work in supported environments.
If you want latest version, pass \"latest\" as value of
\"asdf-version\", \"roswell-version\" or \"qlot-version\".
Currently these versions are used:
- ASDF: 3.3.5.3
- Roswell: v21.10.14.111
- Qlot: 0.11.5
Thanks for these changes to Matteo Landi!")
(1.1.2 2021-09-19
"Move from Qlot 0.11.1 to 0.11.5.")
"Move from Qlot 0.11.1 to 0.11.5.")
(1.1.1 2021-09-12
"Version of qlot was fixed on 0.11.1, because later versions are broken and unable to install
systems from the GitHub. See issue [#118](https://github.com/fukamachi/qlot/issues/118).")

14
ci.lisp
View file

@ -2,11 +2,21 @@
(:use #:cl)
(:import-from #:40ants-ci/workflow
#:defworkflow)
(:import-from #:40ants-ci/jobs/docs))
(:import-from #:40ants-ci/jobs/docs)
(:import-from #:40ants-ci/jobs/autotag)
(:import-from #:40ants-ci/jobs/linter))
(in-package project-docs/ci)
(defworkflow release
:on-push-to "master"
:jobs ((40ants-ci/jobs/autotag:autotag)))
(defworkflow docs
:on-push-to "master"
:on-pull-request t
:by-cron "0 10 * * 1"
:jobs ((40ants-ci/jobs/docs:build-docs)))
:cache t
:jobs ((40ants-ci/jobs/docs:build-docs)
(40ants-ci/jobs/linter:linter :check-imports t)))

159
docs.lisp
View file

@ -1,6 +1,7 @@
(defpackage #:project-docs
(uiop:define-package #:project-docs
(:use #:cl)
(:nicknames #:project-docs/docs)
(:import-from #:40ants-doc
#:defsection
#:defsection-copy)
@ -18,7 +19,12 @@
;; 40ANTS-DOC-THEME-40ANTS system will bring
;; as dependency a full 40ANTS-DOC but we don't want
;; unnecessary dependencies here:
(ql:quickload :40ants-doc-theme-40ants)
#+quicklisp
(uiop:symbol-call :ql :quickload
:40ants-doc-theme-40ants)
#-quicklisp
(asdf:load-system :40ants-doc-theme-40ants)
(list :theme
(find-symbol "40ANTS-THEME"
(find-package "40ANTS-DOC-THEME-40ANTS"))))
@ -40,8 +46,11 @@ necessary to make available [Roswell](https://github.com/roswell/roswell)
and [Qlot](https://github.com/fukamachi/qlot) inside the Github CI.
"
(@features section)
(@implementation-support section)
(@typical-usage section)
(@roswell-version section)
(@asdf-version section)
(@qlot-version section)
(@ql-file section)
(@caching section)
(@roadmap section)
@ -54,7 +63,7 @@ and [Qlot](https://github.com/fukamachi/qlot) inside the Github CI.
(defsection @features (:title "What this action does for you?")
"
* It installs Roswell and all it's dependencies, doing right thing depending on
the operating system. It should work on Ubuntu, OSX and maybe Windows.
the operating system. It should work on Ubuntu, OSX and Windows.
* Upgrade ASDF to the latest version.
* Installs Qlot.
* Adds to `PATH` these directories: `~/.roswell/bin` and `.qlot/bin`
@ -62,9 +71,42 @@ and [Qlot](https://github.com/fukamachi/qlot) inside the Github CI.
`qlfile`, see \"Overriding qlfile\" section.
* And finally, it can install a specified ASDF system and all it's dependencies.
But this step is optional.
* Installed Roswell, `.qlot` and `~/.cache/common-lisp/` files are cached to speed up
repeated builds.
")
(defsection @implementation-support (:title "Implementation support")
"
Most implementations are tested on Linux, but for some of them Windows and OSX are also should work.
Note, that for correct execution, your workflow should use `lispsh -eo pipefail` instead of default `bash`.
This way a workflow will work Linux, OSX and Windows. You you will ignore this advice, you'll see such error
when trying to call `ros` or `qlot` scripts:
```
/c/Users/runneradmin/.roswell/lisp/quicklisp/bin/qlot: line 4: exec: ros: not found
Error: Process completed with exit code 127.
```
| **Implementation** | **Linux** | **OSX** | **Windows** |
|--------------------|------------------------------------------------------|---------|--------------|
| abcl-bin | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| allegro | [](https://github.com/40ants/setup-lisp/issues/22) | | |
| ccl-bin | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| clasp | [](https://github.com/40ants/setup-lisp/issues/16) | | [](https://github.com/40ants/setup-lisp/issues/27) |
| clasp-bin | | [❌](https://github.com/40ants/setup-lisp/issues/29) |
| clisp | [](https://github.com/40ants/setup-lisp/issues/15) | | [](https://github.com/40ants/setup-lisp/issues/27) |
| clisp-head | | [❌](https://github.com/40ants/setup-lisp/issues/28) |
| cmu-bin | | [❌](https://github.com/40ants/setup-lisp/issues/30) | [](https://github.com/40ants/setup-lisp/issues/27) |
| ecl | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| mkcl | [](https://github.com/40ants/setup-lisp/issues/17) | | |
| npt | [](https://github.com/40ants/setup-lisp/issues/18) | | |
| sbcl | | | |
| sbcl-bin | | ✅ | |
")
(defsection @typical-usage (:title "A typical usage")
"
Here is how a minimal GitHub Workflow might look like:
@ -93,11 +135,11 @@ jobs:
LISP: ${{ matrix.lisp }}
steps:
- uses: actions/checkout@v1
- uses: 40ants/setup-lisp@v1
- uses: actions/checkout@v4
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
- uses: 40ants/run-tests@v2-beta
- uses: 40ants/run-tests@v2
with:
asdf-system: cl-info
```
@ -105,7 +147,7 @@ jobs:
The part, corresponding to an action call is:
```yaml
- uses: 40ants/setup-lisp@v1
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
```
@ -127,15 +169,44 @@ system. It is documented [here](https://40ants.com/run-tests).
")
(defsection @asdf-version (:title "Overriding qlfile")
(defsection @roswell-version (:title "Overriding Roswell version")
"
By default, action will install the latest ASDF version. But sometimes you might
want to fix an ASDF version. In such case, use `asdf-version` argument:
By default this action will install the latest version of Roswell known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `roswell-version` argument:
```
- uses: 40ants/setup-lisp@v1
- uses: 40ants/setup-lisp@v4
with:
asdf-version: 3.3.4.18
roswell-version: v21.10.14.111
```
")
(defsection @asdf-version (:title "Overriding ASDF version")
"
By default this action will install the latest version of ASDF known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `asdf-version` argument:
```
- uses: 40ants/setup-lisp@v4
with:
asdf-version: 3.3.5.3
```
")
(defsection @qlot-version (:title "Overriding Qlot version")
"
By default this action will install the latest version of Qlot known to be
working with this action. However, should you need to use a different version
instead, you can specify that via the `qlot-version` argument:
```
- uses: 40ants/setup-lisp@v4
with:
qlot-version: 0.11.5
```
")
@ -150,6 +221,7 @@ matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
quicklisp-dist:
- quicklisp
- ultralisp
@ -169,8 +241,8 @@ env:
QUICKLISP_DIST: ${{ matrix.quicklisp-dist }}
steps:
- uses: actions/checkout@v1
- uses: 40ants/setup-lisp@v1
- uses: actions/checkout@v4
- uses: 40ants/setup-lisp@v4
with:
asdf-system: cl-info
qlfile-template: |
@ -200,58 +272,17 @@ Usually installing Roswell, a lisp implementation and dependencies
take from 2 to 10 minutes. Multiply this to the number of
matrix combinations and you'll get signifficant time.
To speed up build, you can use caching using a standad GitHub action `actions/cache@v2`.
Starting from version `4.0.0`, this action cares about caching itself
and you don't need to wrap it with `actions/cache`. This behaviour
of enabled by default. Without cache action could be executed about
4 minutes, and with cache it runs only 20 seconds on Ubuntu or 1 minute on Windows.
To make caching work, add such sections into your workflow file:
A new input variable `cache` was added to control caching beheviour.
It is `true` by default, but you can switch it to `false` to turn caching off.
```yaml
- 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: |
/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
if: steps.cache.outputs.cache-hit != 'true'
```
There are two important lines here.
- The last line `if: steps.cache.outputs.cache-hit != 'true'` skips
running lisp installation, it it was take from the cache.
- The `key` value:
```
key: \"${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles('qlfile.lock') }}\"
```
It controls when your cache will be matched. If you are using `matrix`, put all it's components
into the key.
I also added a current month there, to make sure cache will be renewed at least monthly.
This way a new Roswell, Qlot and ASDF will be used in a build.
The current month is used as part of the cache key, to refresh caches every month.
This way a new Roswell, Qlot and ASDF will be used in a build. Also, you can set
`env.cache-name` variable to some value, to force rebuild with a fresh cache.
")

19
load-quicklisp-fix.lisp Normal file
View file

@ -0,0 +1,19 @@
(handler-bind ((serious-condition
(lambda (condition)
(uiop:print-condition-backtrace condition)
(uiop:quit 1))))
(let ((fix-filename (merge-pathnames
(make-pathname :directory '(:relative ".quicklisp-client-fix")
:name "quicklisp-fix"
:type "lisp")
(user-homedir-pathname))))
(let ((quicklisp-found #+quicklisp t
#-quicklisp nil))
(cond
((not quicklisp-found)
(warn "Quicklisp is not available, skipping fix loading.~%"))
((probe-file fix-filename)
(handler-bind ((warning #'muffle-warning))
(load fix-filename)))
(t
(warn "Quicklisp fix was not found at ~S.~%" fix-filename))))))

View file

@ -1,12 +1,12 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2021-08-07"))
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2024-10-12"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org" :%version :latest)
:version "20210909150500"))
:initargs (:distribution "https://dist.ultralisp.org" :%version :latest)
:version "20241214090000"))
("sly" .
(:class qlot/source/github:source-github
:initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil)
:version "github-489a6b628f809dd2b1c392346a70a0d2"))
:version "github-030a8441f57f7e0bb401570935e741dfd9edfb83"))

68
test.ros Executable file
View file

@ -0,0 +1,68 @@
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp(ql:quickload '() :silent t)
)
(defpackage :ros.script.test
(:use :cl))
(in-package :ros.script.test)
(defparameter *lisps*
'(("sbcl-bin" . "SBCL")
("sbcl" . "SBCL")
("clisp" . "CLISP")
("clisp-head" . "CLISP")
("ccl-bin" . "Clozure Common Lisp")
("clasp" . "clasp")
("clasp-bin" . "clasp")
("cmu-bin" . "CMU Common Lisp")
("allegro" . "International Allegro CL Free Express Edition")
("abcl-bin" . "Armed Bear Common Lisp")
("npt" . "NPT")
("ecl" . "ECL")))
(defun cut-before (char text)
(let ((pos (position char text)))
(if pos
(subseq text 0 pos)
text)))
(defun main (&rest argv)
(declare (ignorable argv))
(handler-bind ((error (lambda (c)
(uiop:print-condition-backtrace c)
;; Not all implementation do quit with correct status code
;; in case if we just signal and error :(
;; Example of such implementations: CCL-BIN
(uiop:quit 1))))
(let ((needed-lisp (uiop:getenv "LISP")))
(unless needed-lisp
(error "Env variable LISP was not set."))
(let ((expected (or (cdr (assoc needed-lisp *lisps* :test #'string-equal))
(cdr (assoc (cut-before #\/ needed-lisp) *lisps* :test #'string-equal))))
(real-implementation (lisp-implementation-type)))
(unless expected
(error "This test does not support LISP=~A. The real-implementation=~A."
needed-lisp
real-implementation))
(unless (string-equal real-implementation
expected)
(error "Real implementation is \"~A\", but \"~A\" was expected when LISP=~A."
real-implementation
expected
needed-lisp))
(format t "Everything ok, we are running on \"~A\" as expected for LISP=~A."
real-implementation
needed-lisp)))))
;;; vim: set ft=lisp lisp: