From 68b2b76b8b0ded07d4609713ab15413efac0f8ee Mon Sep 17 00:00:00 2001 From: paku Date: Sat, 11 Jan 2025 23:13:57 +0900 Subject: [PATCH] Add workflow for Forgejo Actions --- .forgejo/workflows/ci.yml | 70 ++++++++++++++++++++++++++ .github/workflows/{test.yml => ci.yml} | 10 ++-- qlfile | 11 ++-- qlfile.lock | 30 +++++------ 4 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 .forgejo/workflows/ci.yml rename .github/workflows/{test.yml => ci.yml} (84%) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..b68a3f5 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,70 @@ +name: 'CI' + +on: + push: + branches: + - 'main' + pull_request: + +jobs: + test: + runs-on: docker + + strategy: + matrix: + lisp: + - sbcl-bin + + steps: + - uses: actions/checkout@v4 + + - name: Restore cache + id: restore-cache + uses: actions/cache/restore@v4 + with: + path: | + ~/.roswell + /usr/local/bin/ros + /usr/local/etc/roswell/ + qlfile + qlfile.lock + .qlot + ~/.cache/common-lisp/ + key: roswell-${{ runner.os }}-${{ matrix.lisp }}-${{ hashFiles('qlfile', 'qlfile.lock', '*.asd') }} + + - name: Install Roswell + if: steps.restore-cache.outputs.cache-hit != 'true' + env: + LISP: ${{ matrix.lisp }} + run: | + curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh + + - name: Install Qlot + if: steps.restore-cache.outputs.cache-hit != 'true' + run: | + ros install fukamachi/qlot + + - name: Install dependencies + if: steps.restore-cache.outputs.cache-hit != 'true' + run: | + PATH="~/.roswell/bin:$PATH" + qlot install + qlot exec ros install lack-mw + + - name: Save cache + id: save-cache + uses: actions/cache/save@v4 + if: steps.restore-cache.outputs.cache-hit != 'true' + with: + path: | + ~/.roswell + /usr/local/bin/ros + /usr/local/etc/roswell/ + qlfile + qlfile.lock + .qlot + ~/.cache/common-lisp/ + key: ${{ steps.restore-cache.outputs.cache-primary-key }} + + - name: Run tests + run: .qlot/bin/rove lack-mw.asd diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 84% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index 90f54cc..115a9f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'test' +name: 'CI' on: push: @@ -7,15 +7,15 @@ on: pull_request: jobs: - tests: + test: runs-on: ubuntu-latest - + strategy: matrix: lisp: - sbcl-bin - ccl-bin - + env: LISP: ${{ matrix.lisp }} @@ -26,4 +26,4 @@ jobs: asdf-system: lack-mw - uses: 40ants/run-tests@v2 with: - asdf-system: lack-mw + asdf-system: lack-mw \ No newline at end of file diff --git a/qlfile b/qlfile index 95f9b5c..2f8e50d 100644 --- a/qlfile +++ b/qlfile @@ -1,5 +1,6 @@ -github lack fukamachi/lack -github quri fukamachi/quri -github rove fukamachi/rove -github dissect Shinmera/dissect ; workaround -github ningle fukamachi/ningle +ql lack +ql quri + +git rove https://github.com/fukamachi/rove +git dissect https://github.com/Shinmera/dissect ; workaround +git ningle https://github.com/fukamachi/ningle diff --git a/qlfile.lock b/qlfile.lock index b9873ee..98ba546 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -3,22 +3,22 @@ :initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest) :version "2024-10-12")) ("lack" . - (:class qlot/source/github:source-github - :initargs (:repos "fukamachi/lack" :ref nil :branch nil :tag nil) - :version "github-866b5f5c082db0f9c7e7c78b46ed2459391c6423")) + (:class qlot/source/ql:source-ql + :initargs (:%version :latest) + :version "ql-2024-10-12")) ("quri" . - (:class qlot/source/github:source-github - :initargs (:repos "fukamachi/quri" :ref nil :branch nil :tag nil) - :version "github-45e0ff7f15a96ae9aef02b977375c6984d57a608")) + (:class qlot/source/ql:source-ql + :initargs (:%version :latest) + :version "ql-2024-10-12")) ("rove" . - (:class qlot/source/github:source-github - :initargs (:repos "fukamachi/rove" :ref nil :branch nil :tag nil) - :version "github-cacea7331c10fe9d8398d104b2dfd579bf7ea353")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://github.com/fukamachi/rove") + :version "git-cacea7331c10fe9d8398d104b2dfd579bf7ea353")) ("dissect" . - (:class qlot/source/github:source-github - :initargs (:repos "Shinmera/dissect" :ref nil :branch nil :tag nil) - :version "github-a70cabcd748cf7c041196efd711e2dcca2bbbb2c")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://github.com/Shinmera/dissect") + :version "git-a70cabcd748cf7c041196efd711e2dcca2bbbb2c")) ("ningle" . - (:class qlot/source/github:source-github - :initargs (:repos "fukamachi/ningle" :ref nil :branch nil :tag nil) - :version "github-ae0c79bbd7c71633268fe3130ed4f12ca4be2f9a")) + (:class qlot/source/git:source-git + :initargs (:remote-url "https://github.com/fukamachi/ningle") + :version "git-ae0c79bbd7c71633268fe3130ed4f12ca4be2f9a"))