Files
r2ghidra/.github/workflows/ci.yml
T
pancake f865f92eca Use ghidra-native and remove the huge ghidra submodule
* 20MB repo instead of 600MB
* Apply the minimum required patches to work with r2ghidra
* Add STM8 support
* Fix crash happening in bc/6994 binary
* Bump version to 5.3.1
2021-06-04 12:36:57 +02:00

160 lines
5.3 KiB
YAML

name: ci
env:
R2V: 5.3.0
on:
push:
branches:
- master
pull_request:
jobs:
linux-acr:
# 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/install.sh /usr )
- name: Building r2ghidra with acr
run: git submodule update --init ; ./configure ; make -j4 ; make user-install
- name: Packaging r2ghidra for Debian
run: make -C scripts/debian
- name: Testing r2ghidra oneliner
run: r2 -qc 'af;pdg' /bin/ls || exit 0
- name: Testing r2ghidra
run: make -C test || exit 0
- name: Pub
uses: actions/upload-artifact@v2
with:
# path: radare2/dist/debian/*/*.deb r2ghidra/scripts/debian/*.deb
name: r2ghidra-${{env.R2V}}_amd64.deb
path: scripts/debian/*.deb
linux-asan:
# 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: git submodule update --init ; ./configure ; make asan ; make -C src sleigh-build; make user-install
- name: Testing r2ghidra oneliner
run: r2 -qc 'af;pdg' /bin/ls || exit 0
linux-cmake:
# 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: Cloning Repo
run: git clone --depth=1 https://github.com/radareorg/radare2
- name: Packaging Radare2 for Debian
# run: make -C radare2/dist/debian
run: ( cd radare2 && sys/debian.sh )
- name: Installing Radare2
run: sudo dpkg -i radare2/dist/debian/*/*.deb
- name: Building r2ghidra with cmake
run: git submodule update --init ; make ghidra/ghidra/Ghidra ; mkdir build && cd build && cmake .. && make -j4 && sudo make install
- name: Packaging r2ghidra for Debian
run: make -C scripts/debian
- name: Testing r2ghidra oneliner
run: r2 -qc 'af;pdg' /bin/ls || exit 0
#- name: Testing r2ghidra
# run: make -C test || exit 0
- name: Pub
uses: actions/upload-artifact@v2
with:
name: r2ghidra-${{env.R2V}}_amd64_cmake.deb
path: radare2/dist/debian/*/*.deb scripts/debian/*.deb
# path: scripts/debian/*.deb
macos-acr:
# 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 Repo
run: git clone --depth=1 https://github.com/radareorg/radare2
- name: Packaging Radare2 for macOS
run: make -C radare2/dist/macos
- name: Install radare2 Package
run: sudo installer -pkg radare2/dist/macos/*.pkg -target /
- name: Building r2ghidra
run: git submodule update --init ; ./configure ; make -j4 ; make user-install
- name: Packaging r2ghidra
run: 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
- name: Pub
uses: actions/upload-artifact@v2
with:
name: r2ghidra-${{env.R2V}}-macos.tar.gz
path: radare2/dist/macos/*.pkg src/*.dylib /tmp/r2ghidra-macos-${{env.R2V}}.tar.gz
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/${R2V}/radare2-${R2V}-w64.zip -o r2.zip
unzip r2.zip
mv radare2-${R2V}-w64 radare2
pwd
- name: make
shell: cmd
run: |
cd
set PKG_CONFIG_PATH=%CD%\radare2\lib\pkgconfig
set PATH=%CD%\radare2\bin;%PATH%
set ARCH=x64
git submodule update --init
make ghidra/ghidra/Ghidra
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
mkdir destdir build
cd build
cmake -GNinja ..
cmake --build .
copy *.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