From 4d14f6133e27a605e8426ed2244c46fce9355096 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Mon, 18 Oct 2021 20:01:38 +0200 Subject: [PATCH 01/12] 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. --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 07f2953..d66b378 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,10 @@ name: 'Setup Common Lisp' inputs: + roswell-version: + description: 'Roswell version to install. If not specified, then latest version will be used' + required: false + default: 'master' asdf-system: description: 'ASDF system to install' required: false @@ -36,7 +40,7 @@ runs: brew install automake autoconf curl fi - curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh + curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh echo $HOME/.roswell/bin >> $GITHUB_PATH echo ::endgroup:: From f0b3e3d20b3b2a872d4097d5536189c4cbbbeaac Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Mon, 18 Oct 2021 19:49:38 +0200 Subject: [PATCH 02/12] 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` --- action.yml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d66b378..ea6d671 100644 --- a/action.yml +++ b/action.yml @@ -18,6 +18,75 @@ inputs: runs: using: composite steps: + - name: Set up Environment + shell: bash + run: | + echo ::group::Set up Environment + if [[ "$RUNNER_OS" == "Windows" ]]; then + # ROSWELL_INSTALL_DIR defaults to /usr/local/bin; however, + # /usr/local/bin is not part of PATH on Windows and because of that + # Roswell's install script will fail to find the just unzip'd `ros` + # binary and resort to try to build it from sources -- and of + # course fail while doing so. So we add /usr/local/bin to PATH: + # + # > echo /usr/local/bin >> $GITHUB_PATH + # + # However, do the above and even though Roswell would now be able + # to find the newly minted `ros` binary, it would still fail when + # trying to install the specific lisp implementation: + # + # 'C:\Program' is not recognized as an internal or external command, + # operable program or batch file. + # Install Script for sbcl-bin... + # 'C:\Program' is not recognized as an internal or external command, + # operable program or batch file. + # Unhandled UIOP/RUN-PROGRAM:SUBPROCESS-ERROR in thread #: + # Subprocess # + # with command "C:\\Program Files\\Git\\usr\\local\\bin\\ros.exe config set setup.time 3843610170" + # exited with error code 1 + # + # Backtrace for: # + # + # The work-around? Install Roswell somewhere else! + echo ROSWELL_INSTALL_DIR=$HOME/.roswell >> $GITHUB_ENV + + # Roswell would internally check for the MSYSCON env varible to be + # defined, and when not available it would assume Roswell needs to + # install msys2+, and more importantly, when running external + # programs, it would try to use msys2's version of `bash`, and not + # the globally availalbe one; and that, results in the following + # error: + # + # Unhandled SIMPLE-ERROR in thread #: + # 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: # + # 0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK # # :QUIT T) + # 1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #) + # 2: (INVOKE-DEBUGGER #) + # 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 thing is, we don't need Roswell to install msys2, so we can + # simply let it believe "it's all fine" + 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:: - name: Current Env shell: bash run: | @@ -42,7 +111,6 @@ runs: curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh - echo $HOME/.roswell/bin >> $GITHUB_PATH echo ::endgroup:: - name: Upgrade ASDF to the Latest Version shell: bash From 2245ceb29f236a8fd4003a1555477eb5f7b9c090 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 19 Oct 2021 11:38:12 +0200 Subject: [PATCH 03/12] Install Roswell with `sh -x` to enable some debug traces --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ea6d671..fc0ad77 100644 --- a/action.yml +++ b/action.yml @@ -109,7 +109,7 @@ runs: brew install automake autoconf curl fi - curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh + curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh -x echo ::endgroup:: - name: Upgrade ASDF to the Latest Version From 59aa2d5f9a9f3bc6f738d1c60fd51bd66a850fa0 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 19 Oct 2021 13:41:55 +0200 Subject: [PATCH 04/12] Update doc --- docs.lisp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs.lisp b/docs.lisp index a45769a..fb776e1 100644 --- a/docs.lisp +++ b/docs.lisp @@ -41,6 +41,7 @@ and [Qlot](https://github.com/fukamachi/qlot) inside the Github CI. " (@features section) (@typical-usage section) + (@roswell-version section) (@asdf-version section) (@ql-file section) (@caching section) @@ -54,7 +55,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` @@ -127,6 +128,20 @@ system. It is documented [here](https://40ants.com/run-tests). ") +(defsection @roswell-version (:title "Overriding Roswell version") + " +By default this action will install the latest version of Roswell. However, +should you need to use a different version instead, you can specify that via +the `roswell-version` argument: + +``` +- uses: 40ants/setup-lisp@v1 + with: + roswell-version: v21.06.14.110 +``` +") + + (defsection @asdf-version (:title "Overriding qlfile") " By default, action will install the latest ASDF version. But sometimes you might @@ -150,6 +165,7 @@ matrix: os: - ubuntu-latest - macos-latest + - windows-latest quicklisp-dist: - quicklisp - ultralisp From 40a3bed5a984c36ae27fbba449903df120561c61 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 19 Oct 2021 13:53:45 +0200 Subject: [PATCH 05/12] Fix copy-pasta in existing doc --- docs.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.lisp b/docs.lisp index fb776e1..b11dbf8 100644 --- a/docs.lisp +++ b/docs.lisp @@ -142,7 +142,7 @@ the `roswell-version` argument: ") -(defsection @asdf-version (:title "Overriding qlfile") +(defsection @asdf-version (:title "Overriding ASDF 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: From 83e8e2c880ce683aff651e1a06359f241cf5af00 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 26 Oct 2021 17:13:33 +0200 Subject: [PATCH 06/12] 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) --- action.yml | 134 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 40 deletions(-) diff --git a/action.yml b/action.yml index fc0ad77..8657a46 100644 --- a/action.yml +++ b/action.yml @@ -2,15 +2,20 @@ name: 'Setup Common Lisp' inputs: roswell-version: - description: 'Roswell version to install. If not specified, then latest version will be used' + 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: 'master' + default: v21.10.14.111 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 qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false @@ -18,22 +23,45 @@ inputs: runs: using: composite steps: + - name: Create bash-or-msys2 + shell: bash + run: | + # 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. bash-or-msys2 + # 2. Use bash-or-msys2 as shell parameter + # + # 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 \ + -Path "D:/a/_temp/setup-msys2/bash-or-msys2.cmd" \ + -Target "D:/a/_temp/setup-msys2/msys2.cmd" + else + sudo ln -sf $(which bash) /usr/local/bin/bash-or-msys2 + fi - name: Set up Environment shell: bash run: | echo ::group::Set up Environment if [[ "$RUNNER_OS" == "Windows" ]]; then - # ROSWELL_INSTALL_DIR defaults to /usr/local/bin; however, - # /usr/local/bin is not part of PATH on Windows and because of that - # Roswell's install script will fail to find the just unzip'd `ros` - # binary and resort to try to build it from sources -- and of - # course fail while doing so. So we add /usr/local/bin to PATH: + # ROSWELL_INSTALL_DIR defaults to /usr/local/bin which + # unfortunately is not part of PATH on Windows; one could be + # tempted to patch things up like this: # - # > echo /usr/local/bin >> $GITHUB_PATH + # echo /usr/local/bin >> $GITHUB_PATH # - # However, do the above and even though Roswell would now be able - # to find the newly minted `ros` binary, it would still fail when - # trying to install the specific lisp implementation: + # However, if the absolute Windows path that /usr/local/bin + # actually refers to, contains any white space in it, you will + # inevitably bump into the following error: # # 'C:\Program' is not recognized as an internal or external command, # operable program or batch file. @@ -48,15 +76,21 @@ runs: # # Backtrace for: # # - # The work-around? Install Roswell somewhere else! - echo ROSWELL_INSTALL_DIR=$HOME/.roswell >> $GITHUB_ENV + # The work-around? Install Roswell in a different location, whose + # absolute path we are 100% positive won't contain any white + # spaces! + mkdir -p /d/a/_temp/roswell + echo ROSWELL_INSTALL_DIR=/d/a/_temp/roswell >> $GITHUB_ENV + echo /d/a/_temp/roswell >> $GITHUB_PATH - # Roswell would internally check for the MSYSCON env varible to be - # defined, and when not available it would assume Roswell needs to - # install msys2+, and more importantly, when running external - # programs, it would try to use msys2's version of `bash`, and not - # the globally availalbe one; and that, results in the following - # error: + # 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 #: @@ -74,8 +108,15 @@ runs: # 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 thing is, we don't need Roswell to install msys2, so we can - # simply let it believe "it's all fine" + # 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 @@ -93,14 +134,14 @@ runs: echo ::group::Environment echo "Current dir:" pwd - + echo "Environment Variables:" env | sort -u echo ::endgroup:: - name: Install Roswell - shell: bash + shell: bash-or-msys2 {0} run: | - echo ::group::Install Roswell + 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 @@ -108,14 +149,26 @@ runs: if [[ "$RUNNER_OS" == "macOS" ]]; then brew install automake autoconf curl fi - - curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh -x - + if [[ "$RUNNER_OS" == "Windows" ]]; then + # Installing ASDF requires `make`, so let's make sure it's + # available + msys2.cmd -c "pacman --noconfirm -S --needed --overwrite '*' make" + fi + echo ::endgroup:: + + 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 | sh -x + else + echo ::group::Installing latest Roswell + curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh -x + fi + echo ::endgroup:: - name: Upgrade ASDF to the Latest Version - shell: bash + shell: bash-or-msys2 {0} run: | - if [[ -n "${{ inputs.asdf-version }}" ]]; then + if [[ "${{ inputs.asdf-version }}" != "latest" ]]; then echo ::group::Installing ASDF ${{ inputs.asdf-version }} ros install asdf/${{ inputs.asdf-version }} else @@ -124,18 +177,19 @@ runs: 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. + shell: bash-or-msys2 {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 + shell: bash-or-msys2 {0} run: | echo ::group::Create Qlot Environment @@ -154,7 +208,7 @@ runs: echo 'There is no qlfile. Creating an empty one.' touch qlfile fi - + qlot install echo ::endgroup:: env: @@ -164,7 +218,7 @@ runs: # all possible roswell scripts, if the system # has them in the roswell/ subdirectory: - name: Install ASDF System - shell: bash + shell: bash-or-msys2 {0} run: | echo ::group::Install ASDF System if [[ -n "${{ inputs.asdf-system }}" ]]; then From 0b4f0353dde2b602a5be35262891882f12f597d4 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 26 Oct 2021 17:18:30 +0200 Subject: [PATCH 07/12] 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) --- .github/workflows/tests.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a6f95a3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,63 @@ +name: tests + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * SUN" + +jobs: + qlot-exec-ros-install: + # We want to run on external PRs, but not on our own internal PRs as + # they'll be run by the push to the branch. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + strategy: + fail-fast: false # Let the workflow continue as much as possible + matrix: + include: + - os: ubuntu-latest + shell: bash + lisp: sbcl-bin + - os: macos-latest + shell: bash + lisp: sbcl-bin + - os: windows-latest + shell: msys2 {0} + lisp: sbcl-bin + defaults: + run: + shell: ${{ matrix.shell }} + env: + LISP: ${{ matrix.lisp }} + name: build with ${{ matrix.lisp }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: msys2/setup-msys2@v2 + if: runner.os == 'Windows' + with: + # Roswell was added to msys2 just _recently_, so the following makes + # sure packages metadata is up to date. Otherwise... + # + # $ pacman -S mingw-w64-x86_64-roswell + # error: target not found: mingw-w64-x86_64-roswell + # Error: Process completed with exit code 1 + update: true + # 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 + - name: Call setup-lisp with default arguments + if: github.event_name != 'schedule' + uses: iamFIREcracker/setup-lisp@windows-work-tests + - name: Call setup-lisp and install latest + if: github.event_name == 'schedule' + uses: iamFIREcracker/setup-lisp@windows-work-tests + 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: qlot exec ros install 40ants/gh-pages From b8a0985cfcf7f36f2d78ee9da03f9b57e55d0de5 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 26 Oct 2021 17:25:53 +0200 Subject: [PATCH 08/12] Update changelog and docs --- changelog.lisp | 4 ++++ docs.lisp | 30 +++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/changelog.lisp b/changelog.lisp index 0795cb5..30eeb44 100644 --- a/changelog.lisp +++ b/changelog.lisp @@ -6,6 +6,10 @@ (defchangelog (:ignore-words ("ASDF")) + (unreleased + "- Improves Windows support + - Installs Roswell v21.10.14.111 + - Installs ASDF 3.3.5.3") (1.1.2 2021-09-19 "Move from Qlot 0.11.1 to 0.11.5.") (1.1.1 2021-09-12 diff --git a/docs.lisp b/docs.lisp index b11dbf8..1a7b7cf 100644 --- a/docs.lisp +++ b/docs.lisp @@ -43,6 +43,7 @@ and [Qlot](https://github.com/fukamachi/qlot) inside the Github CI. (@typical-usage section) (@roswell-version section) (@asdf-version section) + (@qlot-version section) (@ql-file section) (@caching section) (@roadmap section) @@ -130,27 +131,42 @@ system. It is documented [here](https://40ants.com/run-tests). (defsection @roswell-version (:title "Overriding Roswell version") " -By default this action will install the latest version of Roswell. However, -should you need to use a different version instead, you can specify that via -the `roswell-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 with: - roswell-version: v21.06.14.110 + roswell-version: v21.10.14.111 ``` ") (defsection @asdf-version (:title "Overriding ASDF 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 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@v1 with: - asdf-version: 3.3.4.18 + 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@v1 + with: + qlot-version: 0.11.5 ``` ") From f178435a8a23882f59ea71854abfb82108d0e45c Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 26 Oct 2021 18:19:12 +0200 Subject: [PATCH 09/12] Change workflow to _use_ the action the defined in the current commit --- .github/workflows/tests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a6f95a3..7189d20 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,12 +47,19 @@ jobs: # # $ echo /usr/local/bin >> $GITHUB_PATH path-type: inherit + - uses: actions/checkout@v2 + 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: iamFIREcracker/setup-lisp@windows-work-tests + uses: ./setup-lisp/ - name: Call setup-lisp and install latest if: github.event_name == 'schedule' - uses: iamFIREcracker/setup-lisp@windows-work-tests + uses: ./setup-lisp/ with: roswell-version: latest # XXX remove this override (i.e. put "latest" back in) after the From e0ec9dde9fa723d2e2fcc492177b52b0a3646650 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 26 Oct 2021 18:57:25 +0200 Subject: [PATCH 10/12] Update all the QL dists just in case the Workflow had caching turned on --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 8657a46..7adbee6 100644 --- a/action.yml +++ b/action.yml @@ -165,6 +165,13 @@ runs: fi echo ::endgroup:: + - name: Upgrade Quicklisp dists + shell: bash-or-msys2 {0} + run: | + # 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)" - name: Upgrade ASDF to the Latest Version shell: bash-or-msys2 {0} run: | From b615572a53757d85c95e1605a6d1f6b1ec1a0120 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Wed, 27 Oct 2021 07:16:26 +0200 Subject: [PATCH 11/12] 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. --- .github/workflows/tests.yml | 25 ++++-------------------- action.yml | 38 ++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7189d20..c103e26 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: - cron: "0 0 * * SUN" jobs: - qlot-exec-ros-install: + tests: # We want to run on external PRs, but not on our own internal PRs as # they'll be run by the push to the branch. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository @@ -16,37 +16,19 @@ jobs: matrix: include: - os: ubuntu-latest - shell: bash lisp: sbcl-bin - os: macos-latest - shell: bash lisp: sbcl-bin - os: windows-latest - shell: msys2 {0} lisp: sbcl-bin defaults: run: - shell: ${{ matrix.shell }} + shell: lispsh {0} env: LISP: ${{ matrix.lisp }} - name: build with ${{ matrix.lisp }} on ${{ matrix.os }} + name: test with ${{ matrix.lisp }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: msys2/setup-msys2@v2 - if: runner.os == 'Windows' - with: - # Roswell was added to msys2 just _recently_, so the following makes - # sure packages metadata is up to date. Otherwise... - # - # $ pacman -S mingw-w64-x86_64-roswell - # error: target not found: mingw-w64-x86_64-roswell - # Error: Process completed with exit code 1 - update: true - # 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 - uses: actions/checkout@v2 with: # The repo already contains the qlot and qlot.lock files, and since @@ -67,4 +49,5 @@ jobs: # https://github.com/roswell/roswell/issues/497 asdf-version: 3.3.5.3 qlot-version: latest + - run: ros config - run: qlot exec ros install 40ants/gh-pages diff --git a/action.yml b/action.yml index 7adbee6..4823b11 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,23 @@ inputs: runs: using: composite steps: - - name: Create bash-or-msys2 + # Switch back to setup-msys2/setup-msys2@v2 if / when the following PR is + # merged: https://github.com/msys2/setup-msys2/pull/172 + - uses: iamFIREcracker/setup-msys2@dont-fail-if-not-windows-with-assets + with: + # Roswell was added to msys2 just _recently_, so the following makes + # sure packages metadata is up to date. Otherwise... + # + # $ pacman -S mingw-w64-x86_64-roswell + # error: target not found: mingw-w64-x86_64-roswell + # Error: Process completed with exit code 1 + update: true + # 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 + - name: Create lispsh shell: bash run: | # All the steps below, should work without problems on Linux, Mac OS, @@ -35,18 +51,18 @@ runs: # 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. bash-or-msys2 - # 2. Use bash-or-msys2 as shell parameter + # 1. Symlink bash/msys2 to a known location, i.e. lispsh + # 2. Use lispsh as shell parameter # # 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 \ - -Path "D:/a/_temp/setup-msys2/bash-or-msys2.cmd" \ + -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/bash-or-msys2 + sudo ln -sf $(which bash) /usr/local/bin/lispsh fi - name: Set up Environment shell: bash @@ -139,7 +155,7 @@ runs: env | sort -u echo ::endgroup:: - name: Install Roswell - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | echo ::group::Installing Roswell dependencies if [[ "$RUNNER_OS" == "Linux" ]]; then @@ -166,14 +182,14 @@ runs: echo ::endgroup:: - name: Upgrade Quicklisp dists - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | # 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)" - name: Upgrade ASDF to the Latest Version - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | if [[ "${{ inputs.asdf-version }}" != "latest" ]]; then echo ::group::Installing ASDF ${{ inputs.asdf-version }} @@ -184,7 +200,7 @@ runs: fi echo ::endgroup:: - name: Install Qlot - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | if [[ "${{ inputs.qlot-version }}" != "latest" ]]; then echo ::group::Installing Qlot ${{ inputs.qlot-version }} @@ -196,7 +212,7 @@ runs: echo .qlot/bin >> $GITHUB_PATH echo ::endgroup:: - name: Create Qlot Environment - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | echo ::group::Create Qlot Environment @@ -225,7 +241,7 @@ runs: # all possible roswell scripts, if the system # has them in the roswell/ subdirectory: - name: Install ASDF System - shell: bash-or-msys2 {0} + shell: lispsh {0} run: | echo ::group::Install ASDF System if [[ -n "${{ inputs.asdf-system }}" ]]; then From 8e15e10663fcabdddda4f9c3d72eded40b463fbc Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Thu, 28 Oct 2021 13:00:25 +0200 Subject: [PATCH 12/12] Compat with latest msys2/setup-msys2 --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 4823b11..3365cbf 100644 --- a/action.yml +++ b/action.yml @@ -39,6 +39,7 @@ runs: # # $ echo /usr/local/bin >> $GITHUB_PATH path-type: inherit + platform-check-severity: warn - name: Create lispsh shell: bash run: |