Skip to content

Commit

Permalink
Use Qlot for CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Jul 9, 2024
1 parent 5090bd6 commit 3e2b899
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.qlot/local-projects
.qlot/dists/quicklisp
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@

t/test.db
.qlot/
qlfile
qlfile.lock
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- LISP=${LISP:-sbcl}
restart: "no"
volumes:
- ./:/app/
- .:/app
depends_on:
- postgres
- mysql
Expand Down
20 changes: 16 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
ARG LISP=sbcl

FROM fukamachi/qlot AS build-env

WORKDIR /app
COPY qlfile /app
COPY qlfile.lock /app

RUN qlot install --no-deps

FROM fukamachi/${LISP} AS base

RUN ros -e '(ql-dist:install-dist "http://dist.ultralisp.org/" :prompt nil)'
RUN ros install fukamachi/cl-dbi rove
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libsqlite3-dev \
default-libmysqlclient-dev \
default-mysql-client && \
rm -rf /var/lib/apt/lists/*

COPY . /app
WORKDIR /app
RUN set -x; \
ros -e '(ql:update-dist "quicklisp" :prompt nil)' && \
ros install "fukamachi/qlot"

ENV CL_SOURCE_REGISTRY "/app/"
COPY --from=build-env /app/.qlot /app/.qlot

COPY . /app
RUN qlot install

ENTRYPOINT "/app/docker/entrypoint.sh"
5 changes: 3 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -x
set -e

qlot exec ros -s mito-test

while ! mysql -u "$MYSQL_USER" \
-h "$MYSQL_HOST" \
-P "$MYSQL_PORT" \
Expand All @@ -11,5 +13,4 @@ while ! mysql -u "$MYSQL_USER" \
sleep 1
done

ros -s mito-test
rove mito-test.asd
.qlot/bin/rove mito-test.asd
5 changes: 5 additions & 0 deletions qlfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ql cl-dbi :upstream
ql cl-mysql :upstream
ql dissect :upstream
ql sxql :upstream
ql rove :upstream
29 changes: 29 additions & 0 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-10-21"))
("cl-dbi" .
(:class qlot/source/ql:source-ql-upstream
:initargs nil
:version "ql-upstream-2ff41f0706180e140a31b844da4f0272e1a281cd"
:remote-url "https://github.com/fukamachi/cl-dbi.git"))
("cl-mysql" .
(:class qlot/source/ql:source-ql-upstream
:initargs nil
:version "ql-upstream-b273cf772f13a525b534f5ee58bf36fb733204f3"
:remote-url "https://github.com/hackinghat/cl-mysql.git"))
("dissect" .
(:class qlot/source/ql:source-ql-upstream
:initargs nil
:version "ql-upstream-a70cabcd748cf7c041196efd711e2dcca2bbbb2c"
:remote-url "https://github.com/Shinmera/dissect.git"))
("sxql" .
(:class qlot/source/ql:source-ql-upstream
:initargs nil
:version "ql-upstream-c79c252bef276bb0343ced5149083e3b91d85d9b"
:remote-url "https://github.com/fukamachi/sxql.git"))
("rove" .
(:class qlot/source/ql:source-ql-upstream
:initargs nil
:version "ql-upstream-cacea7331c10fe9d8398d104b2dfd579bf7ea353"
:remote-url "https://github.com/fukamachi/rove.git"))

0 comments on commit 3e2b899

Please sign in to comment.