-
Notifications
You must be signed in to change notification settings - Fork 18
/
.cirrus.yml
204 lines (176 loc) · 6.63 KB
/
.cirrus.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
linux_arm64_task:
arm_container:
image: gcc:10.3.0-buster
env:
PATH: /usr/local/bin:${PATH}
install_script:
- apt-get -qq update
- apt-get install -y cmake
script:
- ./build.sh
test_script:
- (cd build; ctest -V)
linux_x64_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /usr/local/bin:${PATH}
script:
- ./build.sh
#test_script:
# - (cd build; ctest -V)
# targeting LG NC4/WebOS (ARM Cortex A9, glibc 2.12)
linux_lgtv_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /opt/arm-lgtv-linux-gnueabi_sdk-buildroot/bin:${PATH}
LD_LIBRARY_PATH: /opt/arm-lgtv-linux-gnueabi_sdk-buildroot/lib:${LD_LIBRARY_PATH}
script:
- ./build.sh /opt/arm-lgtv-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
linux_android_armel_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /usr/local/bin:/opt/android-ndk-r14b-android-9/bin:${PATH}
build_capstone_script:
- (
mkdir staging;
cd staging;
git clone -b 4.0.2 https://github.com/aquynh/capstone.git;
)
- ./targets/android_build_capstone.sh /opt/android-ndk-r14b-android-9 ./staging/capstone
script:
- ./build.sh ./targets/arm-android.cmake
-DEZ_LIBC=bionic
-DEZ_LIBC_VARIANT=android-10
-DANDROID_ABI=armeabi-v7a
-DCMAKE_SYSTEM_VERSION=9
-DUSE_ARM_THUMB=ON
-DCAPSTONE_PREFIX=$(readlink -f ./staging/capstone/out/usr)
linux_android_aarch64_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /usr/local/bin:/opt/android-ndk-r14b-android-21-arm64/bin:${PATH}
script:
- ./build.sh ./targets/arm64-android.cmake
-DEZ_LIBC=bionic
-DEZ_LIBC_VARIANT=android-10
-DANDROID_ABI=arm64-v8a
-DCMAKE_SYSTEM_VERSION=21
# targeting ADB Epicentro/DLink DVA 5592 (Broadcom Armv7)
linux_uclibc_armel_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /opt/arm-buildroot-linux-uclibcgnueabi/bin:${PATH}
LD_LIBRARY_PATH: /opt/arm-buildroot-linux-uclibcgnueabi/lib:${LD_LIBRARY_PATH}
script:
- ./build.sh ./targets/arm-buildroot-bcm-uclibc.cmake
# targeting Asus DSL-N55U D1 (TrendChip MIPS BE)
linux_uclibc_mipsbe_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /opt/trendchip/mips-linux-uclibc/usr/bin:${PATH}
script:
- ./build.sh ./targets/trendchip.cmake
# targeting TomTom GO
linux_glibc_armv4_task:
container:
dockerfile: .ci/linux/Dockerfile
env:
PATH: /opt/ttgo/gcc-3.3.4_glibc-2.3.2/bin:${PATH}
script:
- ./build.sh targets/ttgo-arm-linux.cmake
-DEZ_LIBC=glibc-old
freebsd_x64_task:
freebsd_instance:
image_family: freebsd-14-0
install_script:
- pkg update
- pkg install -y bash cmake capstone pkgconf
script:
- ./build.sh
test_script:
- (cd build; ctest -V)
windows_x64_task:
timeout_in: 90m
windows_container:
image: cirrusci/windowsservercore:2019
os_version: 2019
env:
CIRRUS_SHELL: powershell
MSYS: winsymlinks:nativestrict
MSYSTEM: MINGW64
MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2024-07-27/msys2-base-x86_64-20240727.sfx.exe
MSYS2_FINGERPRINT: 0
MSYS2_PACKAGES: "
diffutils git grep make pkgconf sed
mingw-w64-x86_64-binutils
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-capstone
"
CHERE_INVOKING: 1
msys2_cache:
folder: C:\tools\archive
reupload_on_changes: false
# These env variables are used to generate fingerprint to trigger the cache procedure
# If wanna to force re-populate msys2, increase MSYS2_FINGERPRINT
fingerprint_script:
- |
echo $env:CIRRUS_TASK_NAME
echo $env:MSYS2_URL
echo $env:MSYS2_FINGERPRINT
echo $env:MSYS2_PACKAGES
populate_script:
- |
md -Force C:\tools\archive\pkg
$start_time = Get-Date
bitsadmin /transfer msys_download /dynamic /download /priority FOREGROUND $env:MSYS2_URL C:\tools\archive\base.exe
Write-Output "Download time taken: $((Get-Date).Subtract($start_time))"
cd C:\tools
C:\tools\archive\base.exe -y
del -Force C:\tools\archive\base.exe
Write-Output "Base install time taken: $((Get-Date).Subtract($start_time))"
$start_time = Get-Date
((Get-Content -path C:\tools\msys64\etc\\post-install\\07-pacman-key.post -Raw) -replace '--refresh-keys', '--version') | Set-Content -Path C:\tools\msys64\etc\\post-install\\07-pacman-key.post
C:\tools\msys64\usr\bin\bash.exe -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
C:\tools\msys64\usr\bin\bash.exe -lc "export"
C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Sy
echo Y | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Suu --overwrite=*
taskkill /F /FI "MODULES eq msys-2.0.dll"
tasklist
C:\tools\msys64\usr\bin\bash.exe -lc "mv -f /etc/pacman.conf.pacnew /etc/pacman.conf || true"
C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syyuu --overwrite=*"
Write-Output "Core install time taken: $((Get-Date).Subtract($start_time))"
$start_time = Get-Date
C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed $env:MSYS2_PACKAGES"
Write-Output "Package install time taken: $((Get-Date).Subtract($start_time))"
$start_time = Get-Date
del -Force -ErrorAction SilentlyContinue C:\tools\msys64\etc\mtab
del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\fd
del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stderr
del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdin
del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdout
del -Force -Recurse -ErrorAction SilentlyContinue C:\tools\msys64\var\cache\pacman\pkg
tar cf C:\tools\archive\msys64.tar -C C:\tools\ msys64
Write-Output "Package archive time taken: $((Get-Date).Subtract($start_time))"
del -Force -Recurse -ErrorAction SilentlyContinue c:\tools\msys64
install_script:
- |
$start_time = Get-Date
cd C:\tools
ls C:\tools\archive\msys64.tar
tar xf C:\tools\archive\msys64.tar
Write-Output "Extract msys2 time taken: $((Get-Date).Subtract($start_time))"
script:
- C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build"
- C:\tools\msys64\usr\bin\bash.exe -lc "cd build && cmake .. -G 'MSYS Makefiles'"
- C:\tools\msys64\usr\bin\bash.exe -lc "cd build && cmake --build . -j $(nproc)"
- exit $LastExitCode
test_script:
- C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ctest -V"