build 2.7.0 → 2.8.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/context/getting-started.md +70 -0
- data/context/index.yaml +13 -0
- data/lib/build/build_node.rb +1 -1
- data/lib/build/chain_node.rb +1 -1
- data/lib/build/controller.rb +1 -1
- data/lib/build/dependency_node.rb +1 -1
- data/lib/build/name.rb +1 -1
- data/lib/build/provision_node.rb +1 -1
- data/lib/build/rule.rb +1 -1
- data/lib/build/rule_node.rb +1 -1
- data/lib/build/rulebook.rb +1 -1
- data/lib/build/task.rb +1 -1
- data/lib/build/version.rb +2 -2
- data/lib/build.rb +1 -1
- data/license.md +1 -1
- data/readme.md +22 -16
- data/releases.md +2 -0
- data.tar.gz.sig +0 -0
- metadata +7 -21
- metadata.gz.sig +0 -0
- data/lib/build/graphviz.rb +0 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9be6ae7b6f18b932ee30e00ac9951d3095215722bc8ff479a58a5c51cd7f81e5
|
|
4
|
+
data.tar.gz: 3afcfb408bb6b50028db3454fa457d35e54a5fa28e1caec6761d32eed2c9f16f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8d546ed317a43d2f41bf5c356c84b7fcd05040993041367b3c7197334a003f5dace3866fb3133033fa0e18c0ca814c98675c7a16f82726396fd30ca587a4eb8
|
|
7
|
+
data.tar.gz: c77c91809ebe9132923e383f618fef77e49a8571cdbd670b538625bb003cff57dd1dc0a60da5c344bb3a344326fcea7b5c4a8e35e9f92c5529ca6c8f2600ea9c
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
This guide explains how to get started with `build`, a task-driven build system similar to make.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add the gem to your project:
|
|
8
|
+
|
|
9
|
+
~~~ bash
|
|
10
|
+
$ bundle add build
|
|
11
|
+
~~~
|
|
12
|
+
|
|
13
|
+
## Core Concepts
|
|
14
|
+
|
|
15
|
+
`build` has several core concepts:
|
|
16
|
+
|
|
17
|
+
- A {ruby Build::Rule} which represents a named build operation with typed input and output parameters.
|
|
18
|
+
- A {ruby Build::Rulebook} which is a collection of rules organized by process name for fast lookup.
|
|
19
|
+
- A {ruby Build::Controller} which manages the build graph and executes rules concurrently.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Define rules using `Build::Rule` inside a build environment, then organize them into a rulebook:
|
|
24
|
+
|
|
25
|
+
~~~ ruby
|
|
26
|
+
require "build/environment"
|
|
27
|
+
require "build/rulebook"
|
|
28
|
+
require "build/rule"
|
|
29
|
+
|
|
30
|
+
environment = Build::Environment.new do
|
|
31
|
+
define Build::Rule, "copy.file" do
|
|
32
|
+
input :source
|
|
33
|
+
output :destination
|
|
34
|
+
|
|
35
|
+
apply do |parameters|
|
|
36
|
+
cp parameters[:source], parameters[:destination]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
define Build::Rule, "compile.cpp" do
|
|
41
|
+
input :source
|
|
42
|
+
output :object
|
|
43
|
+
|
|
44
|
+
apply do |parameters|
|
|
45
|
+
run! "clang++", "-c", parameters[:source], "-o", parameters[:object]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
rulebook = Build::Rulebook.for(environment.flatten)
|
|
51
|
+
~~~
|
|
52
|
+
|
|
53
|
+
### Running a Build
|
|
54
|
+
|
|
55
|
+
Use {ruby Build::Controller} to orchestrate the build graph. The controller handles dependency resolution and runs rules concurrently where possible:
|
|
56
|
+
|
|
57
|
+
~~~ ruby
|
|
58
|
+
require "build/controller"
|
|
59
|
+
|
|
60
|
+
controller = Build::Controller.new do |controller|
|
|
61
|
+
controller.add_chain(chain, [], environment)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
controller.run
|
|
65
|
+
|
|
66
|
+
if controller.failed?
|
|
67
|
+
$stderr.puts "Build failed!"
|
|
68
|
+
exit(1)
|
|
69
|
+
end
|
|
70
|
+
~~~
|
data/context/index.yaml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated context index for Utopia::Project guides.
|
|
2
|
+
# Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
|
|
3
|
+
---
|
|
4
|
+
description: Build is a framework for creating task based build systems.
|
|
5
|
+
metadata:
|
|
6
|
+
documentation_uri: https://ioquatix.github.io/build/
|
|
7
|
+
source_code_uri: https://github.com/kurocha/build.git
|
|
8
|
+
funding_uri: https://github.com/sponsors/ioquatix
|
|
9
|
+
files:
|
|
10
|
+
- path: getting-started.md
|
|
11
|
+
title: Getting Started
|
|
12
|
+
description: This guide explains how to get started with `build`, a task-driven
|
|
13
|
+
build system similar to make.
|
data/lib/build/build_node.rb
CHANGED
data/lib/build/chain_node.rb
CHANGED
data/lib/build/controller.rb
CHANGED
data/lib/build/name.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2015-
|
|
4
|
+
# Copyright, 2015-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
module Build
|
|
7
7
|
# Represents a human-readable name with helpers for generating identifiers, target names, and macros.
|
data/lib/build/provision_node.rb
CHANGED
data/lib/build/rule.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2015-
|
|
4
|
+
# Copyright, 2015-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
module Build
|
|
7
7
|
# A rule is a function with a specific set of input and output parameters, which can match against a given set of specific arguments. For example, there might be several rules for compiling, but the specific rules depend on the language being compiled.
|
data/lib/build/rule_node.rb
CHANGED
data/lib/build/rulebook.rb
CHANGED
data/lib/build/task.rb
CHANGED
data/lib/build/version.rb
CHANGED
data/lib/build.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
|
@@ -4,30 +4,20 @@ Build is a ruby gem providing systems for building task driven build systems sim
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/ioquatix/build/actions?workflow=Test)
|
|
6
6
|
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Add this line to your application's Gemfile:
|
|
10
|
-
|
|
11
|
-
gem 'build'
|
|
12
|
-
|
|
13
|
-
And then execute:
|
|
14
|
-
|
|
15
|
-
$ bundle
|
|
16
|
-
|
|
17
|
-
Or install it yourself as:
|
|
18
|
-
|
|
19
|
-
$ gem install build
|
|
20
|
-
|
|
21
7
|
## Usage
|
|
22
8
|
|
|
23
|
-
Please see the [project documentation](https://ioquatix.github.io/build) for more details.
|
|
9
|
+
Please see the [project documentation](https://ioquatix.github.io/build/) for more details.
|
|
10
|
+
|
|
11
|
+
- [Getting Started](https://ioquatix.github.io/build/guides/getting-started/index) - This guide explains how to get started with `build`, a task-driven build system similar to make.
|
|
24
12
|
|
|
25
13
|
## Releases
|
|
26
14
|
|
|
27
|
-
Please see the [project releases](https://ioquatix.github.io/
|
|
15
|
+
Please see the [project releases](https://ioquatix.github.io/build/releases/index) for all releases.
|
|
28
16
|
|
|
29
17
|
### v2.7.0
|
|
30
18
|
|
|
19
|
+
- Remove logger dependency and options.
|
|
20
|
+
|
|
31
21
|
## Contributing
|
|
32
22
|
|
|
33
23
|
We welcome contributions to this project.
|
|
@@ -38,6 +28,22 @@ We welcome contributions to this project.
|
|
|
38
28
|
4. Push to the branch (`git push origin my-new-feature`).
|
|
39
29
|
5. Create new Pull Request.
|
|
40
30
|
|
|
31
|
+
### Running Tests
|
|
32
|
+
|
|
33
|
+
To run the test suite:
|
|
34
|
+
|
|
35
|
+
``` shell
|
|
36
|
+
bundle exec sus
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Making Releases
|
|
40
|
+
|
|
41
|
+
To make a new release:
|
|
42
|
+
|
|
43
|
+
``` shell
|
|
44
|
+
bundle exec bake gem:release:patch # or minor or major
|
|
45
|
+
```
|
|
46
|
+
|
|
41
47
|
### Developer Certificate of Origin
|
|
42
48
|
|
|
43
49
|
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: build
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -94,30 +94,17 @@ dependencies:
|
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '1.0'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: graphviz
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.0'
|
|
104
|
-
type: :runtime
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '1.0'
|
|
111
97
|
executables: []
|
|
112
98
|
extensions: []
|
|
113
99
|
extra_rdoc_files: []
|
|
114
100
|
files:
|
|
101
|
+
- context/getting-started.md
|
|
102
|
+
- context/index.yaml
|
|
115
103
|
- lib/build.rb
|
|
116
104
|
- lib/build/build_node.rb
|
|
117
105
|
- lib/build/chain_node.rb
|
|
118
106
|
- lib/build/controller.rb
|
|
119
107
|
- lib/build/dependency_node.rb
|
|
120
|
-
- lib/build/graphviz.rb
|
|
121
108
|
- lib/build/name.rb
|
|
122
109
|
- lib/build/provision_node.rb
|
|
123
110
|
- lib/build/rule.rb
|
|
@@ -128,13 +115,12 @@ files:
|
|
|
128
115
|
- license.md
|
|
129
116
|
- readme.md
|
|
130
117
|
- releases.md
|
|
131
|
-
homepage: https://github.com/kurocha/build
|
|
132
118
|
licenses:
|
|
133
119
|
- MIT
|
|
134
120
|
metadata:
|
|
135
|
-
documentation_uri: https://ioquatix.github.io/build
|
|
136
|
-
funding_uri: https://github.com/sponsors/ioquatix
|
|
121
|
+
documentation_uri: https://ioquatix.github.io/build/
|
|
137
122
|
source_code_uri: https://github.com/kurocha/build.git
|
|
123
|
+
funding_uri: https://github.com/sponsors/ioquatix
|
|
138
124
|
rdoc_options: []
|
|
139
125
|
require_paths:
|
|
140
126
|
- lib
|
|
@@ -142,14 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
142
128
|
requirements:
|
|
143
129
|
- - ">="
|
|
144
130
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '3.
|
|
131
|
+
version: '3.3'
|
|
146
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
133
|
requirements:
|
|
148
134
|
- - ">="
|
|
149
135
|
- !ruby/object:Gem::Version
|
|
150
136
|
version: '0'
|
|
151
137
|
requirements: []
|
|
152
|
-
rubygems_version: 4.0.
|
|
138
|
+
rubygems_version: 4.0.6
|
|
153
139
|
specification_version: 4
|
|
154
140
|
summary: Build is a framework for creating task based build systems.
|
|
155
141
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/lib/build/graphviz.rb
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2015, by Samuel Williams.
|
|
5
|
-
|
|
6
|
-
module Build
|
|
7
|
-
# Generate a Graphviz graph visualisation of the build graph.
|
|
8
|
-
# @parameter walker [Build::Graph::Walker] The completed walker containing tasks.
|
|
9
|
-
# @returns [Graphviz::Graph] A graph object ready for rendering.
|
|
10
|
-
def self.graph_visualisation(walker)
|
|
11
|
-
graph = Graphviz::Graph.new("G", rankdir: "LR")
|
|
12
|
-
|
|
13
|
-
walker.tasks.each do |node, task|
|
|
14
|
-
input_nodes = []
|
|
15
|
-
output_nodes = []
|
|
16
|
-
|
|
17
|
-
task.inputs.each do |path|
|
|
18
|
-
input_nodes << graph.add_node(path.basename)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
task.outputs.each do |path|
|
|
22
|
-
output_nodes << graph.add_node(path.basename)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
if output_nodes.size == 1
|
|
26
|
-
input_nodes.each do |input_node|
|
|
27
|
-
edge = input_node.connect(output_nodes.first)
|
|
28
|
-
edge.attributes[:label] = node.title
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
return graph
|
|
34
|
-
end
|
|
35
|
-
end
|