@@ -31,12 +31,14 @@ jobs:
31
31
32
32
steps :
33
33
- uses : actions/checkout@v2
34
+ with :
35
+ fetch-depth : 0
34
36
- name : Install utility tools
35
37
shell : bash
36
38
run : |
37
39
# TODO some of these should probably live in the Docker build image
38
40
apt-get update
39
- apt-get install -y pixz xz-utils make
41
+ apt-get install -y pixz xz-utils make rpm
40
42
41
43
- name : Build with build script
42
44
shell : bash
54
56
CLANG_BIN="$(find ../../pre-built-llvm-${{ matrix.llvm }} -name clang | grep "bin/clang")"
55
57
../scripts/roundtrip.py "./tools/rellic-decomp-${{ matrix.llvm }}.0" ../tests/tools/decomp "${CLANG_BIN}"
56
58
59
+ - name : Locate the packages
60
+ id : package_names
61
+ shell : bash
62
+ working-directory : rellic-build
63
+ run : |
64
+ echo ::set-output name=DEB_PACKAGE_PATH::rellic-build/$(ls *.deb)
65
+ echo ::set-output name=RPM_PACKAGE_PATH::rellic-build/$(ls *.rpm)
66
+ echo ::set-output name=TGZ_PACKAGE_PATH::rellic-build/$(ls *.tar.gz)
67
+
68
+ - name : Store the DEB package
69
+ uses : actions/upload-artifact@v1
70
+ with :
71
+ name : ${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm${{ matrix.llvm }}_deb_package
72
+ path : ${{ steps.package_names.outputs.DEB_PACKAGE_PATH }}
73
+
74
+ - name : Store the RPM package
75
+ uses : actions/upload-artifact@v1
76
+ with :
77
+ name : ${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm${{ matrix.llvm }}_rpm_package
78
+ path : ${{ steps.package_names.outputs.RPM_PACKAGE_PATH }}
79
+
80
+ - name : Store the TGZ package
81
+ uses : actions/upload-artifact@v1
82
+ with :
83
+ name : ${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm${{ matrix.llvm }}_tgz_package
84
+ path : ${{ steps.package_names.outputs.TGZ_PACKAGE_PATH }}
85
+
57
86
build_mac :
58
87
strategy :
59
88
fail-fast : false
69
98
70
99
steps :
71
100
- uses : actions/checkout@v2
101
+ with :
102
+ fetch-depth : 0
72
103
- name : Build with build script
73
104
shell : bash
74
105
run : |
@@ -84,3 +115,114 @@ jobs:
84
115
# Run tests manually (kinda ugly, so use CMake way)
85
116
CLANG_BIN="$(find ../../pre-built-llvm-${{ matrix.llvm }} -name clang | grep "bin/clang")"
86
117
../scripts/roundtrip.py "./tools/rellic-decomp-${{ matrix.llvm }}.0" ../tests/tools/decomp "${CLANG_BIN}"
118
+ - name : Locate the packages
119
+ id : package_names
120
+ shell : bash
121
+ working-directory : rellic-build
122
+ run : |
123
+ echo ::set-output name=TGZ_PACKAGE_PATH::rellic-build/$(ls *.tar.gz)
124
+
125
+ - name : Store the TGZ package
126
+ uses : actions/upload-artifact@v1
127
+ with :
128
+ name : macos-11.0_llvm${{ matrix.llvm }}_tgz_package
129
+ path : ${{ steps.package_names.outputs.TGZ_PACKAGE_PATH }}
130
+
131
+
132
+ release_linux :
133
+ # Do not run the release procedure if any of the builds has failed
134
+ needs : [ build_linux, build_mac ]
135
+ runs-on : ubuntu-20.04
136
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
137
+
138
+ steps :
139
+ - name : Download all artifacts
140
+ uses : actions/download-artifact@v2
141
+
142
+ - name : Draft the new release
143
+ id : create_release
144
+ uses : actions/create-release@v1
145
+
146
+ env :
147
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
148
+
149
+ with :
150
+ tag_name : ${{ github.ref }}
151
+ release_name : Version ${{ github.ref }}
152
+ draft : true
153
+ prerelease : true
154
+
155
+ - name : Group the packages by platform
156
+ run : |
157
+ zip -r9 rellic_ubuntu-18.04_packages.zip \
158
+ ubuntu-18.04*
159
+
160
+ zip -r9 rellic_ubuntu-20.04_packages.zip \
161
+ ubuntu-20.04*
162
+
163
+ - name : Upload the Ubuntu 18.04 packages
164
+ uses : actions/upload-release-asset@v1
165
+
166
+ env :
167
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
168
+
169
+ with :
170
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
171
+ asset_path : rellic_ubuntu-18.04_packages.zip
172
+ asset_name : rellic_ubuntu-18.04_packages.zip
173
+ asset_content_type : application/gzip
174
+
175
+ - name : Upload the Ubuntu 20.04 packages
176
+ uses : actions/upload-release-asset@v1
177
+
178
+ env :
179
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
180
+
181
+ with :
182
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
183
+ asset_path : rellic_ubuntu-20.04_packages.zip
184
+ asset_name : rellic_ubuntu-20.04_packages.zip
185
+ asset_content_type : application/gzip
186
+
187
+
188
+
189
+
190
+ release_macos :
191
+ # Do not run the release procedure if any of the builds has failed
192
+ needs : [ build_linux, build_mac ]
193
+ runs-on : ' macos-11.0'
194
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
195
+
196
+ steps :
197
+ - name : Download all artifacts
198
+ uses : actions/download-artifact@v2
199
+
200
+ - name : Draft the new release
201
+ id : create_release
202
+ uses : actions/create-release@v1
203
+
204
+ env :
205
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
206
+
207
+ with :
208
+ tag_name : ${{ github.ref }}
209
+ release_name : Version ${{ github.ref }}
210
+ draft : true
211
+ prerelease : true
212
+
213
+ - name : Group the packages by platform
214
+ run : |
215
+ zip -r9 rellic_macos-11.0_packages.zip \
216
+ macos-11.0*
217
+
218
+ - name : Upload the macOS 11.0 packages
219
+ uses : actions/upload-release-asset@v1
220
+
221
+ env :
222
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
223
+
224
+ with :
225
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
226
+ asset_path : rellic_macos-11.0_packages.zip
227
+ asset_name : rellic_macos-11.0_packages.zip
228
+ asset_content_type : application/gzip
0 commit comments