1
1
name : release
2
+
2
3
on :
3
4
push :
4
5
tags :
@@ -25,26 +26,38 @@ jobs:
25
26
target : x86_64-unknown-linux-gnu
26
27
cc : clang-12
27
28
ar : llvm-ar-12
29
+ zig : false
28
30
lib_file : libruby_parser_c.a
29
31
output_artifact_name : libruby_parser_c-x86_64-unknown-linux-gnu.a
30
32
31
33
- os : macos-latest
32
34
target : x86_64-apple-darwin
33
35
cc : clang
34
36
ar : ar
37
+ zig : false
35
38
lib_file : libruby_parser_c.a
36
39
output_artifact_name : libruby_parser_c-x86_64-apple-darwin.a
37
40
41
+ - os : macos-latest
42
+ target : aarch64-apple-darwin
43
+ cc : zig cc
44
+ ar : ar
45
+ zig : true
46
+ lib_file : libruby_parser_c.a
47
+ output_artifact_name : libruby_parser_c-aarch64-apple-darwin.a
48
+
38
49
- os : windows-latest
39
50
target : x86_64-pc-windows-msvc
40
51
cc : cl.exe
52
+ zig : false
41
53
lib_file : libruby_parser_c.lib
42
54
output_artifact_name : libruby_parser_c-x86_64-pc-windows-msvc.lib
43
55
44
56
- os : windows-latest
45
57
target : x86_64-pc-windows-gnu
46
58
cc : gcc
47
59
ar : ar
60
+ zig : false
48
61
lib_file : libruby_parser_c.a
49
62
output_artifact_name : libruby_parser_c-x86_64-pc-windows-gnu.a
50
63
steps :
71
84
- name : checkout
72
85
uses : actions/checkout@v2
73
86
87
+ - name : fix link.exe on windows
88
+ if : runner.os == 'Windows'
89
+ run : rm "C:\\Program Files\\Git\\usr\\bin\\link.exe"
90
+
91
+ - name : install zig
92
+ uses : goto-bus-stop/setup-zig@v2
93
+ if : ${{ matrix.build.zig }}
94
+
95
+ - name : install cargo-zigbuild
96
+ run : cargo install cargo-zigbuild
97
+ if : ${{ matrix.build.zig }}
98
+
74
99
- name : codegen
75
100
run : make do-codegen
76
101
@@ -85,28 +110,6 @@ jobs:
85
110
name : ${{ matrix.build.output_artifact_name }}
86
111
path : ${{ matrix.build.output_artifact_name }}
87
112
88
- - name : download benchmark assets
89
- run : make benchmark/download
90
-
91
- - name : build C runner
92
- run : make benchmark/c-parser
93
-
94
- # NOTE: ruby/setup-ruby breaks paths for MSVC,
95
- # and so all files must be compiled before running Ruby
96
- - name : install ruby
97
- uses : ruby/setup-ruby@v1
98
- with :
99
- ruby-version : " 3.1.1"
100
-
101
- - name : benchmark
102
- run : make benchmark/record
103
-
104
- - name : upload ${{ matrix.build.target }}.benchmark-out
105
- uses : actions/upload-artifact@v2
106
- with :
107
- name : ${{ matrix.build.target }}.benchmark-out
108
- path : ${{ matrix.build.target }}.benchmark-out
109
-
110
113
build-header :
111
114
name : build header file
112
115
runs-on : ubuntu-latest
@@ -132,60 +135,11 @@ jobs:
132
135
name : lib-ruby-parser.h
133
136
path : lib-ruby-parser.h
134
137
135
- build-release-notes :
136
- name : build release notes
137
- needs :
138
- - ' build-lib'
139
- runs-on : ubuntu-latest
140
- steps :
141
- - name : checkout
142
- uses : actions/checkout@v2
143
-
144
- # download benchmark results
145
- - uses : actions/download-artifact@v2
146
- with : { name: x86_64-unknown-linux-gnu.benchmark-out }
147
-
148
- - uses : actions/download-artifact@v2
149
- with : { name: x86_64-apple-darwin.benchmark-out }
150
-
151
- - uses : actions/download-artifact@v2
152
- with : { name: x86_64-pc-windows-msvc.benchmark-out }
153
-
154
- - uses : actions/download-artifact@v2
155
- with : { name: x86_64-pc-windows-gnu.benchmark-out }
156
-
157
- - name : build release notes
158
- run : |
159
- ls -l
160
- echo "### Results for x86_64-unknown-linux-gnu:" >> release_notes.md
161
- echo "" >> release_notes.md
162
- cat x86_64-unknown-linux-gnu.benchmark-out >> release_notes.md
163
- echo "" >> release_notes.md
164
- echo "### Results for x86_64-apple-darwin:" >> release_notes.md
165
- echo "" >> release_notes.md
166
- cat x86_64-apple-darwin.benchmark-out >> release_notes.md
167
- echo "" >> release_notes.md
168
- echo "### Results for x86_64-pc-windows-msvc:" >> release_notes.md
169
- echo "" >> release_notes.md
170
- cat x86_64-pc-windows-msvc.benchmark-out >> release_notes.md
171
- echo "" >> release_notes.md
172
- echo "### Results for x86_64-pc-windows-gnu:" >> release_notes.md
173
- echo "" >> release_notes.md
174
- cat x86_64-pc-windows-gnu.benchmark-out >> release_notes.md
175
- cat release_notes.md
176
-
177
- - name : upload release_notes.md
178
- uses : actions/upload-artifact@v2
179
- with :
180
- name : release_notes.md
181
- path : release_notes.md
182
-
183
138
make-release :
184
139
name : release
185
140
needs :
186
141
- ' build-lib'
187
142
- ' build-header'
188
- - ' build-release-notes'
189
143
runs-on : ubuntu-latest
190
144
steps :
191
145
- name : checkout
@@ -198,6 +152,9 @@ jobs:
198
152
- uses : actions/download-artifact@v2
199
153
with : { name: libruby_parser_c-x86_64-apple-darwin.a }
200
154
155
+ - uses : actions/download-artifact@v2
156
+ with : { name: libruby_parser_c-aarch64-apple-darwin.a }
157
+
201
158
- uses : actions/download-artifact@v2
202
159
with : { name: libruby_parser_c-x86_64-pc-windows-msvc.lib }
203
160
@@ -208,10 +165,6 @@ jobs:
208
165
- uses : actions/download-artifact@v2
209
166
with : { name: lib-ruby-parser.h }
210
167
211
- # release notes
212
- - uses : actions/download-artifact@v2
213
- with : { name: release_notes.md }
214
-
215
168
- name : show artifacts
216
169
run : ls -l
217
170
@@ -221,5 +174,4 @@ jobs:
221
174
allowUpdates : true
222
175
artifactErrorsFailBuild : true
223
176
artifacts : " libruby_parser_c-*,lib-ruby-parser.h"
224
- bodyFile : release_notes.md
225
177
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments