-
Notifications
You must be signed in to change notification settings - Fork 62
229 lines (224 loc) · 6.09 KB
/
ci.yml
File metadata and controls
229 lines (224 loc) · 6.09 KB
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
name: ci
on:
push:
branches:
- master
pull_request:
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Windows Dependencies
run: pip install meson ninja
- name: Building Sdb
run: meson build && ninja -C build
- name: Pub
uses: actions/upload-artifact@v7
with:
name: sdb_windows
path: build/*.exe
build-cxx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Building Sdb
run: make xxx
- name: Testing gperf
run: make -C test
build-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Building Sdb
run: export CFLAGS=-O0 ; make
- name: Building python bindings
run: make -C bindings/python
- name: Testing python bindings
run: cd bindings/python && python3 test.py
test-asan:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v6
- name: install gperf
run: sudo apt install gperf
- name: building sdb
run: make asan
- name: running tests
run: make asantest
- name: testing gperf
run: make -C test/gperf
# test-leaks:
# runs-on: ubuntu-latest
# continue-on-error: true
# steps:
# - uses: actions/checkout@v6
# - name: install gperf
# run: sudo apt install gperf
# - name: building sdb
# run: make asan
# - name: running tests
# run: make leaktest
# - name: testing gperf
# run: make -C test/gperf
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Meson Sdb
run: |
pip install meson ninja
meson b && ninja -C b
- name: Building Sdb
run: export CFLAGS="-Werror -Wall" && make -j4
- name: Install gperf
run: sudo apt install gperf
- name: Packaging
run: make -C dist/debian
- name: Running tests
run: make test
- name: Testing gperf
run: make -C test/gperf
- name: Pub
uses: actions/upload-artifact@v7
with:
name: sdb_linux
path: dist/debian/sdb/*.deb
build-heap:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v6
- name: Building Sdb
run: export CFLAGS="-DUSE_SDB_HEAP=1 -Werror -Wall" && make -j4
- name: Running tests
run: make test
# - name: Testing gperf
# run: make -C test/gperf
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Building Sdb
run: make -j4 && cd ..
- name: Packaging
run: cd dist/macos && make && cd ../../..
- name: Running tests
run: make test
- name: Pub
uses: actions/upload-artifact@v7
with:
name: sdb_macos
path: dist/macos/*.pkg
build-cydia:
runs-on: macos-latest
steps:
- name: Cloning Repo
run: git clone --depth=1 https://github.com/radareorg/sdb
- name: Building Sdb
run: cd sdb && make ios && cd ..
- name: Packaging
run: cd sdb/dist/cydia && make && cd ../../..
- name: Pub
uses: actions/upload-artifact@v7
with:
name: sdb_cydia
path: sdb/dist/cydia/*/*.deb
msys2-w64-meson:
strategy:
fail-fast: false
matrix:
sys: [MINGW64, UCRT64]
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: >-
cc:p
meson:p
ninja:p
- name: Configure Build
shell: msys2 {0}
run: |
prefix=$(case "${{ matrix.sys }}" in
MINGW64) echo /mingw64 ;;
UCRT64) echo /ucrt64 ;;
esac)
meson setup build --prefix=$prefix
- name: Compile Project
shell: msys2 {0}
run: meson compile -C build
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:
- build-windows
- build-cxx
- build-python
- test-asan
- build-linux
- build-heap
- build-macos
- build-cydia
- msys2-w64-meson
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # Download all git history and tags
- name: Check if is a release
run: |
TAG="`git describe --exact-match --tags ${{ github.sha }} || true`"
if [ -n "$TAG" ]; then
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "is=yes" >> $GITHUB_OUTPUT
else
echo "is=no" >> $GITHUB_OUTPUT
fi
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-24.04
env:
ASSET_FILES: |
dist/artifacts/sdb_windows/*.exe
dist/artifacts/sdb_linux/*.deb
dist/artifacts/sdb_macos/*.pkg
dist/artifacts/sdb_cydia/*.deb
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # Download all git history and tags
- name: Extract sdb version
shell: bash
run: echo "branch=`grep SDB_VERSION include/sdb/version.h | cut -d '"' -f 2`" >> $GITHUB_OUTPUT
id: version
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: dist/artifacts
- name: Create GitHub release
id: create_release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
name: ${{ steps.version.outputs.branch }}
tag_name: ${{ needs.check_release.outputs.tag_name }}
body_path: ./RELEASE_NOTES.md
draft: false
prerelease: false
generate_release_notes: false
files: |
${{ env.ASSET_FILES }}
checksums.txt