jolt 0.9.123__py3-none-any.whl → 0.9.435__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jolt/__init__.py +80 -7
- jolt/__main__.py +9 -1
- jolt/bin/fstree-darwin-x86_64 +0 -0
- jolt/bin/fstree-linux-x86_64 +0 -0
- jolt/cache.py +832 -362
- jolt/chroot.py +156 -0
- jolt/cli.py +281 -162
- jolt/common_pb2.py +63 -0
- jolt/common_pb2_grpc.py +4 -0
- jolt/config.py +98 -41
- jolt/error.py +19 -4
- jolt/filesystem.py +2 -6
- jolt/graph.py +705 -117
- jolt/hooks.py +43 -0
- jolt/influence.py +122 -3
- jolt/loader.py +369 -121
- jolt/log.py +225 -63
- jolt/manifest.py +28 -38
- jolt/options.py +35 -10
- jolt/pkgs/abseil.py +42 -0
- jolt/pkgs/asio.py +25 -0
- jolt/pkgs/autoconf.py +41 -0
- jolt/pkgs/automake.py +41 -0
- jolt/pkgs/b2.py +31 -0
- jolt/pkgs/boost.py +111 -0
- jolt/pkgs/boringssl.py +32 -0
- jolt/pkgs/busybox.py +39 -0
- jolt/pkgs/bzip2.py +43 -0
- jolt/pkgs/cares.py +29 -0
- jolt/pkgs/catch2.py +36 -0
- jolt/pkgs/cbindgen.py +17 -0
- jolt/pkgs/cista.py +19 -0
- jolt/pkgs/clang.py +44 -0
- jolt/pkgs/cli11.py +24 -0
- jolt/pkgs/cmake.py +48 -0
- jolt/pkgs/cpython.py +196 -0
- jolt/pkgs/crun.py +29 -0
- jolt/pkgs/curl.py +38 -0
- jolt/pkgs/dbus.py +18 -0
- jolt/pkgs/double_conversion.py +24 -0
- jolt/pkgs/fastfloat.py +21 -0
- jolt/pkgs/ffmpeg.py +28 -0
- jolt/pkgs/flatbuffers.py +29 -0
- jolt/pkgs/fmt.py +27 -0
- jolt/pkgs/fstree.py +20 -0
- jolt/pkgs/gflags.py +18 -0
- jolt/pkgs/glib.py +18 -0
- jolt/pkgs/glog.py +25 -0
- jolt/pkgs/glslang.py +21 -0
- jolt/pkgs/golang.py +16 -11
- jolt/pkgs/googlebenchmark.py +18 -0
- jolt/pkgs/googletest.py +46 -0
- jolt/pkgs/gperf.py +15 -0
- jolt/pkgs/grpc.py +73 -0
- jolt/pkgs/hdf5.py +19 -0
- jolt/pkgs/help2man.py +14 -0
- jolt/pkgs/inja.py +28 -0
- jolt/pkgs/jsoncpp.py +31 -0
- jolt/pkgs/libarchive.py +43 -0
- jolt/pkgs/libcap.py +44 -0
- jolt/pkgs/libdrm.py +44 -0
- jolt/pkgs/libedit.py +42 -0
- jolt/pkgs/libevent.py +31 -0
- jolt/pkgs/libexpat.py +27 -0
- jolt/pkgs/libfastjson.py +21 -0
- jolt/pkgs/libffi.py +16 -0
- jolt/pkgs/libglvnd.py +30 -0
- jolt/pkgs/libogg.py +28 -0
- jolt/pkgs/libpciaccess.py +18 -0
- jolt/pkgs/libseccomp.py +21 -0
- jolt/pkgs/libtirpc.py +24 -0
- jolt/pkgs/libtool.py +42 -0
- jolt/pkgs/libunwind.py +35 -0
- jolt/pkgs/libva.py +18 -0
- jolt/pkgs/libvorbis.py +33 -0
- jolt/pkgs/libxml2.py +35 -0
- jolt/pkgs/libxslt.py +17 -0
- jolt/pkgs/libyajl.py +16 -0
- jolt/pkgs/llvm.py +81 -0
- jolt/pkgs/lua.py +54 -0
- jolt/pkgs/lz4.py +26 -0
- jolt/pkgs/m4.py +14 -0
- jolt/pkgs/make.py +17 -0
- jolt/pkgs/mesa.py +81 -0
- jolt/pkgs/meson.py +17 -0
- jolt/pkgs/mstch.py +28 -0
- jolt/pkgs/mysql.py +60 -0
- jolt/pkgs/nasm.py +49 -0
- jolt/pkgs/ncurses.py +30 -0
- jolt/pkgs/ng_log.py +25 -0
- jolt/pkgs/ninja.py +45 -0
- jolt/pkgs/nlohmann_json.py +25 -0
- jolt/pkgs/nodejs.py +19 -11
- jolt/pkgs/opencv.py +24 -0
- jolt/pkgs/openjdk.py +26 -0
- jolt/pkgs/openssl.py +103 -0
- jolt/pkgs/paho.py +76 -0
- jolt/pkgs/patchelf.py +16 -0
- jolt/pkgs/perl.py +42 -0
- jolt/pkgs/pkgconfig.py +64 -0
- jolt/pkgs/poco.py +39 -0
- jolt/pkgs/protobuf.py +77 -0
- jolt/pkgs/pugixml.py +27 -0
- jolt/pkgs/python.py +19 -0
- jolt/pkgs/qt.py +35 -0
- jolt/pkgs/rapidjson.py +26 -0
- jolt/pkgs/rapidyaml.py +28 -0
- jolt/pkgs/re2.py +30 -0
- jolt/pkgs/re2c.py +17 -0
- jolt/pkgs/readline.py +15 -0
- jolt/pkgs/rust.py +41 -0
- jolt/pkgs/sdl.py +28 -0
- jolt/pkgs/simdjson.py +27 -0
- jolt/pkgs/soci.py +46 -0
- jolt/pkgs/spdlog.py +29 -0
- jolt/pkgs/spirv_llvm.py +21 -0
- jolt/pkgs/spirv_tools.py +24 -0
- jolt/pkgs/sqlite.py +83 -0
- jolt/pkgs/ssl.py +12 -0
- jolt/pkgs/texinfo.py +15 -0
- jolt/pkgs/tomlplusplus.py +22 -0
- jolt/pkgs/wayland.py +26 -0
- jolt/pkgs/x11.py +58 -0
- jolt/pkgs/xerces_c.py +20 -0
- jolt/pkgs/xorg.py +360 -0
- jolt/pkgs/xz.py +29 -0
- jolt/pkgs/yamlcpp.py +30 -0
- jolt/pkgs/zeromq.py +47 -0
- jolt/pkgs/zlib.py +87 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/alias.py +3 -0
- jolt/plugins/allure.py +5 -2
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cache.py +133 -0
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxx.py +698 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/dashboard.py +1 -1
- jolt/plugins/docker.py +80 -23
- jolt/plugins/email.py +2 -2
- jolt/plugins/email.xslt +144 -101
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +39 -19
- jolt/plugins/gerrit.py +1 -14
- jolt/plugins/git.py +283 -85
- jolt/plugins/googletest.py +2 -1
- jolt/plugins/http.py +36 -38
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/logstash.py +4 -4
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +99 -30
- jolt/plugins/ninja.py +468 -166
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +136 -92
- jolt/plugins/python.py +137 -0
- jolt/plugins/remote_execution/__init__.py +0 -0
- jolt/plugins/remote_execution/administration_pb2.py +46 -0
- jolt/plugins/remote_execution/administration_pb2_grpc.py +170 -0
- jolt/plugins/remote_execution/log_pb2.py +32 -0
- jolt/plugins/remote_execution/log_pb2_grpc.py +68 -0
- jolt/plugins/remote_execution/scheduler_pb2.py +41 -0
- jolt/plugins/remote_execution/scheduler_pb2_grpc.py +141 -0
- jolt/plugins/remote_execution/worker_pb2.py +38 -0
- jolt/plugins/remote_execution/worker_pb2_grpc.py +112 -0
- jolt/plugins/report.py +12 -2
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +710 -0
- jolt/plugins/selfdeploy/setup.py +8 -4
- jolt/plugins/selfdeploy.py +138 -88
- jolt/plugins/strings.py +35 -22
- jolt/plugins/symlinks.py +26 -11
- jolt/plugins/telemetry.py +5 -2
- jolt/plugins/timeline.py +13 -3
- jolt/plugins/volume.py +46 -48
- jolt/scheduler.py +589 -192
- jolt/tasks.py +625 -121
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +638 -282
- jolt/utils.py +211 -7
- jolt/version.py +1 -1
- jolt/xmldom.py +12 -2
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -38
- jolt-0.9.435.dist-info/RECORD +207 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/WHEEL +1 -1
- jolt/plugins/amqp.py +0 -834
- jolt/plugins/debian.py +0 -338
- jolt/plugins/ftp.py +0 -181
- jolt/plugins/repo.py +0 -253
- jolt-0.9.123.dist-info/RECORD +0 -77
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: jolt/plugins/remote_execution/worker.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
15
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*jolt/plugins/remote_execution/worker.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\xaf\x01\n\rWorkerRequest\x12%\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x15.WorkerRequest.Action\x12\x1c\n\x05\x62uild\x18\x02 \x01(\x0b\x32\r.BuildRequest\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x04 \x01(\t\"4\n\x06\x41\x63tion\x12\t\n\x05\x42UILD\x10\x00\x12\x10\n\x0c\x43\x41NCEL_BUILD\x10\x01\x12\r\n\tTERMINATE\x10\x02\"\xf1\x01\n\x0cWorkerUpdate\x12$\n\x06status\x18\x01 \x01(\x0e\x32\x14.WorkerUpdate.Status\x12\x1b\n\x08platform\x18\x02 \x01(\x0b\x32\t.Platform\x12 \n\rtask_platform\x18\x04 \x01(\x0b\x32\t.Platform\x12\x1b\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x0c.WorkerError\"_\n\x06Status\x12\r\n\tENLISTING\x10\x00\x12\r\n\tDELISTING\x10\x01\x12\x0f\n\x0b\x42UILD_ENDED\x10\x02\x12\x11\n\rDEPLOY_FAILED\x10\x03\x12\x13\n\x0f\x45XECUTOR_FAILED\x10\x04\"/\n\x0bWorkerError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t2i\n\x06Worker\x12\x34\n\x0fGetInstructions\x12\r.WorkerUpdate\x1a\x0e.WorkerRequest(\x01\x30\x01\x12)\n\x08GetTasks\x12\x0b.TaskUpdate\x1a\x0c.TaskRequest(\x01\x30\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.worker_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
26
|
+
_globals['_WORKERREQUEST']._serialized_start=113
|
|
27
|
+
_globals['_WORKERREQUEST']._serialized_end=288
|
|
28
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_start=236
|
|
29
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_end=288
|
|
30
|
+
_globals['_WORKERUPDATE']._serialized_start=291
|
|
31
|
+
_globals['_WORKERUPDATE']._serialized_end=532
|
|
32
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_start=437
|
|
33
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_end=532
|
|
34
|
+
_globals['_WORKERERROR']._serialized_start=534
|
|
35
|
+
_globals['_WORKERERROR']._serialized_end=581
|
|
36
|
+
_globals['_WORKER']._serialized_start=583
|
|
37
|
+
_globals['_WORKER']._serialized_end=688
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
6
|
+
from jolt.plugins.remote_execution import worker_pb2 as jolt_dot_plugins_dot_remote__execution_dot_worker__pb2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WorkerStub(object):
|
|
10
|
+
"""The scheduler interface for workers and executors.
|
|
11
|
+
Workers prepare the build environment by deploying and
|
|
12
|
+
running executors (Jolt clients) to execute tasks.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, channel):
|
|
16
|
+
"""Constructor.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
channel: A grpc.Channel.
|
|
20
|
+
"""
|
|
21
|
+
self.GetInstructions = channel.stream_stream(
|
|
22
|
+
'/Worker/GetInstructions',
|
|
23
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.SerializeToString,
|
|
24
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.FromString,
|
|
25
|
+
)
|
|
26
|
+
self.GetTasks = channel.stream_stream(
|
|
27
|
+
'/Worker/GetTasks',
|
|
28
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.SerializeToString,
|
|
29
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.FromString,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class WorkerServicer(object):
|
|
34
|
+
"""The scheduler interface for workers and executors.
|
|
35
|
+
Workers prepare the build environment by deploying and
|
|
36
|
+
running executors (Jolt clients) to execute tasks.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def GetInstructions(self, request_iterator, context):
|
|
40
|
+
"""Called by a worker to get build instructions.
|
|
41
|
+
"""
|
|
42
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
43
|
+
context.set_details('Method not implemented!')
|
|
44
|
+
raise NotImplementedError('Method not implemented!')
|
|
45
|
+
|
|
46
|
+
def GetTasks(self, request_iterator, context):
|
|
47
|
+
"""Called by an executor (Jolt client) to get task execution requests.
|
|
48
|
+
Task updates, including status and logs are sent back to the scheduler.
|
|
49
|
+
"""
|
|
50
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
51
|
+
context.set_details('Method not implemented!')
|
|
52
|
+
raise NotImplementedError('Method not implemented!')
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def add_WorkerServicer_to_server(servicer, server):
|
|
56
|
+
rpc_method_handlers = {
|
|
57
|
+
'GetInstructions': grpc.stream_stream_rpc_method_handler(
|
|
58
|
+
servicer.GetInstructions,
|
|
59
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.FromString,
|
|
60
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.SerializeToString,
|
|
61
|
+
),
|
|
62
|
+
'GetTasks': grpc.stream_stream_rpc_method_handler(
|
|
63
|
+
servicer.GetTasks,
|
|
64
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.FromString,
|
|
65
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.SerializeToString,
|
|
66
|
+
),
|
|
67
|
+
}
|
|
68
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
69
|
+
'Worker', rpc_method_handlers)
|
|
70
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# This class is part of an EXPERIMENTAL API.
|
|
74
|
+
class Worker(object):
|
|
75
|
+
"""The scheduler interface for workers and executors.
|
|
76
|
+
Workers prepare the build environment by deploying and
|
|
77
|
+
running executors (Jolt clients) to execute tasks.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
@staticmethod
|
|
81
|
+
def GetInstructions(request_iterator,
|
|
82
|
+
target,
|
|
83
|
+
options=(),
|
|
84
|
+
channel_credentials=None,
|
|
85
|
+
call_credentials=None,
|
|
86
|
+
insecure=False,
|
|
87
|
+
compression=None,
|
|
88
|
+
wait_for_ready=None,
|
|
89
|
+
timeout=None,
|
|
90
|
+
metadata=None):
|
|
91
|
+
return grpc.experimental.stream_stream(request_iterator, target, '/Worker/GetInstructions',
|
|
92
|
+
jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.SerializeToString,
|
|
93
|
+
jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.FromString,
|
|
94
|
+
options, channel_credentials,
|
|
95
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
96
|
+
|
|
97
|
+
@staticmethod
|
|
98
|
+
def GetTasks(request_iterator,
|
|
99
|
+
target,
|
|
100
|
+
options=(),
|
|
101
|
+
channel_credentials=None,
|
|
102
|
+
call_credentials=None,
|
|
103
|
+
insecure=False,
|
|
104
|
+
compression=None,
|
|
105
|
+
wait_for_ready=None,
|
|
106
|
+
timeout=None,
|
|
107
|
+
metadata=None):
|
|
108
|
+
return grpc.experimental.stream_stream(request_iterator, target, '/Worker/GetTasks',
|
|
109
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.SerializeToString,
|
|
110
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.FromString,
|
|
111
|
+
options, channel_credentials,
|
|
112
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
jolt/plugins/report.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from contextlib import contextmanager
|
|
2
2
|
|
|
3
|
+
from jolt import common_pb2 as common_pb
|
|
3
4
|
from jolt.hooks import TaskHook, TaskHookFactory
|
|
4
5
|
from jolt.manifest import JoltManifest
|
|
5
6
|
|
|
@@ -12,6 +13,7 @@ class ReportHooks(TaskHook):
|
|
|
12
13
|
report.name = task.qualified_name
|
|
13
14
|
report.goal = str(task.is_goal()).lower()
|
|
14
15
|
report.identity = task.identity
|
|
16
|
+
report.instance = task.instance
|
|
15
17
|
report.result = result
|
|
16
18
|
if task.duration_running:
|
|
17
19
|
report.duration = str(task.duration_running.seconds)
|
|
@@ -36,7 +38,14 @@ class ReportHooks(TaskHook):
|
|
|
36
38
|
|
|
37
39
|
def task_failed(self, task):
|
|
38
40
|
with task.task.report() as report:
|
|
39
|
-
|
|
41
|
+
if task.status() == common_pb.TaskStatus.TASK_FAILED:
|
|
42
|
+
self.finalize_report(report.manifest, task, "FAILED")
|
|
43
|
+
elif task.status() == common_pb.TaskStatus.TASK_CANCELLED:
|
|
44
|
+
self.finalize_report(report.manifest, task, "CANCELLED")
|
|
45
|
+
|
|
46
|
+
def task_unstable(self, task):
|
|
47
|
+
with task.task.report() as report:
|
|
48
|
+
self.finalize_report(report.manifest, task, "UNSTABLE")
|
|
40
49
|
|
|
41
50
|
@contextmanager
|
|
42
51
|
def task_run(self, task):
|
|
@@ -49,7 +58,8 @@ class ReportHooks(TaskHook):
|
|
|
49
58
|
raise e
|
|
50
59
|
else:
|
|
51
60
|
with task.task.report() as report:
|
|
52
|
-
|
|
61
|
+
if task.status() == common_pb.TaskStatus.TASK_PASSED:
|
|
62
|
+
self.finalize_report(report.manifest, task, "SUCCESS")
|
|
53
63
|
|
|
54
64
|
def write(self, filename):
|
|
55
65
|
self.manifest.write(filename)
|
jolt/plugins/rust.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from jolt import attributes, Task
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@attributes.common_metadata()
|
|
5
|
+
class Rust(Task):
|
|
6
|
+
""" Base class for Rust-based build tasks. """
|
|
7
|
+
|
|
8
|
+
abstract = True
|
|
9
|
+
|
|
10
|
+
srcdir = None
|
|
11
|
+
"""
|
|
12
|
+
Source directory for the Rust project.
|
|
13
|
+
|
|
14
|
+
If None, defaults to the task work directory (joltdir).
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def run(self, deps, tools):
|
|
18
|
+
self.builddir = tools.builddir(incremental=True)
|
|
19
|
+
self.installdir = tools.builddir("install")
|
|
20
|
+
with tools.cwd(self.srcdir or self.joltdir):
|
|
21
|
+
tools.run("cargo install --path . --target-dir={builddir} --root={installdir}")
|
|
22
|
+
|
|
23
|
+
def publish(self, artifact, tools):
|
|
24
|
+
with tools.cwd(self.installdir):
|
|
25
|
+
artifact.collect("*", symlinks=True)
|