diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 129e8ff..d4019a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,38 +34,6 @@ "cache": "true" } }, - { - "name": "Checkout Code", - "uses": "actions/checkout@v4" - }, - { - "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v4", - "with": { - "asdf-system": "40ants-ci", - "cache": "false" - } - }, - { - "name": "Change dist to Ultralisp if qlfile does not exist", - "run": "if [[ ! -e qlfile ]]; then echo 'dist ultralisp http://dist.ultralisp.org' > qlfile; fi", - "shell": "bash" - }, - { - "name": "Update Qlot", - "run": "qlot update --no-deps", - "shell": "bash" - }, - { - "name": "Install SBLint wrapper", - "run": "qlot exec ros install 40ants-asdf-system 40ants-linter", - "shell": "bash" - }, - { - "name": "Run Linter", - "run": "qlot exec 40ants-linter --system \"40ants-ci, 40ants-ci-tests\" --imports", - "shell": "bash" - }, { "name": "Change dist to Ultralisp if qlfile does not exist", "run": "if [[ ! -e qlfile ]]; then echo 'dist ultralisp http://dist.ultralisp.org' > qlfile; fi", @@ -108,38 +76,6 @@ "cache": "true" } }, - { - "name": "Checkout Code", - "uses": "actions/checkout@v4" - }, - { - "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v4", - "with": { - "asdf-system": "40ants-ci", - "cache": "false" - } - }, - { - "name": "Change dist to Ultralisp", - "run": "echo 'dist ultralisp http://dist.ultralisp.org' > qlfile", - "shell": "bash" - }, - { - "name": "Update Qlot", - "run": "qlot update || qlot update", - "shell": "bash" - }, - { - "name": "Install LISP-CRITIC wrapper", - "run": "qlot exec ros install 40ants-critic", - "shell": "bash" - }, - { - "name": "Run Critic for \"40ants-ci\" system", - "run": "qlot exec lisp-critic --ignore function-too-long,check-prefix 40ants-ci", - "shell": "bash" - }, { "name": "Change dist to Ultralisp", "run": "echo 'dist ultralisp http://dist.ultralisp.org' > qlfile", @@ -200,27 +136,6 @@ "cache": "true" } }, - { - "name": "Checkout Code", - "uses": "actions/checkout@v4" - }, - { - "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v4", - "with": { - "asdf-system": "40ants-ci", - "qlfile-template": "{% ifequal quicklisp_dist \"ultralisp\" %}\ndist ultralisp http://dist.ultralisp.org\n{% endifequal %}", - "cache": "false" - } - }, - { - "name": "Run Tests", - "uses": "40ants/run-tests@v2", - "with": { - "asdf-system": "40ants-ci", - "coveralls-token": "\n${{ matrix.lisp == 'sbcl-bin' &&\n matrix.os == 'ubuntu-latest' &&\n matrix.quicklisp == 'ultralisp' &&\n secrets.github_token }}" - } - }, { "name": "Run Tests", "uses": "40ants/run-tests@v2", diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 40b80f2..0cd1739 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,26 +34,6 @@ "cache": "true" } }, - { - "name": "Checkout Code", - "uses": "actions/checkout@v4" - }, - { - "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v4", - "with": { - "asdf-system": "40ants-ci", - "cache": "false" - } - }, - { - "name": "Build Docs", - "uses": "40ants/build-docs@v1", - "with": { - "asdf-system": "40ants-ci", - "error-on-warnings": true - } - }, { "name": "Build Docs", "uses": "40ants/build-docs@v1", diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73b9a8a..4362396 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,22 +17,6 @@ "OS": "ubuntu-latest" }, "steps": [ - { - "name": "Checkout Code", - "uses": "actions/checkout@v4" - }, - { - "name": "Create release tag", - "uses": "butlerlogic/action-autotag@8bc1ad456dcdee34e8c6ffbce991cc31793578c2", - "with": { - "root": "ChangeLog.md", - "regex_pattern": "^## (?\\d+\\.\\d+\\.\\d+.*?)( |\\n).*$", - "tag_prefix": "v" - }, - "env": { - "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" - } - }, { "name": "Checkout Code", "uses": "actions/checkout@v4" diff --git a/src/jobs/job.lisp b/src/jobs/job.lisp index f422e45..ef46bf1 100644 --- a/src/jobs/job.lisp +++ b/src/jobs/job.lisp @@ -17,7 +17,8 @@ #:make-matrix #:make-env #:permissions - #:make-permissions)) + #:make-permissions + #:explicit-steps)) (in-package #:40ants-ci/jobs/job) @@ -33,7 +34,8 @@ :documentation "A list of plists denoting matrix combinations to be excluded.") (steps :initform nil :initarg :steps - :reader steps) + :documentation "This slot holds steps given as a STEPS argument to a job constructor. Depending on a job class, it might add additional steps around these explicit steps." + :reader explicit-steps) (permissions :initform nil :initarg :permissions :documentation "A plist of permissions need for running the job. @@ -53,18 +55,25 @@ (unless (slot-boundp job 'name) (setf (slot-value job 'name) (string-downcase - (class-name (class-of job))) - (slot-value job 'steps) + (class-name (class-of job)))) + (setf (slot-value job 'steps) (mapcar #'ensure-step - (steps job))))) + (slot-value job 'steps))))) + (defmethod os :around ((job job)) (uiop:ensure-list (call-next-method))) -(defmethod steps :around ((job job)) - (uiop:ensure-list - (call-next-method))) + +(defgeneric steps (job) + (:method ((job job)) + (explicit-steps job)) + + (:method :around ((job job)) + (uiop:ensure-list + (call-next-method)))) + (defmethod exclude :around ((job job)) (ensure-list-of-plists