2016-05-11 19:59:47 +02:00
|
|
|
## Process this file with automake to produce Makefile.in.
|
|
|
|
|
2023-09-01 23:17:48 +02:00
|
|
|
# Copyright © 1995-2016, 2023 Free Software Foundation, Inc.
|
2017-01-09 00:41:13 +01:00
|
|
|
# Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
|
2023-05-09 15:13:39 +02:00
|
|
|
# Copyright © 2018, 2023 Ludovic Courtès <ludo@gnu.org>
|
Add support for multiple inputs.
* Makefile.am (dist_sql_DATA): Add src/sql/upgrade-1.sql.
* bin/cuirass.in (show-help, %options, main): Remove the LOAD-PATH option that
was used afterwards as %GUIX-PACKAGE-PATH.
* bin/evaluate.in (absolutize, input-checkout, spec-source, spec-load-path,
spec-package-path, format-checkouts): New procedures.
(%not-colon): Remove variable.
(main): Take the load path, package path and PROC from the checkouts that
result from the inputs. Format the checkouts before sending them to the
procedure. Remove the LOAD-PATH argument.
* doc/cuirass.texi (Overview, Database schema): Document the changes.
* examples/{guix-jobs.scm, hello-git.scm, hello-singleton.scm,
hello-subset.scm, random.scm}: Adapt to the new specification format.
* examples/guix-track-git.scm (package->spec): Rename to PACKAGE->INPUT.
(package->git-tracked): Replace FETCH-REPOSITORY with FETCH-INPUT and handle
the new format of its return value.
* examples/random-jobs.scm (make-random-jobs): Rename RANDOM to CHECKOUT.
Rename the checkout from 'random (which is a specification) to 'cuirass (which
is a checkout resulting from an input).
* src/cuirass/base.scm (fetch-repository): Rename to fetch-input. Rename SPEC
to INPUT. Return a checkout object instead of returning two values.
(evaluate): Take a list of CHECKOUTS and COMMITS as arguments, instead of
SOURCE. Remove TOKENIZE and LOAD-PATH. Pass the CHECKOUTS instead of the
SOURCE to "evaluate". Remove %GUIX-PACKAGE-PATH. Build the EVAL object
instead of getting it from "evaluate".
(compile?, fetch-inputs, compile-checkouts): New procedures.
(process-specs): Fetch all inputs instead of only fetching one repository.
The result of that fetching operation is a list of CHECKOUTS whose COMMITS are
used as a STAMP.
(%guix-package-path, set-guix-package-path): Remove them.
* src/cuirass/database.scm (db-add-input, db-get-inputs): New procedures.
(db-add-specification, db-get-specifications): Adapt to the new specification
format. Add/get all inputs as well.
(db-add-evaluation): Rename REVISION to COMMITS. Store COMMITS as space
separated commit hashes.
(db-get-builds): Rename REPO_NAME to NAME.
(db-get-stamp): Rename COMMIT to STAMP. Return #f when there is no STAMP.
(db-add-stamp): Rename COMMIT to STAMP. Deal with DB-GET-STAMP's new return
value.
(db-get-evaluations): Rename REVISION to COMMITS. Tokenize COMMITS.
* src/cuirass/utils.scm (%non-blocking): Export it.
* src/schema.sql (Inputs): New table that refers to the Specifications table.
(Specifications): Move input related fields to the Inputs table. Rename
REPO_NAME to NAME. Rename ARGUMENTS to PROC_ARGS. Rename FILE to PROC_FILE.
Add LOAD_PATH_INPUTS, PACKAGE_PATH_INPUTS and PROC_INPUT fields that refer to
the Inputs table.
(Stamps): Rename REPO_NAME to NAME.
(Evaluations): Rename REPO_NAME to NAME. Rename REVISION to COMMITS.
(Specifications_index): Replace with Inputs_index.
* src/sql/upgrade-1.sql: New file.
* tests/database.scm (example-spec, make-dummy-eval, sqlite-exec): Adapt to
the new specifications format. Rename REVISION to COMMITS.
* tests/http.scm (evaluations-query-result, fill-db): Idem.
2018-06-26 11:18:23 +02:00
|
|
|
# Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
Add a web interface.
* Makefile.am (dist_sql_DATA): Add static files.
* src/cuirass/database.scm (assqx-ref): Export it.
(db-get-builds): Add 'evaluation' filter and filters for pagination.
(db-get-evaluations-build-summary, db-get-evaluations-id-min,
db-get-evaluations-id-max, db-get-builds-min, db-get-builds-max): New exported
procedures.
* src/cuirass/http.scm (%static-directory): New parameter.
(%page-size, %file-mime-types, %file-white-list): New variables.
(handle-build-request, handle-builds-request): Move the WITH-CRITICAL-SECTION
call out.
(url-handler): Add RESPOND-HTML, RESPOND-STATIC-FILE and RESPOND-NOT-FOUND
procedures. Call WITH-CRITICAL-SECTION sooner for the '/build',
'/api/latestbuilds' and '/api/queue' routes. Add '/', '/jobset/<name>',
'/eval/<id>', '/static/<path>' routes. Use RESPOND-NOT-FOUND when the route
isn't found.
* src/cuirass/templates.scm: New file.
(html-page, specifications-table, evaluation-info-table,
build-eval-table): New exported procedures.
(pagination): New procedure.
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2018-07-21 15:39:10 +02:00
|
|
|
# Copyright © 2018 Tatiana Sholokhova <tanja201396@gmail.com>
|
2021-03-22 18:31:41 +01:00
|
|
|
# Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
|
2016-11-12 17:58:17 +01:00
|
|
|
#
|
|
|
|
# This file is part of Cuirass.
|
|
|
|
#
|
|
|
|
# Cuirass is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2017-01-09 00:41:13 +01:00
|
|
|
# the Free Software Foundation; either version 3, or (at your option)
|
2016-11-12 17:58:17 +01:00
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
# Cuirass is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
Add remote build support.
* src/cuirass/remote.scm: New file.
* src/cuirass/remote-server.scm: New file.
* src/cuirass/remote-worker.scm: New file.
* bin/remote-server.in: New file.
* bin/remote-worker.in: New file.
* Makefile.am (bin_SCRIPTS): Add new binaries,
(dist_pkgmodule_DATA): add new files,
(EXTRA_DIST): add new binaries,
(bin/remote-server, bin/remote-worker): new targets.
* .gitignore: Add new binaries.
* bin/cuirass.in (%options): Add "--build-remote" option,
(show-help): document it,
(main): honor it.
* src/cuirass/base.scm (with-build-offload-thread): New macro,
(%build-remote?, %build-offload-channel): new parameters,
(make-build-offload-thread): new procedure,
(build-derivations/offload): new procedure,
(restart-builds): use it to offload builds when %build-remote? is set,
(build-packages): ditto.
2020-12-02 11:13:33 +01:00
|
|
|
bin_SCRIPTS = \
|
2021-03-22 11:16:47 +01:00
|
|
|
bin/cuirass
|
Add remote build support.
* src/cuirass/remote.scm: New file.
* src/cuirass/remote-server.scm: New file.
* src/cuirass/remote-worker.scm: New file.
* bin/remote-server.in: New file.
* bin/remote-worker.in: New file.
* Makefile.am (bin_SCRIPTS): Add new binaries,
(dist_pkgmodule_DATA): add new files,
(EXTRA_DIST): add new binaries,
(bin/remote-server, bin/remote-worker): new targets.
* .gitignore: Add new binaries.
* bin/cuirass.in (%options): Add "--build-remote" option,
(show-help): document it,
(main): honor it.
* src/cuirass/base.scm (with-build-offload-thread): New macro,
(%build-remote?, %build-offload-channel): new parameters,
(make-build-offload-thread): new procedure,
(build-derivations/offload): new procedure,
(restart-builds): use it to offload builds when %build-remote? is set,
(build-packages): ditto.
2020-12-02 11:13:33 +01:00
|
|
|
|
2023-10-29 22:37:25 +01:00
|
|
|
noinst_SCRIPTS = pre-inst-env
|
|
|
|
dist_noinst_SCRIPTS = etc/new-client-cert.scm
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2017-05-10 16:32:26 +02:00
|
|
|
guilesitedir = $(datarootdir)/guile/site/@GUILE_EFFECTIVE_VERSION@
|
2017-05-10 16:42:05 +02:00
|
|
|
guileobjectdir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
|
|
|
|
|
2016-08-02 17:04:00 +02:00
|
|
|
dist_guilesite_DATA = src/cuirass.scm
|
2017-05-10 16:42:05 +02:00
|
|
|
nodist_guileobject_DATA = $(dist_guilesite_DATA:.scm=.go)
|
2016-08-02 17:04:00 +02:00
|
|
|
|
2017-01-08 18:06:02 +01:00
|
|
|
pkgmoduledir = $(guilesitedir)/$(PACKAGE)
|
2017-05-10 16:42:05 +02:00
|
|
|
pkgobjectdir = $(guileobjectdir)/$(PACKAGE)
|
2018-02-15 10:25:19 +01:00
|
|
|
webmoduledir = $(guilesitedir)/web/server
|
|
|
|
webobjectdir = $(guileobjectdir)/web/server
|
2022-01-09 18:48:45 +01:00
|
|
|
scriptsmoduledir = $(guilesitedir)/$(PACKAGE)/scripts
|
|
|
|
scriptsobjectdir = $(guileobjectdir)/$(PACKAGE)/scripts
|
Add support for multiple inputs.
* Makefile.am (dist_sql_DATA): Add src/sql/upgrade-1.sql.
* bin/cuirass.in (show-help, %options, main): Remove the LOAD-PATH option that
was used afterwards as %GUIX-PACKAGE-PATH.
* bin/evaluate.in (absolutize, input-checkout, spec-source, spec-load-path,
spec-package-path, format-checkouts): New procedures.
(%not-colon): Remove variable.
(main): Take the load path, package path and PROC from the checkouts that
result from the inputs. Format the checkouts before sending them to the
procedure. Remove the LOAD-PATH argument.
* doc/cuirass.texi (Overview, Database schema): Document the changes.
* examples/{guix-jobs.scm, hello-git.scm, hello-singleton.scm,
hello-subset.scm, random.scm}: Adapt to the new specification format.
* examples/guix-track-git.scm (package->spec): Rename to PACKAGE->INPUT.
(package->git-tracked): Replace FETCH-REPOSITORY with FETCH-INPUT and handle
the new format of its return value.
* examples/random-jobs.scm (make-random-jobs): Rename RANDOM to CHECKOUT.
Rename the checkout from 'random (which is a specification) to 'cuirass (which
is a checkout resulting from an input).
* src/cuirass/base.scm (fetch-repository): Rename to fetch-input. Rename SPEC
to INPUT. Return a checkout object instead of returning two values.
(evaluate): Take a list of CHECKOUTS and COMMITS as arguments, instead of
SOURCE. Remove TOKENIZE and LOAD-PATH. Pass the CHECKOUTS instead of the
SOURCE to "evaluate". Remove %GUIX-PACKAGE-PATH. Build the EVAL object
instead of getting it from "evaluate".
(compile?, fetch-inputs, compile-checkouts): New procedures.
(process-specs): Fetch all inputs instead of only fetching one repository.
The result of that fetching operation is a list of CHECKOUTS whose COMMITS are
used as a STAMP.
(%guix-package-path, set-guix-package-path): Remove them.
* src/cuirass/database.scm (db-add-input, db-get-inputs): New procedures.
(db-add-specification, db-get-specifications): Adapt to the new specification
format. Add/get all inputs as well.
(db-add-evaluation): Rename REVISION to COMMITS. Store COMMITS as space
separated commit hashes.
(db-get-builds): Rename REPO_NAME to NAME.
(db-get-stamp): Rename COMMIT to STAMP. Return #f when there is no STAMP.
(db-add-stamp): Rename COMMIT to STAMP. Deal with DB-GET-STAMP's new return
value.
(db-get-evaluations): Rename REVISION to COMMITS. Tokenize COMMITS.
* src/cuirass/utils.scm (%non-blocking): Export it.
* src/schema.sql (Inputs): New table that refers to the Specifications table.
(Specifications): Move input related fields to the Inputs table. Rename
REPO_NAME to NAME. Rename ARGUMENTS to PROC_ARGS. Rename FILE to PROC_FILE.
Add LOAD_PATH_INPUTS, PACKAGE_PATH_INPUTS and PROC_INPUT fields that refer to
the Inputs table.
(Stamps): Rename REPO_NAME to NAME.
(Evaluations): Rename REPO_NAME to NAME. Rename REVISION to COMMITS.
(Specifications_index): Replace with Inputs_index.
* src/sql/upgrade-1.sql: New file.
* tests/database.scm (example-spec, make-dummy-eval, sqlite-exec): Adapt to
the new specifications format. Rename REVISION to COMMITS.
* tests/http.scm (evaluations-query-result, fill-db): Idem.
2018-06-26 11:18:23 +02:00
|
|
|
sqldir = $(pkgdatadir)/sql
|
Add a web interface.
* Makefile.am (dist_sql_DATA): Add static files.
* src/cuirass/database.scm (assqx-ref): Export it.
(db-get-builds): Add 'evaluation' filter and filters for pagination.
(db-get-evaluations-build-summary, db-get-evaluations-id-min,
db-get-evaluations-id-max, db-get-builds-min, db-get-builds-max): New exported
procedures.
* src/cuirass/http.scm (%static-directory): New parameter.
(%page-size, %file-mime-types, %file-white-list): New variables.
(handle-build-request, handle-builds-request): Move the WITH-CRITICAL-SECTION
call out.
(url-handler): Add RESPOND-HTML, RESPOND-STATIC-FILE and RESPOND-NOT-FOUND
procedures. Call WITH-CRITICAL-SECTION sooner for the '/build',
'/api/latestbuilds' and '/api/queue' routes. Add '/', '/jobset/<name>',
'/eval/<id>', '/static/<path>' routes. Use RESPOND-NOT-FOUND when the route
isn't found.
* src/cuirass/templates.scm: New file.
(html-page, specifications-table, evaluation-info-table,
build-eval-table): New exported procedures.
(pagination): New procedure.
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2018-07-21 15:39:10 +02:00
|
|
|
staticdir = $(pkgdatadir)/static
|
|
|
|
cssdir = $(staticdir)/css
|
|
|
|
fontsdir = $(staticdir)/fonts
|
|
|
|
imagesdir = $(staticdir)/images
|
2020-09-14 14:25:23 +02:00
|
|
|
jsdir = $(staticdir)/js
|
2021-09-16 04:38:44 +02:00
|
|
|
systemdservicedir = $(libdir)/systemd/system
|
2017-05-10 16:42:05 +02:00
|
|
|
|
2018-01-22 13:19:55 +01:00
|
|
|
dist_pkgmodule_DATA = \
|
2023-09-13 16:15:14 +02:00
|
|
|
src/cuirass/store.scm \
|
2018-01-22 13:19:55 +01:00
|
|
|
src/cuirass/base.scm \
|
|
|
|
src/cuirass/database.scm \
|
|
|
|
src/cuirass/http.scm \
|
|
|
|
src/cuirass/logging.scm \
|
2021-02-21 09:35:04 +01:00
|
|
|
src/cuirass/mail.scm \
|
2021-02-21 10:37:11 +01:00
|
|
|
src/cuirass/mastodon.scm \
|
2020-09-14 14:25:23 +02:00
|
|
|
src/cuirass/metrics.scm \
|
2021-02-21 09:35:04 +01:00
|
|
|
src/cuirass/notification.scm \
|
2021-02-22 09:05:27 +01:00
|
|
|
src/cuirass/parameters.scm \
|
Add remote build support.
* src/cuirass/remote.scm: New file.
* src/cuirass/remote-server.scm: New file.
* src/cuirass/remote-worker.scm: New file.
* bin/remote-server.in: New file.
* bin/remote-worker.in: New file.
* Makefile.am (bin_SCRIPTS): Add new binaries,
(dist_pkgmodule_DATA): add new files,
(EXTRA_DIST): add new binaries,
(bin/remote-server, bin/remote-worker): new targets.
* .gitignore: Add new binaries.
* bin/cuirass.in (%options): Add "--build-remote" option,
(show-help): document it,
(main): honor it.
* src/cuirass/base.scm (with-build-offload-thread): New macro,
(%build-remote?, %build-offload-channel): new parameters,
(make-build-offload-thread): new procedure,
(build-derivations/offload): new procedure,
(restart-builds): use it to offload builds when %build-remote? is set,
(build-packages): ditto.
2020-12-02 11:13:33 +01:00
|
|
|
src/cuirass/remote.scm \
|
2021-02-02 11:58:29 +01:00
|
|
|
src/cuirass/rss.scm \
|
2021-03-03 15:25:04 +01:00
|
|
|
src/cuirass/specification.scm \
|
2018-01-22 13:19:55 +01:00
|
|
|
src/cuirass/ui.scm \
|
2020-09-21 18:41:44 +02:00
|
|
|
src/cuirass/utils.scm \
|
|
|
|
src/cuirass/templates.scm \
|
2022-01-09 18:48:45 +01:00
|
|
|
src/cuirass/zabbix.scm
|
|
|
|
|
|
|
|
dist_scriptsmodule_DATA = \
|
2021-03-23 11:57:58 +01:00
|
|
|
src/cuirass/scripts/evaluate.scm \
|
|
|
|
src/cuirass/scripts/register.scm \
|
|
|
|
src/cuirass/scripts/remote-server.scm \
|
|
|
|
src/cuirass/scripts/remote-worker.scm \
|
|
|
|
src/cuirass/scripts/web.scm
|
|
|
|
|
2017-05-10 16:58:50 +02:00
|
|
|
nodist_pkgmodule_DATA = \
|
|
|
|
src/cuirass/config.scm
|
|
|
|
|
2017-05-10 16:42:05 +02:00
|
|
|
nodist_pkgobject_DATA = \
|
2016-12-27 12:00:11 +01:00
|
|
|
$(dist_pkgmodule_DATA:.scm=.go) \
|
2016-06-10 18:17:53 +02:00
|
|
|
src/cuirass/config.go
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2018-02-15 10:25:19 +01:00
|
|
|
dist_webmodule_DATA = \
|
|
|
|
src/web/server/fiberized.scm
|
|
|
|
|
2022-01-19 09:21:02 +01:00
|
|
|
nodist_scriptsobject_DATA = \
|
2022-01-09 18:48:45 +01:00
|
|
|
$(dist_scriptsmodule_DATA:.scm=.go)
|
|
|
|
|
2018-02-15 10:25:19 +01:00
|
|
|
nodist_webobject_DATA = \
|
|
|
|
$(dist_webmodule_DATA:.scm=.go)
|
|
|
|
|
2016-07-16 18:16:39 +02:00
|
|
|
dist_pkgdata_DATA = src/schema.sql
|
|
|
|
|
Add support for multiple inputs.
* Makefile.am (dist_sql_DATA): Add src/sql/upgrade-1.sql.
* bin/cuirass.in (show-help, %options, main): Remove the LOAD-PATH option that
was used afterwards as %GUIX-PACKAGE-PATH.
* bin/evaluate.in (absolutize, input-checkout, spec-source, spec-load-path,
spec-package-path, format-checkouts): New procedures.
(%not-colon): Remove variable.
(main): Take the load path, package path and PROC from the checkouts that
result from the inputs. Format the checkouts before sending them to the
procedure. Remove the LOAD-PATH argument.
* doc/cuirass.texi (Overview, Database schema): Document the changes.
* examples/{guix-jobs.scm, hello-git.scm, hello-singleton.scm,
hello-subset.scm, random.scm}: Adapt to the new specification format.
* examples/guix-track-git.scm (package->spec): Rename to PACKAGE->INPUT.
(package->git-tracked): Replace FETCH-REPOSITORY with FETCH-INPUT and handle
the new format of its return value.
* examples/random-jobs.scm (make-random-jobs): Rename RANDOM to CHECKOUT.
Rename the checkout from 'random (which is a specification) to 'cuirass (which
is a checkout resulting from an input).
* src/cuirass/base.scm (fetch-repository): Rename to fetch-input. Rename SPEC
to INPUT. Return a checkout object instead of returning two values.
(evaluate): Take a list of CHECKOUTS and COMMITS as arguments, instead of
SOURCE. Remove TOKENIZE and LOAD-PATH. Pass the CHECKOUTS instead of the
SOURCE to "evaluate". Remove %GUIX-PACKAGE-PATH. Build the EVAL object
instead of getting it from "evaluate".
(compile?, fetch-inputs, compile-checkouts): New procedures.
(process-specs): Fetch all inputs instead of only fetching one repository.
The result of that fetching operation is a list of CHECKOUTS whose COMMITS are
used as a STAMP.
(%guix-package-path, set-guix-package-path): Remove them.
* src/cuirass/database.scm (db-add-input, db-get-inputs): New procedures.
(db-add-specification, db-get-specifications): Adapt to the new specification
format. Add/get all inputs as well.
(db-add-evaluation): Rename REVISION to COMMITS. Store COMMITS as space
separated commit hashes.
(db-get-builds): Rename REPO_NAME to NAME.
(db-get-stamp): Rename COMMIT to STAMP. Return #f when there is no STAMP.
(db-add-stamp): Rename COMMIT to STAMP. Deal with DB-GET-STAMP's new return
value.
(db-get-evaluations): Rename REVISION to COMMITS. Tokenize COMMITS.
* src/cuirass/utils.scm (%non-blocking): Export it.
* src/schema.sql (Inputs): New table that refers to the Specifications table.
(Specifications): Move input related fields to the Inputs table. Rename
REPO_NAME to NAME. Rename ARGUMENTS to PROC_ARGS. Rename FILE to PROC_FILE.
Add LOAD_PATH_INPUTS, PACKAGE_PATH_INPUTS and PROC_INPUT fields that refer to
the Inputs table.
(Stamps): Rename REPO_NAME to NAME.
(Evaluations): Rename REPO_NAME to NAME. Rename REVISION to COMMITS.
(Specifications_index): Replace with Inputs_index.
* src/sql/upgrade-1.sql: New file.
* tests/database.scm (example-spec, make-dummy-eval, sqlite-exec): Adapt to
the new specifications format. Rename REVISION to COMMITS.
* tests/http.scm (evaluations-query-result, fill-db): Idem.
2018-06-26 11:18:23 +02:00
|
|
|
dist_sql_DATA = \
|
2021-04-06 15:15:18 +02:00
|
|
|
src/sql/upgrade-1.sql \
|
2021-04-08 10:49:41 +02:00
|
|
|
src/sql/upgrade-2.sql \
|
2021-04-08 15:37:43 +02:00
|
|
|
src/sql/upgrade-3.sql \
|
2021-04-09 10:15:30 +02:00
|
|
|
src/sql/upgrade-4.sql \
|
2021-04-09 11:32:53 +02:00
|
|
|
src/sql/upgrade-5.sql \
|
2021-04-14 15:05:00 +02:00
|
|
|
src/sql/upgrade-6.sql \
|
2021-04-21 09:51:14 +02:00
|
|
|
src/sql/upgrade-7.sql \
|
|
|
|
src/sql/upgrade-8.sql \
|
2021-04-28 21:18:18 +02:00
|
|
|
src/sql/upgrade-9.sql \
|
2021-05-01 17:30:19 +02:00
|
|
|
src/sql/upgrade-10.sql \
|
2021-05-29 15:34:15 +02:00
|
|
|
src/sql/upgrade-11.sql \
|
2021-10-04 12:47:39 +02:00
|
|
|
src/sql/upgrade-12.sql \
|
2021-11-26 14:55:10 +01:00
|
|
|
src/sql/upgrade-13.sql \
|
2021-11-29 11:10:00 +01:00
|
|
|
src/sql/upgrade-14.sql \
|
|
|
|
src/sql/upgrade-15.sql
|
Add support for multiple inputs.
* Makefile.am (dist_sql_DATA): Add src/sql/upgrade-1.sql.
* bin/cuirass.in (show-help, %options, main): Remove the LOAD-PATH option that
was used afterwards as %GUIX-PACKAGE-PATH.
* bin/evaluate.in (absolutize, input-checkout, spec-source, spec-load-path,
spec-package-path, format-checkouts): New procedures.
(%not-colon): Remove variable.
(main): Take the load path, package path and PROC from the checkouts that
result from the inputs. Format the checkouts before sending them to the
procedure. Remove the LOAD-PATH argument.
* doc/cuirass.texi (Overview, Database schema): Document the changes.
* examples/{guix-jobs.scm, hello-git.scm, hello-singleton.scm,
hello-subset.scm, random.scm}: Adapt to the new specification format.
* examples/guix-track-git.scm (package->spec): Rename to PACKAGE->INPUT.
(package->git-tracked): Replace FETCH-REPOSITORY with FETCH-INPUT and handle
the new format of its return value.
* examples/random-jobs.scm (make-random-jobs): Rename RANDOM to CHECKOUT.
Rename the checkout from 'random (which is a specification) to 'cuirass (which
is a checkout resulting from an input).
* src/cuirass/base.scm (fetch-repository): Rename to fetch-input. Rename SPEC
to INPUT. Return a checkout object instead of returning two values.
(evaluate): Take a list of CHECKOUTS and COMMITS as arguments, instead of
SOURCE. Remove TOKENIZE and LOAD-PATH. Pass the CHECKOUTS instead of the
SOURCE to "evaluate". Remove %GUIX-PACKAGE-PATH. Build the EVAL object
instead of getting it from "evaluate".
(compile?, fetch-inputs, compile-checkouts): New procedures.
(process-specs): Fetch all inputs instead of only fetching one repository.
The result of that fetching operation is a list of CHECKOUTS whose COMMITS are
used as a STAMP.
(%guix-package-path, set-guix-package-path): Remove them.
* src/cuirass/database.scm (db-add-input, db-get-inputs): New procedures.
(db-add-specification, db-get-specifications): Adapt to the new specification
format. Add/get all inputs as well.
(db-add-evaluation): Rename REVISION to COMMITS. Store COMMITS as space
separated commit hashes.
(db-get-builds): Rename REPO_NAME to NAME.
(db-get-stamp): Rename COMMIT to STAMP. Return #f when there is no STAMP.
(db-add-stamp): Rename COMMIT to STAMP. Deal with DB-GET-STAMP's new return
value.
(db-get-evaluations): Rename REVISION to COMMITS. Tokenize COMMITS.
* src/cuirass/utils.scm (%non-blocking): Export it.
* src/schema.sql (Inputs): New table that refers to the Specifications table.
(Specifications): Move input related fields to the Inputs table. Rename
REPO_NAME to NAME. Rename ARGUMENTS to PROC_ARGS. Rename FILE to PROC_FILE.
Add LOAD_PATH_INPUTS, PACKAGE_PATH_INPUTS and PROC_INPUT fields that refer to
the Inputs table.
(Stamps): Rename REPO_NAME to NAME.
(Evaluations): Rename REPO_NAME to NAME. Rename REVISION to COMMITS.
(Specifications_index): Replace with Inputs_index.
* src/sql/upgrade-1.sql: New file.
* tests/database.scm (example-spec, make-dummy-eval, sqlite-exec): Adapt to
the new specifications format. Rename REVISION to COMMITS.
* tests/http.scm (evaluations-query-result, fill-db): Idem.
2018-06-26 11:18:23 +02:00
|
|
|
|
Add a web interface.
* Makefile.am (dist_sql_DATA): Add static files.
* src/cuirass/database.scm (assqx-ref): Export it.
(db-get-builds): Add 'evaluation' filter and filters for pagination.
(db-get-evaluations-build-summary, db-get-evaluations-id-min,
db-get-evaluations-id-max, db-get-builds-min, db-get-builds-max): New exported
procedures.
* src/cuirass/http.scm (%static-directory): New parameter.
(%page-size, %file-mime-types, %file-white-list): New variables.
(handle-build-request, handle-builds-request): Move the WITH-CRITICAL-SECTION
call out.
(url-handler): Add RESPOND-HTML, RESPOND-STATIC-FILE and RESPOND-NOT-FOUND
procedures. Call WITH-CRITICAL-SECTION sooner for the '/build',
'/api/latestbuilds' and '/api/queue' routes. Add '/', '/jobset/<name>',
'/eval/<id>', '/static/<path>' routes. Use RESPOND-NOT-FOUND when the route
isn't found.
* src/cuirass/templates.scm: New file.
(html-page, specifications-table, evaluation-info-table,
build-eval-table): New exported procedures.
(pagination): New procedure.
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2018-07-21 15:39:10 +02:00
|
|
|
dist_css_DATA = \
|
2021-03-21 12:21:58 +01:00
|
|
|
src/static/css/choices.min.css \
|
2020-04-15 19:52:31 +02:00
|
|
|
src/static/css/cuirass.css \
|
2021-04-23 15:06:42 +02:00
|
|
|
src/static/css/bootstrap.min.css \
|
2021-03-25 10:31:38 +01:00
|
|
|
src/static/css/datatables.min.css \
|
Add a web interface.
* Makefile.am (dist_sql_DATA): Add static files.
* src/cuirass/database.scm (assqx-ref): Export it.
(db-get-builds): Add 'evaluation' filter and filters for pagination.
(db-get-evaluations-build-summary, db-get-evaluations-id-min,
db-get-evaluations-id-max, db-get-builds-min, db-get-builds-max): New exported
procedures.
* src/cuirass/http.scm (%static-directory): New parameter.
(%page-size, %file-mime-types, %file-white-list): New variables.
(handle-build-request, handle-builds-request): Move the WITH-CRITICAL-SECTION
call out.
(url-handler): Add RESPOND-HTML, RESPOND-STATIC-FILE and RESPOND-NOT-FOUND
procedures. Call WITH-CRITICAL-SECTION sooner for the '/build',
'/api/latestbuilds' and '/api/queue' routes. Add '/', '/jobset/<name>',
'/eval/<id>', '/static/<path>' routes. Use RESPOND-NOT-FOUND when the route
isn't found.
* src/cuirass/templates.scm: New file.
(html-page, specifications-table, evaluation-info-table,
build-eval-table): New exported procedures.
(pagination): New procedure.
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2018-07-21 15:39:10 +02:00
|
|
|
src/static/css/open-iconic-bootstrap.css
|
|
|
|
dist_fonts_DATA = \
|
|
|
|
src/static/fonts/open-iconic.eot \
|
|
|
|
src/static/fonts/open-iconic.otf \
|
|
|
|
src/static/fonts/open-iconic.svg \
|
|
|
|
src/static/fonts/open-iconic.ttf \
|
|
|
|
src/static/fonts/open-iconic.woff
|
|
|
|
dist_images_DATA = \
|
2021-05-28 11:21:58 +02:00
|
|
|
src/static/images/badge-error.svg \
|
2021-05-30 11:09:02 +02:00
|
|
|
src/static/images/badge-spec-percentage.svg \
|
|
|
|
src/static/images/badge-percentage.svg \
|
2021-02-21 09:14:23 +01:00
|
|
|
src/static/images/guix.png \
|
|
|
|
src/static/images/icon.png
|
2020-09-14 14:25:23 +02:00
|
|
|
dist_js_DATA = \
|
2021-04-23 15:06:42 +02:00
|
|
|
src/static/js/bootstrap.min.js \
|
2023-10-25 00:02:23 +02:00
|
|
|
src/static/js/build-log.js \
|
2021-04-23 15:06:42 +02:00
|
|
|
src/static/js/cuirass.js \
|
2021-03-11 19:31:35 +01:00
|
|
|
src/static/js/chart.js \
|
2021-03-21 12:21:58 +01:00
|
|
|
src/static/js/choices.min.js \
|
2021-04-06 15:27:58 +02:00
|
|
|
src/static/js/d3.v6.min.js \
|
2021-03-25 10:31:38 +01:00
|
|
|
src/static/js/datatables.min.js \
|
2021-04-23 15:06:42 +02:00
|
|
|
src/static/js/jquery-3.3.1.min.js \
|
|
|
|
src/static/js/popper.min.js
|
Add a web interface.
* Makefile.am (dist_sql_DATA): Add static files.
* src/cuirass/database.scm (assqx-ref): Export it.
(db-get-builds): Add 'evaluation' filter and filters for pagination.
(db-get-evaluations-build-summary, db-get-evaluations-id-min,
db-get-evaluations-id-max, db-get-builds-min, db-get-builds-max): New exported
procedures.
* src/cuirass/http.scm (%static-directory): New parameter.
(%page-size, %file-mime-types, %file-white-list): New variables.
(handle-build-request, handle-builds-request): Move the WITH-CRITICAL-SECTION
call out.
(url-handler): Add RESPOND-HTML, RESPOND-STATIC-FILE and RESPOND-NOT-FOUND
procedures. Call WITH-CRITICAL-SECTION sooner for the '/build',
'/api/latestbuilds' and '/api/queue' routes. Add '/', '/jobset/<name>',
'/eval/<id>', '/static/<path>' routes. Use RESPOND-NOT-FOUND when the route
isn't found.
* src/cuirass/templates.scm: New file.
(html-page, specifications-table, evaluation-info-table,
build-eval-table): New exported procedures.
(pagination): New procedure.
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2018-07-21 15:39:10 +02:00
|
|
|
|
2021-09-16 04:38:44 +02:00
|
|
|
dist_systemdservice_DATA = \
|
|
|
|
etc/cuirass-remote-worker.service
|
|
|
|
|
2016-07-03 16:50:27 +02:00
|
|
|
TEST_EXTENSIONS = .scm .sh
|
|
|
|
AM_TESTS_ENVIRONMENT = \
|
|
|
|
env GUILE_AUTO_COMPILE='0' \
|
|
|
|
testsrcdir='$(abs_top_srcdir)/tests' \
|
2016-12-24 01:08:04 +01:00
|
|
|
testbuilddir='$(abs_top_builddir)/tests'
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2018-01-07 10:45:06 +01:00
|
|
|
SCM_LOG_DRIVER = \
|
|
|
|
$(top_builddir)/pre-inst-env $(GUILE) \
|
|
|
|
-L "$(abs_top_srcdir)" -e main \
|
|
|
|
$(top_srcdir)/build-aux/test-driver.scm
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2016-07-03 16:50:27 +02:00
|
|
|
SH_LOG_COMPILER = $(top_builddir)/pre-inst-env $(SHELL)
|
|
|
|
AM_SH_LOG_FLAGS = -x -e
|
|
|
|
|
2016-06-26 15:13:31 +02:00
|
|
|
TESTS = \
|
|
|
|
tests/base.scm \
|
2016-07-12 11:42:20 +02:00
|
|
|
## tests/basic.sh # takes too long to execute
|
2016-07-02 03:35:19 +02:00
|
|
|
tests/database.scm \
|
2016-07-30 23:00:41 +02:00
|
|
|
tests/http.scm \
|
2020-09-15 17:40:05 +02:00
|
|
|
tests/metrics.scm \
|
2023-11-16 17:40:40 +01:00
|
|
|
tests/remote.scm \
|
|
|
|
tests/utils.scm
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2023-08-15 16:19:14 +02:00
|
|
|
# Compiler warning flags.
|
|
|
|
GUILE_WARNINGS = \
|
|
|
|
-Wformat -Wunbound-variable -Warity-mismatch \
|
|
|
|
-Wshadowed-toplevel -Wmacro-use-before-definition \
|
|
|
|
-Wbad-case-datum -Wduplicate-case-datum # -Wunused-variable
|
|
|
|
|
2016-05-11 19:59:47 +02:00
|
|
|
# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
|
2016-07-27 11:44:45 +02:00
|
|
|
# $GUILE_LOAD_COMPILED_PATH contains $(pkgmoduledir), we may find .go files in
|
|
|
|
# there that are newer than the local .scm files (for instance because the
|
|
|
|
# user ran 'make install' recently). When that happens, we end up loading
|
|
|
|
# those previously-installed .go files, which may be stale, thereby breaking
|
|
|
|
# the whole thing. Set GUILE_AUTO_COMPILE to 0 to avoid auto-compiling guild.
|
2016-05-11 19:59:47 +02:00
|
|
|
#
|
|
|
|
# XXX: Use the C locale for when Guile lacks
|
|
|
|
# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
|
|
|
|
.scm.go:
|
|
|
|
$(guilec_verbose)$(MKDIR_P) `dirname "$@"`; \
|
|
|
|
export GUILE_AUTO_COMPILE=0 ; unset GUILE_LOAD_COMPILED_PATH; \
|
|
|
|
LC_ALL=C \
|
2023-08-15 16:19:14 +02:00
|
|
|
$(top_builddir)/pre-inst-env $(GUILD) compile \
|
|
|
|
-L "$(top_builddir)/src" -L "$(top_srcdir)/src" \
|
|
|
|
$(GUILE_WARNINGS) \
|
2016-05-11 19:59:47 +02:00
|
|
|
--target="$(host)" --output="$@" "$<" $(devnull_verbose)
|
|
|
|
|
2018-02-15 10:25:19 +01:00
|
|
|
CLEANFILES = \
|
|
|
|
$(nodist_guilesite_DATA) \
|
|
|
|
$(dist_pkgmodule_DATA:.scm=.go) \
|
2023-05-31 00:16:08 +02:00
|
|
|
$(nodist_scriptsobject_DATA) \
|
2018-02-15 10:25:19 +01:00
|
|
|
$(nodist_webobject_DATA) \
|
2018-02-15 10:27:12 +01:00
|
|
|
$(nodist_guileobject_DATA) \
|
2016-12-25 12:43:45 +01:00
|
|
|
src/cuirass/config.go
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2016-12-25 12:43:45 +01:00
|
|
|
## -------------- ##
|
|
|
|
## Distribution. ##
|
|
|
|
## -------------- ##
|
|
|
|
|
2023-05-09 15:13:39 +02:00
|
|
|
EXTRA_DIST = \
|
|
|
|
.dir-locals.el \
|
|
|
|
bin/cuirass.in \
|
|
|
|
bootstrap \
|
|
|
|
guix.scm \
|
|
|
|
build-aux/guix/cuirass-package.scm \
|
|
|
|
src/cuirass/config.scm.in \
|
|
|
|
etc/cuirass-remote-worker.service.in \
|
2023-06-02 09:49:41 +02:00
|
|
|
examples/hello.scm \
|
|
|
|
examples/cuirass.scm \
|
2023-07-14 15:07:32 +02:00
|
|
|
examples/random.scm \
|
|
|
|
examples/random-manifest.scm \
|
2023-10-29 22:58:14 +01:00
|
|
|
$(TESTS) \
|
|
|
|
tests/common.scm \
|
|
|
|
tests/mail.sh
|
2016-05-11 19:59:47 +02:00
|
|
|
|
2023-05-09 15:17:23 +02:00
|
|
|
dist-hook:
|
2016-12-25 12:43:45 +01:00
|
|
|
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
|
|
|
|
|
2016-11-12 16:23:00 +01:00
|
|
|
## ----------------- ##
|
|
|
|
## Generated files. ##
|
|
|
|
## ----------------- ##
|
|
|
|
|
|
|
|
# 'AC_CONFIG_FILES' doesn't fully expand variables that depend on ${prefix}.
|
|
|
|
# To use such variables in source files and scripts while following GNU Coding
|
|
|
|
# Standards, let 'make' manage their replacement.
|
|
|
|
|
|
|
|
# Use config.status to substitute the remainder where a single expansion is
|
|
|
|
# sufficient. We use a funny notation here to avoid configure substitutions
|
|
|
|
# in our text.
|
2023-09-01 23:17:48 +02:00
|
|
|
do_subst = ( $(SED) \
|
|
|
|
-e "s,@configure_input[@],Generated from $$in. Do not edit by hand.,g" \
|
|
|
|
-e 's,@datadir[@],$(datadir),g' \
|
|
|
|
-e 's,@GUILE[@],$(GUILE),g' \
|
|
|
|
-e 's,@localstatedir[@],$(localstatedir),g' \
|
|
|
|
-e 's,@runstatedir[@],$(runstatedir),g' \
|
|
|
|
-e 's,@PACKAGE_LOAD_COMPILED_PATH[@],$(guileobjectdir),g' \
|
|
|
|
-e 's,@PACKAGE_LOAD_PATH[@],$(guilesitedir),g' \
|
2016-11-12 16:23:00 +01:00
|
|
|
| $(SHELL) ./config.status --file=- )
|
|
|
|
|
|
|
|
# Generic instructions to perform the substitution. Generated files shouldn't
|
|
|
|
# contain unexpanded '@substitutions@', and should be made read-only, to
|
2016-12-27 12:04:43 +01:00
|
|
|
# prevent them from being edited by mistake instead of the file they are
|
2016-11-12 16:23:00 +01:00
|
|
|
# generated from.
|
|
|
|
generate_file = \
|
|
|
|
$(AM_V_GEN)rm -f $@ $@-t; \
|
|
|
|
$(MKDIR_P) $(@D); \
|
|
|
|
in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t; \
|
|
|
|
if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
|
|
|
|
echo "$@ contains unexpanded substitution (see lines above)"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
|
|
|
chmod a-w $@-t; mv -f $@-t $@
|
|
|
|
|
2016-11-12 17:36:18 +01:00
|
|
|
# These files depend on Makefile so they are rebuilt if $(VERSION),
|
2016-11-12 16:23:00 +01:00
|
|
|
# $(datadir) or other do_subst'ituted variables change.
|
2016-11-12 17:36:18 +01:00
|
|
|
bin/cuirass: $(srcdir)/bin/cuirass.in
|
|
|
|
$(bin_SCRIPTS): Makefile
|
|
|
|
$(generate_file); chmod +x $@
|
2016-11-12 16:23:00 +01:00
|
|
|
src/cuirass/config.scm: $(srcdir)/src/cuirass/config.scm.in Makefile
|
|
|
|
$(generate_file)
|
2021-09-16 04:38:44 +02:00
|
|
|
etc/cuirass-remote-worker.service: $(srcdir)/etc/cuirass-remote-worker.service.in \
|
|
|
|
Makefile
|
|
|
|
$(generate_file)
|
2016-11-12 16:23:00 +01:00
|
|
|
|
2016-11-13 00:46:53 +01:00
|
|
|
# Guile modules require 'src/cuirass/config.scm' to exist before their
|
|
|
|
# compilation.
|
2017-01-10 08:59:57 +01:00
|
|
|
BUILT_SOURCES = src/cuirass/config.scm
|
2016-12-25 12:43:45 +01:00
|
|
|
|
2023-10-29 23:02:25 +01:00
|
|
|
MOSTLYCLEANFILES = \
|
|
|
|
$(bin_SCRIPTS) \
|
|
|
|
src/cuirass/config.scm \
|
|
|
|
etc/cuirass-remote-worker.service
|
2016-11-12 16:23:00 +01:00
|
|
|
|
2016-12-02 15:57:06 +01:00
|
|
|
## --------------- ##
|
|
|
|
## Documentation. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
info_TEXINFOS = doc/cuirass.texi
|
|
|
|
doc_cuirass_TEXINFOS = doc/fdl-1.3.texi
|
|
|
|
|
2016-11-12 17:36:18 +01:00
|
|
|
## -------------- ##
|
|
|
|
## Installation. ##
|
|
|
|
## -------------- ##
|
|
|
|
|
2016-12-24 01:08:04 +01:00
|
|
|
# Ensure that the scripts will find their module directories.
|
2016-11-12 17:36:18 +01:00
|
|
|
install-exec-hook:
|
2021-01-18 16:16:26 +01:00
|
|
|
@find $(DESTDIR)$(bindir) -type f -exec \
|
|
|
|
$(SED) -i -e 's,^#GUILE_LOAD,GUILE_LOAD,g' {} ';'
|
2016-11-12 17:36:18 +01:00
|
|
|
|
2016-05-11 19:59:47 +02:00
|
|
|
## -------------- ##
|
|
|
|
## Silent rules. ##
|
|
|
|
## -------------- ##
|
|
|
|
|
|
|
|
guilec_verbose = $(guilec_verbose_@AM_V@)
|
|
|
|
guilec_verbose_ = $(guilec_verbose_@AM_DEFAULT_V@)
|
|
|
|
guilec_verbose_0 = @echo " GUILEC " $@;
|
|
|
|
|
|
|
|
devnull_verbose = $(devnull_verbose_@AM_V@)
|
|
|
|
devnull_verbose_ = $(devnull_verbose_@AM_DEFAULT_V@)
|
|
|
|
devnull_verbose_0 = >/dev/null
|