mirror of
https://github.com/radareorg/r2ghidra.git
synced 2026-11-07 06:25:57 -10:00
158 lines
5.3 KiB
YAML
158 lines
5.3 KiB
YAML
name: ci
|
|
|
|
env:
|
|
R2V: 5.7.0
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
linux-acr-ok:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Installing radare2
|
|
run: ( git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2 && sys/install.sh /usr )
|
|
- name: Building r2ghidra with acr
|
|
run: ./preconfigure && ./configure --prefix=/usr && make -j4 ; make user-install
|
|
- name: Testing r2ghidra oneliner on home setup
|
|
run: R2_DEBUG=1 r2 -qc 'af;pdg' /bin/ls | tee a.txt && grep entry0 a.txt
|
|
- name: System-wide installation
|
|
run: make user-uninstall && sudo make install
|
|
- name: Testing r2ghidra oneliner on system wide install
|
|
run: R2_DEBUG=1 r2 -qc 'af;pdg' /bin/ls | tee a.txt && grep entry0 a.txt
|
|
- name: Packaging r2ghidra for Debian using Dockcross
|
|
run: make -C dist/debian
|
|
- name: Running Testsuite
|
|
run: make -C test || exit 0
|
|
- name: Uploading Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
# path: radare2/dist/debian/*/*.deb r2ghidra/dist/debian/*.deb
|
|
name: r2ghidra-${{env.R2V}}_amd64.deb
|
|
path: dist/debian/*.deb
|
|
|
|
linux-asan:
|
|
if: ${{ false }} # disable for now
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Installing radare2
|
|
# run: ( git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2 && sys/sanitize.sh --install /usr )
|
|
run: ( git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2 && sys/install.sh --install )
|
|
- name: Building r2ghidra with acr
|
|
run: ./preconfigure && ./configure && make asan && make -C src sleigh-build && make user-install
|
|
- name: Testing r2ghidra oneliner
|
|
run: |
|
|
r2 -qc 'af;pdg' /bin/ls | tee a.txt
|
|
grep entry0 a.txt
|
|
|
|
linux-meson:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Downloading Radare2 Debian packages
|
|
run: |
|
|
wget -O r2.deb https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2_${{env.R2V}}_amd64.deb
|
|
wget -O r2-dev.deb https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-dev_${{env.R2V}}_amd64.deb
|
|
- name: Installing Radare2
|
|
run: sudo dpkg -i r2.deb r2-dev.deb
|
|
- name: Installing User's Meson Ninja
|
|
run: pip install ninja meson && ninja --version && meson --version
|
|
- name: Installing System's Meson Ninja
|
|
run: sudo pip install ninja meson && sudo ninja --version && sudo meson --version
|
|
- name: Building r2ghidra with meson
|
|
run: ./preconfigure && meson b && ninja -C b && sudo ninja -C b install
|
|
- name: Cannot test meson builds, because those cant be installed yet
|
|
run: echo nada
|
|
# - name: Testing r2ghidra oneliner
|
|
# run: |
|
|
# r2 -H
|
|
# r2 -L
|
|
# R2_DEBUG=1 r2 -qc 'af;pdg' /bin/ls | tee a.txt
|
|
# grep entry0 a.txt
|
|
|
|
macos-acr-ok:
|
|
# The type of runner that the job will run on
|
|
runs-on: macos-latest
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Cloning Radare2 git repository
|
|
run: git clone --depth=1 https://github.com/radareorg/radare2
|
|
- name: Building Radare2 pkg for macOS
|
|
run: make -C radare2/dist/macos
|
|
- name: Install radare2 Package
|
|
run: sudo installer -pkg radare2/dist/macos/*.pkg -target /
|
|
- name: Building r2ghidra with acr
|
|
run: ./preconfigure && ./configure && make -j4 && make user-install
|
|
- name: Packaging r2ghidra
|
|
run: |
|
|
make -C dist/macos
|
|
make install DESTDIR=/tmp/r2ghidra && cd /tmp/r2ghidra && tar czvf ../r2ghidra-macos-${{env.R2V}}.tar.gz *
|
|
- name: Testing r2ghidra
|
|
run: |
|
|
r2 -qc 'af;pdg' /bin/ls | tee a.txt
|
|
grep iVar a.txt
|
|
- name: Pub
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: r2ghidra-${{env.R2V}}-macos.tar.gz
|
|
path: dist/macos/*.zip
|
|
#path: radare2/dist/macos/*.pkg src/*.dylib /tmp/r2ghidra-macos-${{env.R2V}}.tar.gz dist/macos/*.zip
|
|
|
|
w64:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7.x
|
|
- name: Preparing msvc toolchain
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: x64
|
|
- name: dependencies
|
|
shell: bash
|
|
run: |
|
|
pip install ninja meson wget
|
|
choco install zip
|
|
- name: install r2
|
|
shell: bash
|
|
run: |
|
|
python -m wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-${{env.R2V}}-w64.zip -o r2.zip
|
|
unzip r2.zip
|
|
mv radare2-${{env.R2V}}-w64 radare2
|
|
pwd
|
|
- name: batmake
|
|
shell: cmd
|
|
run: |
|
|
call preconfigure.bat
|
|
call configure.bat
|
|
call make.bat
|
|
mkdir destdir
|
|
copy w\*.dll destdir
|
|
cd destdir
|
|
zip -r ..\r2ghidra-w64.zip *
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: r2ghidra-${{env.R2V}}-w64.zip
|
|
path: r2ghidra-w64.zip
|