WIP: Improve caching #2

Closed
paku wants to merge 4 commits from ci into main
3 changed files with 78 additions and 6 deletions

72
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,72 @@
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: |
~/.quicklisp-client-fix
~/.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', '.forgejo/workflows/ci.yml') }}
- 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 ningle-fbr
- name: Save cache
id: save-cache
uses: actions/cache/save@v4
if: steps.restore-cache.outputs.cache-hit != 'true'
with:
path: |
~/.quicklisp-client-fix
~/.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 ningle-fbr.asd

View file

@ -1,4 +1,4 @@
name: 'test' name: 'CI'
on: on:
push: push:
@ -7,15 +7,15 @@ on:
pull_request: pull_request:
jobs: jobs:
tests: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
lisp: lisp:
- sbcl-bin - sbcl-bin
- ccl-bin - ccl-bin
env: env:
LISP: ${{ matrix.lisp }} LISP: ${{ matrix.lisp }}
@ -26,4 +26,4 @@ jobs:
asdf-system: ningle-fbr asdf-system: ningle-fbr
- uses: 40ants/run-tests@v2 - uses: 40ants/run-tests@v2
with: with:
asdf-system: ningle-fbr asdf-system: ningle-fbr

View file

@ -13,7 +13,7 @@
("cl-ppcre" . ("cl-ppcre" .
(:class qlot/source/ql:source-ql (:class qlot/source/ql:source-ql
:initargs (:%version :latest) :initargs (:%version :latest)
:version "ql-2023-10-21")) :version "ql-2023-06-18"))
("alexandria" . ("alexandria" .
(:class qlot/source/ql:source-ql (:class qlot/source/ql:source-ql
:initargs (:%version :latest) :initargs (:%version :latest)