Install Capstone in CI and Docker native builds

This commit is contained in:
M. Mert Yildiran 2022-06-09 08:12:13 +03:00
parent c8a7f76980
commit 5c0017aff0
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
4 changed files with 17 additions and 4 deletions

View File

@ -26,6 +26,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y libpcap-dev
./devops/install-capstone.sh
- name: Check Agent modified files
id: agent_modified_files

View File

@ -35,6 +35,11 @@ jobs:
run: |
sudo apt-get install libpcap-dev
- name: Install Capstone
shell: bash
run: |
./devops/install-capstone.sh
- name: Check CLI modified files
id: cli_modified_files
run: devops/check_modified_files.sh cli/

View File

@ -25,7 +25,9 @@ RUN npm run build
### Base builder image for native builds architecture
FROM golang:1.17-alpine AS builder-native-base
ENV CGO_ENABLED=1 GOOS=linux
RUN apk add --no-cache libpcap-dev g++ perl-utils
RUN apk add --no-cache libpcap-dev g++ perl-utils git build-base bash
COPY devops/install-capstone.sh .
RUN ./install-capstone.sh
### Intermediate builder image for x86-64 to x86-64 native builds

View File

@ -1,6 +1,11 @@
#!/bin/bash
git clone https://github.com/capstone-engine/capstone.git -b 4.0.2 && \
git checkout capstone && \
SUDO=''
if (( $EUID != 0 )); then
SUDO='sudo'
fi
git clone https://github.com/capstone-engine/capstone.git -b 4.0.2 --depth 1 && \
cd capstone && \
./make.sh && \
sudo ./make.sh install
$SUDO ./make.sh install