@@ -11,36 +11,50 @@ jobs:
11
11
uses : actions/checkout@v2
12
12
- name : Bundle
13
13
run : bundle install
14
- - name : Set Node.js version
15
- run : |
16
- bundle exec ruby -e 'puts Libv8Node::NODE_VERSION' | tee node_version
14
+ - name : Set metadata
15
+ id : set-metadata
16
+ run : |
17
+ bundle exec ruby -e 'puts RUBY_PLATFORM' | tee ruby_platform
18
+ echo "::set-output name=RUBY_PLATFORM::$(cat ruby_platform)"
19
+ bundle exec ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform
20
+ echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)"
21
+ bundle exec ruby -e 'puts Libv8::Node::VERSION' | tee gem_version
22
+ echo "::set-output name=GEM_VERSION::$(cat gem_version)"
23
+ bundle exec ruby -e 'puts Libv8::Node::NODE_VERSION' | tee node_version
24
+ echo "::set-output name=NODE_VERSION::$(cat node_version)"
25
+ bundle exec ruby -e 'puts Libv8::Node::LIBV8_VERSION' | tee libv8_version
26
+ echo "::set-output name=LIBV8_VERSION::$(cat libv8_version)"
17
27
- name : Download Node.js
18
28
run : |
19
- ./download-node 14.14.0
29
+ ./download-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
20
30
- name : Extract Node.js
21
31
run : |
22
- ./extract-node 14.14.0
32
+ ./extract-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
33
+ - name : Validate V8 version
34
+ run : |
35
+ ruby -e 'h = File.read("src/node-14.14.0/deps/v8/include/v8-version.h"); eval h.each_line.with_object([]) { |l, e| l =~ /#define (V8_[A-Z_]+)\s(\d+)/ && e << "#{$1} = #{$2}" }.join(";"); puts "#{V8_MAJOR_VERSION}.#{V8_MINOR_VERSION}.#{V8_BUILD_NUMBER}.#{V8_PATCH_LEVEL}"' | tee libv8_version_h
36
+ diff libv8_version_h libv8_version
23
37
- name : Build V8
24
38
run : |
25
- ./build-libv8 14.14.0
39
+ ./build-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
26
40
- name : Build Monolith
27
41
run : |
28
- ./build-monolith 14.14.0
42
+ ./build-monolith ${{ steps.set-metadata.outputs.NODE_VERSION }}
29
43
- name : Inject V8
30
44
run : |
31
- ./inject-libv8 14.14.0
45
+ ./inject-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
32
46
- name : Build gem
33
47
run : |
34
48
bundle exec rake binary
35
49
- name : Upload V8
36
50
uses : actions/upload-artifact@v1
37
51
with :
38
- name : v8-x86_64-darwin19
52
+ name : v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
39
53
path : vendor
40
54
- name : Upload gem
41
55
uses : actions/upload-artifact@v1
42
56
with :
43
- name : gem-x86_64-darwin19
57
+ name : gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
44
58
path : pkg
45
59
build-linux-glibc :
46
60
name : Build (Linux glibc)
@@ -51,33 +65,50 @@ jobs:
51
65
uses : actions/checkout@v2
52
66
- name : Bundle
53
67
run : bundle install
68
+ - name : Set metadata
69
+ id : set-metadata
70
+ run : |
71
+ bundle exec ruby -e 'puts RUBY_PLATFORM' | tee ruby_platform
72
+ echo "::set-output name=RUBY_PLATFORM::$(cat ruby_platform)"
73
+ bundle exec ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform
74
+ echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)"
75
+ bundle exec ruby -e 'puts Libv8::Node::VERSION' | tee gem_version
76
+ echo "::set-output name=GEM_VERSION::$(cat gem_version)"
77
+ bundle exec ruby -e 'puts Libv8::Node::NODE_VERSION' | tee node_version
78
+ echo "::set-output name=NODE_VERSION::$(cat node_version)"
79
+ bundle exec ruby -e 'puts Libv8::Node::LIBV8_VERSION' | tee libv8_version
80
+ echo "::set-output name=LIBV8_VERSION::$(cat libv8_version)"
54
81
- name : Download Node.js
55
82
run : |
56
- ./download-node 14.14.0
83
+ ./download-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
57
84
- name : Extract Node.js
58
85
run : |
59
- ./extract-node 14.14.0
86
+ ./extract-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
87
+ - name : Validate V8 version
88
+ run : |
89
+ ruby -e 'h = File.read("src/node-14.14.0/deps/v8/include/v8-version.h"); eval h.each_line.with_object([]) { |l, e| l =~ /#define (V8_[A-Z_]+)\s(\d+)/ && e << "#{$1} = #{$2}" }.join(";"); puts "#{V8_MAJOR_VERSION}.#{V8_MINOR_VERSION}.#{V8_BUILD_NUMBER}.#{V8_PATCH_LEVEL}"' | tee libv8_version_h
90
+ diff libv8_version_h libv8_version
60
91
- name : Build V8
61
92
run : |
62
- ./build-libv8 14.14.0
93
+ ./build-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
63
94
- name : Build Monolith
64
95
run : |
65
- ./build-monolith 14.14.0
96
+ ./build-monolith ${{ steps.set-metadata.outputs.NODE_VERSION }}
66
97
- name : Inject V8
67
98
run : |
68
- ./inject-libv8 14.14.0
99
+ ./inject-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
69
100
- name : Build gem
70
101
run : |
71
102
bundle exec rake binary
72
103
- name : Upload V8
73
104
uses : actions/upload-artifact@v1
74
105
with :
75
- name : v8-x86_64-linux-glibc
106
+ name : v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
76
107
path : vendor
77
108
- name : Upload gem
78
109
uses : actions/upload-artifact@v1
79
110
with :
80
- name : gem-x86_64-linux-glibc
111
+ name : gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
81
112
path : pkg
82
113
build-linux-musl :
83
114
name : Build (Linux musl)
@@ -90,21 +121,38 @@ jobs:
90
121
uses : actions/checkout@v2
91
122
- name : Bundle
92
123
run : bundle install
124
+ - name : Set metadata
125
+ id : set-metadata
126
+ run : |
127
+ bundle exec ruby -e 'puts RUBY_PLATFORM' | tee ruby_platform
128
+ echo "::set-output name=RUBY_PLATFORM::$(cat ruby_platform)"
129
+ bundle exec ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform
130
+ echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)"
131
+ bundle exec ruby -e 'puts Libv8::Node::VERSION' | tee gem_version
132
+ echo "::set-output name=GEM_VERSION::$(cat gem_version)"
133
+ bundle exec ruby -e 'puts Libv8::Node::NODE_VERSION' | tee node_version
134
+ echo "::set-output name=NODE_VERSION::$(cat node_version)"
135
+ bundle exec ruby -e 'puts Libv8::Node::LIBV8_VERSION' | tee libv8_version
136
+ echo "::set-output name=LIBV8_VERSION::$(cat libv8_version)"
93
137
- name : Download Node.js
94
138
run : |
95
- ./download-node 14.14.0
139
+ ./download-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
96
140
- name : Extract Node.js
97
141
run : |
98
- ./extract-node 14.14.0
142
+ ./extract-node ${{ steps.set-metadata.outputs.NODE_VERSION }}
143
+ - name : Validate V8 version
144
+ run : |
145
+ ruby -e 'h = File.read("src/node-14.14.0/deps/v8/include/v8-version.h"); eval h.each_line.with_object([]) { |l, e| l =~ /#define (V8_[A-Z_]+)\s(\d+)/ && e << "#{$1} = #{$2}" }.join(";"); puts "#{V8_MAJOR_VERSION}.#{V8_MINOR_VERSION}.#{V8_BUILD_NUMBER}.#{V8_PATCH_LEVEL}"' | tee libv8_version_h
146
+ diff libv8_version_h libv8_version
99
147
- name : Build V8
100
148
run : |
101
- ./build-libv8 14.14.0
149
+ ./build-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
102
150
- name : Build Monolith
103
151
run : |
104
- ./build-monolith 14.14.0
152
+ ./build-monolith ${{ steps.set-metadata.outputs.NODE_VERSION }}
105
153
- name : Inject V8
106
154
run : |
107
- ./inject-libv8 14.14.0
155
+ ./inject-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
108
156
- name : Build gem
109
157
run : |
110
158
bundle exec rake binary
@@ -116,10 +164,10 @@ jobs:
116
164
- name : Upload V8
117
165
uses : actions/upload-artifact@v1
118
166
with :
119
- name : v8-x86_64-linux-musl
167
+ name : v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
120
168
path : vendor
121
169
- name : Upload gem
122
170
uses : actions/upload-artifact@v1
123
171
with :
124
- name : gem-x86_64-linux-musl
172
+ name : gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }}
125
173
path : pkg
0 commit comments