forked from dstogov/ir
-
Notifications
You must be signed in to change notification settings - Fork 0
180 lines (175 loc) · 4.76 KB
/
Copy pathpush.yml
File metadata and controls
180 lines (175 loc) · 4.76 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
name: Push
on:
push:
branches:
- master
pull_request:
branches:
- "**"
permissions:
contents: read
jobs:
Linux_x86_64:
name: 'Linux x86_64'
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: apt
run: |
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
libcapstone-dev \
libcapstone4 \
make
- name: make
run: make BUILD=debug all
- name: test
run: make BUILD=debug test-ci
Linux_x86_64_c11:
name: 'Linux x86_64 -std=c11'
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: apt
run: |
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
libcapstone-dev \
libcapstone4 \
make
- name: make
run: make BUILD=debug CFLAGS=-std=c11 all
- name: test
run: make BUILD=debug CFLAGS=-std=c11 test-ci
Linux_i386:
name: 'Linux i386'
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: apt
run: |
dpkg --add-architecture i386
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
gcc-multilib \
libc6:i386 \
make \
wget
- name: Build capstone
run: |
# capstone isn't distributed for 32-bit so we need to build it manually
wget https://github.com/capstone-engine/capstone/archive/4.0.2.tar.gz -O capstone.tar.gz
tar zxvf capstone.tar.gz
cd capstone-4.0.2
./make.sh nix32
./make.sh install
cd ..
rm -rf capstone-4.0.2 capstone.tar.gz
- name: make
run: make TARGET=x86 BUILD=debug all
- name: test
run: make TARGET=x86 BUILD=debug test-ci
Linux_aarch64:
name: 'Linux aarch64'
runs-on: ubuntu-22.04-arm
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v3
- name: apt
run: |
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
libc6 \
libcapstone-dev \
libcapstone4 \
make
- name: make
run: make BUILD=debug all
- name: test
run: make BUILD=debug test-ci
FreeBSD_amd_64:
name: 'FreeBSD amd64'
runs-on: ubuntu-22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: pkg
id: runcmd
uses: vmactions/freebsd-vm@v1
with:
usesh: true
sync: rsync
copyback: false
mem: 2048
release: 13.2
prepare: |
pkg install -y capstone gmake
run: |
gmake all
gmake test-ci
MACOS_x86_64:
runs-on: macos-15-intel
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: brew
run: brew install capstone
- name: make
run: make BUILD=debug all
- name: test
run: make BUILD=debug test-ci
Windows:
strategy:
matrix:
arch: [x86, amd64]
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Prepare env
shell: powershell
run: |
$tag = (nmake -nologo -f win32\Makefile capstone_tag).Trim()
echo ("CAPSTONE_TAG=" + $tag) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$dir = (nmake -nologo -f win32\Makefile capstone_dir).Trim()
echo ("CAPSTONE_DIR=" + $dir) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo ("VCVER=" + $env:VCToolsVersion) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache capstone
id: cache-capstone
uses: actions/cache@v3
with:
path: ${{ env.CAPSTONE_DIR }}
key: capstone-${{ matrix.arch }}-${{ env.CAPSTONE_TAG }}-${{ env.VCVER }}-0
- if: ${{ steps.cache-capstone.outputs.cache-hit != 'true' }}
name: Prepare capstone
shell: cmd
run: |
nmake -nologo -f win32\Makefile capstone
- name: Build
shell: cmd
run: nmake -nologo -f win32/Makefile
- name: Test
shell: cmd
run: |
nmake -nologo -f win32/Makefile test-ci