Merge pull request #25 from 40ants/fix-ql-fix-loading

Fix :HOME path component issue.
This commit is contained in:
Alexander Artemenko 2024-04-15 18:24:25 +03:00 committed by GitHub
commit 48b749e1f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 129 additions and 68 deletions

View file

@ -14,46 +14,86 @@ jobs:
fail-fast: false # Let the workflow continue as much as possible fail-fast: false # Let the workflow continue as much as possible
matrix: matrix:
include: include:
- os: ubuntu-latest # Linux
lisp: sbcl
# Just to ensure test.ros will not fail when version
# is specified explicitly
- os: ubuntu-latest
lisp: sbcl/2.3.1
- os: macos-latest
lisp: sbcl-bin
- os: windows-latest
lisp: sbcl-bin
- os: ubuntu-latest
lisp: sbcl-bin
- os: ubuntu-latest
lisp: ccl-bin
- os: ubuntu-latest
lisp: clisp-head
- os: ubuntu-latest
lisp: ecl
- os: ubuntu-latest - os: ubuntu-latest
lisp: abcl-bin lisp: abcl-bin
- os: ubuntu-latest
lisp: clasp-bin
- os: ubuntu-latest
lisp: cmu-bin
# See issue: https://github.com/40ants/setup-lisp/issues/22 # See issue: https://github.com/40ants/setup-lisp/issues/22
# - os: ubuntu-latest # - os: ubuntu-latest
# lisp: allegro # lisp: allegro
# See issue: https://github.com/40ants/setup-lisp/issues/15 - os: ubuntu-latest
# - os: ubuntu-latest lisp: ccl-bin
# lisp: clisp
# See issue: https://github.com/40ants/setup-lisp/issues/16 # See issue: https://github.com/40ants/setup-lisp/issues/16
# - os: ubuntu-latest # - os: ubuntu-latest
# lisp: clasp # 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 # See issue: https://github.com/40ants/setup-lisp/issues/17
# - os: ubuntu-latest # - os: ubuntu-latest
# lisp: mkcl # lisp: mkcl
# See issue: https://github.com/40ants/setup-lisp/issues/18 # See issue: https://github.com/40ants/setup-lisp/issues/18
# - os: ubuntu-latest # - os: ubuntu-latest
# lisp: npt # 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-latest
lisp: abcl-bin
- os: macos-latest
lisp: ccl-bin
# https://github.com/40ants/setup-lisp/issues/29
# - os: macos-latest
# lisp: clasp-bin
# https://github.com/40ants/setup-lisp/issues/28
# - os: macos-latest
# lisp: clisp-head
# https://github.com/40ants/setup-lisp/issues/30
# - os: macos-latest
# lisp: cmu-bin
- os: macos-latest
lisp: ecl
- os: macos-latest
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: defaults:
run: run:
shell: lispsh -eo pipefail {0} shell: lispsh -eo pipefail {0}
@ -83,8 +123,11 @@ jobs:
# https://github.com/roswell/roswell/issues/497 # https://github.com/roswell/roswell/issues/497
asdf-version: 3.3.5.3 asdf-version: 3.3.5.3
qlot-version: latest qlot-version: latest
- run: which ros
- run: ros config - 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 ros install 40ants/cl-info
- run: qlot exec cl-info - run: qlot exec cl-info

View file

@ -57,6 +57,11 @@ inputs:
~/.cache/common-lisp/ ~/.cache/common-lisp/
.qlot .qlot
cache-suffix:
description: "Internal var. Don't use it."
required: false
default: v9
runs: runs:
using: composite using: composite
steps: steps:
@ -206,7 +211,7 @@ runs:
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
with: with:
path: ${{ inputs.roswell-cache-paths }} path: ${{ inputs.roswell-cache-paths }}
key: roswell-${{ inputs.roswell-version }}-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ env.LISP }} key: roswell-${{ inputs.roswell-version }}-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ env.LISP }}-${{ inputs.cache-suffix }}
- if: inputs.cache == 'true' && steps.roswell-cache-restore.outputs.cache-hit == 'true' - if: inputs.cache == 'true' && steps.roswell-cache-restore.outputs.cache-hit == 'true'
name: Restore Path To Cached Files name: Restore Path To Cached Files
@ -271,21 +276,7 @@ runs:
mkdir -p ~/.roswell mkdir -p ~/.roswell
cat >> ~/.roswell/init.lisp <<EOF cat $GITHUB_ACTION_PATH/load-quicklisp-fix.lisp >> ~/.roswell/init.lisp
(let ((fix-filename (make-pathname :directory '(:absolute :home ".quicklisp-client-fix")
:name "quicklisp-fix"
:type "lisp")))
(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)))))
EOF
- if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true' - if: inputs.cache == 'false' || steps.roswell-cache-restore.outputs.cache-hit != 'true'
name: Upgrade ASDF to the Latest Version name: Upgrade ASDF to the Latest Version
@ -357,7 +348,7 @@ runs:
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
with: with:
path: ${{ inputs.qlot-cache-paths }} path: ${{ inputs.qlot-cache-paths }}
key: qlot-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ env.QUICKLISP_DIST }}-${{ env.LISP }}-${{ hashFiles('qlfile', 'qlfile.lock', '*.asd') }} key: qlot-${{ steps.locals.outputs.current-month }}-${{ env.cache-name }}-${{ runner.os }}-${{ 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' - if: inputs.cache == 'true' && steps.qlot-cache-restore.outputs.cache-hit == 'true'
name: Restore Path To .qlot/bin name: Restore Path To .qlot/bin
@ -378,17 +369,16 @@ runs:
# This step will install system and # This step will install system and
# all possible roswell scripts, if the system # all possible roswell scripts, if the system
# has them in the roswell/ subdirectory: # has them in the roswell/ subdirectory:
- if: inputs.cache == 'false' || steps.qlot-cache-restore.outputs.cache-hit != 'true' - if: inputs.asdf-system && (inputs.cache == 'false' || steps.qlot-cache-restore.outputs.cache-hit != 'true')
name: Install ASDF System name: Install ASDF System
shell: lispsh -eo pipefail {0} shell: lispsh -eo pipefail {0}
# Here we'll need to set CL_SOURCE_REGISTRY
# when will switch to a new qlot:
run: | run: |
echo ::group::Install ASDF System echo ::group::Install ASDF System
if [[ -n "${{ inputs.asdf-system }}" ]]; then
qlot exec ros install ${{ inputs.asdf-system }} qlot exec ros install ${{ inputs.asdf-system }}
else
echo "ASDF system wasn't provided."
fi
echo ::endgroup:: echo ::endgroup::
- if: inputs.cache == 'true' && steps.qlot-cache-restore.outputs.cache-hit != 'true' - if: inputs.cache == 'true' && steps.qlot-cache-restore.outputs.cache-hit != 'true'

View file

@ -7,7 +7,17 @@
(defchangelog (:ignore-words ("ASDF" (defchangelog (:ignore-words ("ASDF"
"PATH" "PATH"
"CL"
"HOME")) "HOME"))
(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 (4.0.2 2024-02-27
" "
# Fixed # Fixed
@ -31,7 +41,7 @@
* 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 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 2023-01-30 (3.2.0 2024-01-30
" "
# Changed # Changed
@ -44,7 +54,7 @@
* Fixed running of test.ros script under Windows. * Fixed running of test.ros script under Windows.
") ")
(3.1.0 2023-01-27 (3.1.0 2024-01-27
" "
# Changed # Changed

View file

@ -89,22 +89,21 @@ when trying to call `ros` or `qlot` scripts:
Error: Process completed with exit code 127. Error: Process completed with exit code 127.
``` ```
| **Implementation** | **Linux** | **OSX** | **Windows** |
| **Implementation** | **Supported** | |--------------------|------------------------------------------------------|---------|--------------|
|--------------------|------------------------------------------------------| | abcl-bin | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| abcl-bin | | | allegro | [](https://github.com/40ants/setup-lisp/issues/22) | | |
| allegro | [](https://github.com/40ants/setup-lisp/issues/22) | | ccl-bin | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| ccl-bin | | | clasp | [](https://github.com/40ants/setup-lisp/issues/16) | | [](https://github.com/40ants/setup-lisp/issues/27) |
| clasp | [](https://github.com/40ants/setup-lisp/issues/16) | | clasp-bin | | [❌](https://github.com/40ants/setup-lisp/issues/29) |
| clasp-bin | | | clisp | [](https://github.com/40ants/setup-lisp/issues/15) | | [](https://github.com/40ants/setup-lisp/issues/27) |
| clisp | [](https://github.com/40ants/setup-lisp/issues/15) | | clisp-head | | [❌](https://github.com/40ants/setup-lisp/issues/28) |
| clisp-head | | | cmu-bin | | [❌](https://github.com/40ants/setup-lisp/issues/30) | [](https://github.com/40ants/setup-lisp/issues/27) |
| cmu-bin | | | ecl | | ✅ | [](https://github.com/40ants/setup-lisp/issues/27) |
| ecl | | | mkcl | [](https://github.com/40ants/setup-lisp/issues/17) | | |
| mkcl | [](https://github.com/40ants/setup-lisp/issues/17) | | npt | [](https://github.com/40ants/setup-lisp/issues/18) | | |
| npt | [](https://github.com/40ants/setup-lisp/issues/18) | | sbcl | | | |
| sbcl | | | sbcl-bin | | ✅ | |
| sbcl-bin | |
") ")

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))))))