-
Notifications
You must be signed in to change notification settings - Fork 95
313 lines (309 loc) · 10.4 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
name: iaito CI
env:
R2V: 5.9.8
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
acr-linux-r2git:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: false # 'recursive' 'true' or 'false'
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: 3.11.x
- name: apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgraphviz-dev mesa-common-dev ninja-build meson libqt5svg5-dev qttools5-dev qttools5-dev-tools qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
- name: install r2
run: git clone --depth=1 https://github.com/radareorg/radare2 r2git && CFLAGS=-O0 r2git/sys/install.sh
- name: build iaito
run: |
./configure --prefix=/usr
make -j4
- name: packaging
run: make -j -C dist/debian
acr-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: false # 'recursive' 'true' or 'false'
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: 3.11.x
- name: apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgraphviz-dev mesa-common-dev ninja-build libqt5svg5-dev qttools5-dev qttools5-dev-tools qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
- name: install r2
run: |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2_${{env.R2V}}_amd64.deb
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-dev_${{env.R2V}}_amd64.deb
sudo dpkg -i *.deb
- name: build iaito
run: |
./configure --prefix=/usr
make -j4
- name: packaging
run: make -C dist/debian
- uses: actions/upload-artifact@v4
with:
name: iaito-amd64.deb
path: dist/debian/*/*.deb
acr-macos-x64:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: false # 'recursive' 'true' or 'false'
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: 3.11.x
- name: uname
run: uname -a
- name: install dependencies
run: |
brew install qt@5
echo $(brew --prefix qt@5)/bin >> $GITHUB_PATH
pip3 install meson ninja
- name: install r2
run: |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-x64-${{env.R2V}}.pkg
sudo installer -pkg *.pkg -target /
- name: build iaito
run: |
./configure
make -j4
- name: packaging
run: make -C dist/macos
- uses: actions/upload-artifact@v4
with:
name: iaito-x64.dmg
path: dist/macos/iaito.dmg
acr-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false # 'recursive' 'true' or 'false'
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: 3.11.x
- name: uname
run: uname -a
- name: install dependencies
run: |
brew install qt@5
echo $(brew --prefix qt@5)/bin >> $GITHUB_PATH
pip3 install meson ninja
- name: install r2
run: |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-m1-${{env.R2V}}.pkg
sudo installer -pkg *.pkg -target /
- name: build iaito
run: |
./configure
make -j4
- name: packaging
run: make -C dist/macos
- uses: actions/upload-artifact@v4
with:
name: iaito-arm64.dmg
path: dist/macos/iaito.dmg
meson:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
python-version: [3.8.x]
system-deps: [true]
cc-override: [default]
cxx-override: [default]
# Prevent one job from pausing the rest
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: false # 'recursive' 'true' or 'false'
persist-credentials: false
- name: apt dependencies
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libgraphviz-dev mesa-common-dev ninja-build libqt5svg5-dev qttools5-dev qttools5-dev-tools qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
- name: install r2
run: git clone --depth=1 https://github.com/radareorg/radare2 r2git && CFLAGS=-O0 r2git/sys/install.sh
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
if: contains(matrix.os, 'macos')
run: |
brew install qt@5
echo $(brew --prefix qt@5)/bin >> $GITHUB_PATH
pip3 install meson ninja
- name: macos build
if: contains(matrix.os, 'macos')
run: |
meson setup -Dwith_qt6=true build src
ninja -C build -j4
- name: meson+ninja ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
pip install meson
meson setup build src
ninja -C build -j4
w64-meson:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false
- name: Preparing msvc toolchain
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.8.*
- name: install dependencies
shell: cmd
run: pip install ninja meson
- name: install r2 (preconfigure)
shell: bash
run: |
curl -L -o r2.zip https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-${{env.R2V}}-w64.zip
7z x r2.zip
mv radare2-${{env.R2V}}-w64 radare2
echo "%CD%\radare2\bin" >> $GITHUB_PATH
- name: configure
shell: cmd
run: configure.bat
- name: make
shell: cmd
env:
ARCH: x64
run: make.bat -Dwith_qt6=true
- name: dist
shell: cmd
run: 7z a -r iaito.zip iaito
- uses: actions/upload-artifact@v4
with:
name: iaito-w64.exe
path: iaito\iaito.exe
- uses: actions/upload-artifact@v4
with:
name: iaito-w64.zip
path: iaito.zip
check_release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
outputs:
is_release: ${{ steps.release.outputs.is }}
tag_name: ${{ steps.release.outputs.tag }}
needs:
- acr-linux
- acr-macos-arm64
- acr-macos-x64
- w64-meson
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Download all git history and tags
- name: Check if is a release
run: git describe --exact-match --tags ${{ github.sha }} | awk 'BEGIN{tag="-";r="no"}/^[0-9]+\.[0-9]+/{tag=$0;r="yes"};END{print "is="r;print "tag="tag}' >> ${GITHUB_OUTPUT}
id: release
release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.check_release.outputs.is_release == 'yes' }}
needs:
- check_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Download all git history and tags
- name: Extract version
run: echo "string=`./configure -qV`" >> $GITHUB_OUTPUT
id: version
- name: Prepare release notes
run: ./scripts/release-notes.sh | tee ./RELEASE_NOTES.md
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/artifacts
- name: Display structure of downloaded files
run: find dist/artifacts
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.check_release.outputs.tag_name }}
release_name: ${{ steps.version.outputs.string }}
body_path: ./RELEASE_NOTES.md
draft: false
prerelease: false
- name: Prepare release notes
run: ./scripts/release-notes.sh | tee ./RELEASE_NOTES.md
- name: Upload Linux asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/iaito-amd64.deb/iaito/iaito_${{ steps.version.outputs.string }}_amd64.deb
asset_name: iaito_${{ steps.version.outputs.string }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package
- name: Upload macOS x64 asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/iaito-x64.dmg/iaito.dmg
asset_name: iaito_${{ steps.version.outputs.string }}_x64.dmg
asset_content_type: application/vnd.debian.binary-package
- name: Upload macOS arm64 asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/iaito-arm64.dmg/iaito.dmg
asset_name: iaito_${{ steps.version.outputs.string }}_arm64.dmg
asset_content_type: application/vnd.debian.binary-package
- name: Upload Windows QtDeploy asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/iaito-w64.zip/iaito.zip
asset_name: iaito-${{ steps.version.outputs.string }}-w64.zip
asset_content_type: application/zip
- name: Upload Windows executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/iaito-w64.exe/iaito.exe
asset_name: iaito-${{ steps.version.outputs.string }}.exe
asset_content_type: application/zip