Remove duktape and use QuickJS #188
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: r2dec CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Automatically cancel any previous workflow on new push. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
env: | |
R2V: 5.8.8 | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7.x | |
- name: apt dependencies | |
run: sudo pip3 install meson ninja | |
- name: install r2 | |
run: | | |
wget -q https://github.com/radareorg/radare2/releases/download/${R2V}/radare2_${R2V}_amd64.deb | |
wget -q https://github.com/radareorg/radare2/releases/download/${R2V}/radare2-dev_${R2V}_amd64.deb | |
sudo dpkg -i *.deb | |
- name: make build | |
run: | | |
meson build | |
sudo ninja -C build install | |
- name: test with javascript files | |
run: | | |
r2 -Qc 'Lc' malloc://10 | |
OUTPUT=$(r2 -Qc 'af;pdd' /bin/ls) | |
CHECK=$(echo -e "$OUTPUT" | grep "r2dec pseudo code output") | |
echo -e "$OUTPUT" | |
if [ -z "$CHECK" ]; then | |
exit 1 | |
fi | |
sudo ninja -C build uninstall | |
# - name: packaging | |
# run: make -C p/dist/debian | |
# - name: test deb | |
# run: | | |
# sudo dpkg -i p/dist/debian/*.deb | |
# dpkg-query -L r2dec | |
# r2 -Qc 'Lc' malloc://10 | |
# OUTPUT=$(r2 -Qc 'af;pdd' /bin/ls) | |
# CHECK=$(echo -e "$OUTPUT" | grep "r2dec pseudo code output") | |
# echo -e "$OUTPUT" | |
# if [ -z "$CHECK" ]; then | |
# exit 1 | |
# fi | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: r2dec-${{env.R2V}}_amd64.deb | |
# path: p/dist/debian/*.deb | |
# macos: | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: 3.7.x | |
# - name: homebrew dependencies | |
# run: | | |
# brew update | |
# brew install coreutils pkg-config | |
# pip3 install meson ninja | |
# - name: install r2 | |
# run: | | |
# wget -q https://github.com/radareorg/radare2/releases/download/${R2V}/radare2-x64-${R2V}.pkg | |
# sudo installer -pkg *.pkg -target / | |
# - name: packaging | |
# run: make -C p/dist/macos | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: r2dec-${{env.R2V}}-amd64.pkg | |
# path: p/dist/macos/r2dec*.pkg | |
w64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
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 winflexbison3 | |
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 | |
- name: meson | |
shell: cmd | |
run: | | |
set PKG_CONFIG_PATH=%CD%\radare2\lib\pkgconfig | |
set CFLAGS=-I%CD%\radare2\include | |
set LDFLAGS=-L%CD%\radare2\lib | |
set PATH=%CD%\radare2\bin;%PATH% | |
set DESTDIR=%CD%\r2dec-plugin | |
set BINDIR=%CD%\radare2\bin | |
set PLUGINDIR=%CD%\radare2\lib\plugins | |
set ARCH=x64 | |
set R2_DEBUG=1 | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
meson --buildtype=release build | |
ninja -C build | |
mkdir %DESTDIR% | |
copy build\*.dll %DESTDIR% | |
mkdir "%PLUGINDIR%" | |
copy build\*.dll "%PLUGINDIR%" | |
cd %BINDIR% | |
radare2.exe -Qc "pdd? ; aa ; pdd" radare2.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: r2dec-${{env.R2V}}-w64.zip | |
path: r2dec-plugin | |
w32: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7.x | |
- name: Preparing msvc toolchain | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x86 | |
- name: dependencies | |
shell: bash | |
run: | | |
pip install ninja meson wget | |
choco install winflexbison3 | |
choco install zip | |
- name: install r2 | |
shell: bash | |
run: | | |
python -m wget https://github.com/radareorg/radare2/releases/download/${R2V}/radare2-${R2V}-w32.zip -o r2.zip | |
unzip r2.zip | |
mv radare2-${R2V}-w32 radare2 | |
- name: meson | |
shell: cmd | |
run: | | |
set PKG_CONFIG_PATH=%CD%\radare2\lib\pkgconfig | |
set CFLAGS=-I%CD%\radare2\include | |
set LDFLAGS=-L%CD%\radare2\lib | |
set PATH=%CD%\radare2\bin;%PATH% | |
set DESTDIR=%CD%\r2dec-plugin | |
set BINDIR=%CD%\radare2\bin | |
set PLUGINDIR=%CD%\radare2\lib\plugins | |
set ARCH=x86 | |
set R2_DEBUG=1 | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 | |
meson --buildtype=release build | |
ninja -C build | |
mkdir %DESTDIR% | |
copy build\*.dll %DESTDIR% | |
mkdir "%PLUGINDIR%" | |
copy build\*.dll "%PLUGINDIR%" | |
cd %BINDIR% | |
radare2.exe -Qc "pdd? ; aa ; pdd" radare2.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: r2dec-${{env.R2V}}-w32.zip | |
path: r2dec-plugin |