Reintroduce RBinPlugin->{init/fini} for plugins that need to initialize a third party global runtime ##bin #8940
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: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
# WASI | |
linux-wasi: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Installing with symlinks | |
run: sys/wasi.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: linux-wasi | |
path: radare2-*-wasi.zip | |
# Source Tarballs | |
tarball: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Creating zip and tarball | |
run: sys/tarball.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: tarball | |
path: radare2-?.?.?.* | |
# Linux | |
linux-static: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Installing the musl runtime | |
run: | | |
sudo apt update --assume-yes | |
sudo apt install --assume-yes musl-tools | |
- name: Building static r2 with acr | |
run: | | |
cp -f dist/plugins-cfg/plugins.static.nogpl.cfg plugins.cfg | |
NOLTO=1 sys/static.sh | |
# NOLTO=1 sys/static.sh | |
make -C binr/blob | |
tar cJvf r2-static.tar.xz r2-static | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-static | |
path: r2-static.tar.xz | |
linux-acr-rpm-64: | |
# if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Packaging for Debian | |
run: make -C dist/rpm | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-acr-rpm-64 | |
path: dist/rpm/*.rpm | |
linux-acr-deb-64: | |
# if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Packaging for Debian | |
run: | | |
gcc -v | |
export CFLAGS="-Werror" | |
sys/debian.sh | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-acr-deb-64 | |
path: dist/debian/*/*.deb | |
linux-acr-deb-arm64: | |
# if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Installing crosscompiler | |
run: | | |
sudo apt update --assume-yes | |
sudo apt install --assume-yes gcc-aarch64-linux-gnu | |
- name: Packaging for Debian | |
run: gcc -v ; sys/debian.sh arm64 | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-acr-deb-arm64 | |
path: dist/debian/*/*.deb | |
linux-acr-deb-32: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Packaging for 32bit Debian | |
run: | | |
sudo apt update --assume-yes | |
sudo apt install -y gcc-multilib gperf | |
export CFLAGS="-m32 -Werror" | |
export LDFLAGS=-m32 | |
export ARCH=i386 | |
sys/debian.sh | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-acr-deb-32 | |
path: dist/debian/*/*.deb | |
## RPM PACKAGES DISABLED | |
# linux-meson-rpm: | |
# runs-on: ubuntu:20.04 | |
# container: centos:8 | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Prepare Skeleton | |
# run: | | |
# mkdir -p SOURCES SPECS | |
# cp -f dist/rpm/*spec SPECS | |
# wget -O https://github.com/radareorg/radare2/archive/master/radare2-5.1.0-git.tar.gz | |
# - name: rpmbuild | |
# uses: robertdebock/rpmbuild-action@1.1.1 | |
# - name: Pub | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: linux-meson-rpm | |
# path: RPMS/*/*.rpm *.rpm dist/rpm/*.rpm | |
# | |
# centos-meson-rpm: | |
# runs-on: ubuntu:20.04 | |
# container: centos:8 | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Install tools for CentOS:8 | |
# run: | | |
# yum install -y patch unzip git gcc make python38 python38-pip rpm-build rpmdevtools wget | |
# pip3.8 install meson ninja r2pipe | |
# - name: Building with Meson | |
# run: | | |
# meson build | |
# ninja -C build | |
# ninja -C build install | |
# - name: RPM Packaging | |
# run: | | |
# cp -f dist/rpm/radare2.spec . | |
# rpmdev-setuptree | |
# mkdir -p rpmbuild/SOURCES | |
# cd rpmbuild/SOURCES | |
# wget https://github.com/radareorg/radare2/archive/5860c3efc12d4b75e72bdce4b1d3834599620913/radare2-5.1.0-git.tar.gz | |
# cd - | |
# rpmbuild -ba radare2.spec | |
# - name: Pub | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: centos-meson-rpm | |
# path: rpmbuild/RPMS/*/*.rpm | |
# | |
# macOS | |
macos-acr-x64: | |
runs-on: macos-11 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install pkg-config | |
run: brew install pkg-config | |
- name: Packaging | |
run: dist/macos/build-pkg.sh | |
# - name: Building Radare2 | |
# run: | | |
# export CFLAGS="-O2" # -Werror -Wno-unused-result -Wno-unicode -Wno-unneeded-internal-declaration" | |
# sys/install.sh && make -C dist/macos | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/macos/*.pkg | |
name: macos-acr-x64 | |
macos-acr-m1: | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install pkg-config with Homebrew | |
run: brew install pkg-config | |
- name: Packaging | |
env: | |
ARCHFLAGS: '-arch arm64' | |
run: export CC="gcc -arch arm64" ; dist/macos/build-pkg.sh | |
- name: Pub | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/macos/*.pkg | |
name: macos-acr-m1 | |
ios-cydia32: | |
if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pkg-config/ldid2 with Homebrew | |
run: brew install pkg-config ldid | |
- name: Create cydia32 package | |
run: ./sys/ios-cydia32.sh | |
- name: List sys/cydia | |
run: ls -lahR ./dist/cydia | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ios-cydia32 | |
path: ./dist/cydia/radare2/radare2-arm32_*_iphoneos-arm.deb | |
ios-cydia: | |
if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pkg-config/ldid2 with Homebrew | |
run: brew install pkg-config ldid | |
- name: Create cydia package | |
run: ./sys/ios-cydia.sh | |
- name: Create iOS SDK | |
run: | | |
./sys/ios-sdk.sh | |
pushd /tmp/r2ios | |
zip -r /tmp/r2ios-sdk.zip * | |
popd | |
mv /tmp/r2ios-sdk.zip . | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ios-cydia | |
path: | | |
./r2ios-sdk.zip | |
./dist/cydia/radare2*/*.deb | |
# Android | |
android-acr-aarch64: | |
if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get --assume-yes update | |
sudo apt-get --assume-yes install pax wget gperf cabextract unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja | |
- name: Compile with acr | |
run: | | |
sys/android-ndk-install.sh | |
sys/android-build.sh arm64 | |
ls -l | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android-acr-aarch64 | |
path: radare2*android*aarch64.tar.gz | |
android-acr-arm: | |
if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get --assume-yes update | |
sudo apt-get --assume-yes install pax wget gperf cabextract unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja | |
- name: Compile with acr | |
run: | | |
sys/android-ndk-install.sh 16 arm | |
sys/android-build.sh arm | |
ls -l | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android-acr-arm | |
path: radare2*android*arm.tar.gz | |
# disabled because the ndk link is broken for a while | |
android-meson: | |
if: contains(github.ref, 'android') | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# name: [x86_64, arm, aarch64] | |
name: [x86_64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get --assume-yes update | |
sudo apt-get --assume-yes install pax wget cabextract unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja | |
- name: Compile with meson | |
run: | | |
export PATH=${HOME}/.local/bin:${PATH} | |
CFLAGS="-static" LDFLAGS="-static" meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dblob=true build --cross-file .github/meson-android-${{ matrix.name }}.ini | |
ninja -C build && ninja -C build install | |
- name: Create radare2-android-${{ matrix.name }}.tar.gz | |
run: | | |
cd /tmp | |
rm -rf android-dir/include android-dir/lib | |
tar --transform 's/android-dir/data\/data\/org.radareorg.radare2installer/g' -czvf radare2-android-${{ matrix.name }}.tar.gz android-dir/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android-meson-${{ matrix.name }} | |
path: /tmp/radare2-android-${{ matrix.name }}.tar.gz | |
# Windows | |
w32-meson: | |
if: contains(github.ref, 'master') || contains(github.ref, 'ci-') | |
runs-on: windows-2019 | |
steps: | |
- name: Win configure Pagefile | |
uses: al-cheb/configure-pagefile-action@v1.3 | |
with: | |
minimum-size: 16GB | |
maximum-size: 16GB | |
disk-root: "C:" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee | |
pip install ninja r2pipe wget | |
- name: Extract r2 version | |
shell: bash | |
run: echo "branch=`sys/version.py -n`" >> $GITHUB_OUTPUT | |
id: r2v | |
- name: Build with meson + ninja | |
shell: pwsh | |
run: | | |
.github\vsdevenv.ps1 | |
meson --buildtype=release --prefix=$PWD\radare2-${{ steps.r2v.outputs.branch }}-w32 build | |
ninja -C build -j1 install | |
- name: Create zip artifact | |
run: 7z a radare2-${{ steps.r2v.outputs.branch }}-w32.zip $PWD\radare2-${{ steps.r2v.outputs.branch }}-w32 | |
# - uses: actions/checkout@v3 | |
# with: | |
# repository: radareorg/radare2-win-installer | |
# path: ./radare2-win-installer | |
# - name: Extract r2 version | |
# run: echo "branch=`sys/version.py -n`" >> $GITHUB_OUTPUT | |
# id: extract_version | |
# - name: Create installer | |
# shell: pwsh | |
# run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: w32-meson | |
path: | | |
radare2-${{ steps.r2v.outputs.branch }}-w32.zip | |
# radare2-win-installer\Output\radare2.exe | |
w64-static-2022: | |
runs-on: windows-2022 | |
steps: | |
- name: Win configure Pagefile | |
uses: al-cheb/configure-pagefile-action@v1.3 | |
with: | |
minimum-size: 16GB | |
maximum-size: 16GB | |
disk-root: "C:" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Preparing nmake | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee | |
pip install ninja r2pipe wget r2env | |
- name: preconfigure | |
continue-on-error: true | |
shell: cmd | |
run: preconfigure | |
- name: Build with meson + ninja | |
shell: cmd | |
run: | | |
call configure static | |
call make | |
- name: Test executable | |
continue-on-error: true | |
shell: cmd | |
run: | | |
cd prefix\bin | |
r2blob -v | |
- uses: actions/upload-artifact@v3 | |
continue-on-error: true | |
with: | |
name: w64-static-2022 | |
path: prefix\bin\r2blob.static.exe | |
w64-static: | |
runs-on: windows-2019 | |
steps: | |
- name: Win configure Pagefile | |
uses: al-cheb/configure-pagefile-action@v1.3 | |
with: | |
minimum-size: 16GB | |
maximum-size: 16GB | |
disk-root: "C:" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Preparing nmake | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee | |
pip install ninja r2pipe wget r2env | |
- name: Extract r2 version | |
shell: bash | |
run: echo "branch=`sys/version.py -n`" >> $GITHUB_OUTPUT | |
id: r2v | |
- name: Build with meson + ninja | |
shell: cmd | |
run: | | |
REM preconfigure | |
call configure static | |
call make | |
- name: Test executable | |
continue-on-error: true | |
shell: cmd | |
run: | | |
cd prefix\bin | |
r2blob -v | |
- name: Zipping Executable | |
shell: cmd | |
run: | | |
cd prefix\bin | |
dir | |
7z a r2blob-${{ steps.r2v.outputs.branch }}-w64.zip r2blob.static.exe | |
- uses: actions/upload-artifact@v3 | |
continue-on-error: true | |
with: | |
name: w64-static | |
path: prefix\bin\r2blob-${{ steps.r2v.outputs.branch }}-w64.zip | |
w64-meson: | |
runs-on: windows-2019 | |
steps: | |
- name: Win configure Pagefile | |
uses: al-cheb/configure-pagefile-action@v1.3 | |
with: | |
minimum-size: 16GB | |
maximum-size: 16GB | |
disk-root: "C:" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Preparing nmake | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee | |
pip install ninja r2pipe wget | |
- name: Extract r2 version | |
shell: bash | |
run: echo "branch=`sys/version.py -n`" >> $GITHUB_OUTPUT | |
id: r2v | |
- name: Build with meson + ninja | |
shell: pwsh | |
run: | | |
# cmd '/c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" "x86_64"' | |
bash sys/source_bat.bash 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat' "x86_64" | |
# meson_options: --default-library=shared|static -Dstatic_runtime=true --backend vs2019 | |
meson --buildtype=release --prefix=$PWD\radare2-${{ steps.r2v.outputs.branch }}-w64 build | |
ninja -C build -j 1 | |
ninja -C build install | |
- name: Create zip artifact | |
run: 7z a radare2-${{ steps.r2v.outputs.branch }}-w64.zip $PWD\radare2-${{ steps.r2v.outputs.branch }}-w64 | |
# - uses: actions/checkout@v3 | |
# with: | |
# repository: radareorg/radare2-win-installer | |
# path: ./radare2-win-installer | |
# - name: Create installer | |
# shell: pwsh | |
# run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: w64-meson | |
path: | | |
radare2-${{ steps.r2v.outputs.branch }}-w64.zip | |
# radare2-win-installer\Output\radare2.exe | |
# FreeBSD | |
# freebsd: | |
# runs-on: macos-10.15 | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Build r2 in FreeBSD | |
# id: build | |
# uses: vmactions/freebsd-vm@v0.1.6 | |
# with: | |
# usesh: true | |
# prepare: pkg install -y curl gmake patch git python gawk | |
# run: | | |
# cd work || true | |
# pwd | |
# ls -lah | |
# whoami | |
# env | |
# freebsd-version | |
# echo DATE: ; date | |
# pip install r2pipe | |
# sys/install.sh | |
# gmake install DESTDIR=/tmp/prefix | |
# (cd /tmp/prefix ; tar czvf /tmp/radare2-freebsd.tgz *) | |
# r2r test/db/cmd | |
# rm -rf * .git* | |
# cp /tmp/radare2-freebsd.tgz . | |
# echo DATE: ; date | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: freebsd | |
# path: radare2-freebsd.tgz | |
# R2_590 - uncomment after the 590 release | |
# check_abi_compatibility: | |
# needs: | |
# - linux-static | |
# runs-on: ubuntu-latest | |
# defaults: | |
# run: | |
# shell: bash | |
# working-directory: /tmp | |
# steps: | |
# - name: Install dependencies | |
# run: | | |
# # sudo apt install --assume-yes abigail-tools wget | |
# # ubuntu-latest is TOO OLD and it ships abigail 2.0 which is known to be buggy | |
# wget https://ftp.fau.de/debian/pool/main/liba/libabigail/libabigail0_2.2-2_amd64.deb | |
# sudo dpkg -i libabigail0_2.2-2_amd64.deb | |
# wget https://ftp.fau.de/debian/pool/main/liba/libabigail/libabigail-dev_2.2-2_amd64.deb | |
# sudo dpkg -i libabigail-dev_2.2-2_amd64.deb | |
# wget https://ftp.fau.de/debian/pool/main/liba/libabigail/abigail-tools_2.2-2_amd64.deb | |
# sudo dpkg -i abigail-tools_2.2-2_amd64.deb | |
# - name: Download Build | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: linux-static | |
# path: /tmp | |
# - name: Download latest release | |
# run: | | |
# DOWNLOAD_URL=$(curl -s \ | |
# --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
# https://api.github.com/repos/radareorg/radare2/releases/latest \ | |
# | jq -r '.assets[] | select(.name | startswith("radare2")) | select(.name | endswith("static.tar.xz")) | .browser_download_url') | |
# wget -O r2-static-latest.tar.xz $DOWNLOAD_URL | |
# - name: Untar | |
# run: | | |
# mkdir r2-static | |
# tar -xvf r2-static.tar.xz -C r2-static --strip-components=1 | |
# mkdir r2-static-latest | |
# tar -xvf r2-static-latest.tar.xz -C r2-static-latest --strip-components=1 | |
# - name: ABI compatibility check | |
# run: | | |
# A=abidiff.conf | |
# echo '[suppress_function]' > $A | |
# echo 'name_regexp = .*java.*' >> $A | |
# echo '[suppress_function]' >> $A | |
# echo 'name_not_regexp = ^r_.*' >> $A | |
# echo '[suppress_function]' >> $A | |
# echo 'name_regexp = r_bin_add_import' >> $A | |
# echo '[suppress_variable]' >> $A | |
# echo 'name_not_regexp = ^r_.*' >> $A | |
# for lib in r2-static-latest/usr/lib/libr_*.so; do | |
# echo $lib ; abidiff --suppr $A ${lib} r2-static/usr/lib/$(basename ${lib}); | |
# done | |
# Release creation | |
check_release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
outputs: | |
is_release: ${{ steps.release.outputs.is }} | |
tag_name: ${{ steps.release.outputs.tag }} | |
needs: | |
- linux-acr-deb-64 | |
- linux-acr-deb-arm64 | |
- linux-acr-deb-32 | |
- w64-static | |
- w64-meson | |
- w32-meson | |
- macos-acr-x64 | |
- macos-acr-m1 | |
- ios-cydia | |
- ios-cydia32 | |
- ios-cydia | |
- android-acr-arm | |
- android-acr-aarch64 | |
- linux-static | |
- linux-wasi | |
# - freebsd | |
# - android-meson | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Download all git history and tags | |
- name: Check if is a release | |
run: | | |
TAG="`git describe --exact-match --tags ${{ github.sha }} || true`" | |
if [ -n "$TAG" ]; then | |
echo "tag=$TAG" >> $GITHUB_OUTPUT | |
echo "is=yes" >> $GITHUB_OUTPUT | |
else | |
echo "is=no" >> $GITHUB_OUTPUT | |
fi | |
id: release | |
release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.check_release.outputs.is_release == 'yes' }} | |
needs: | |
- check_release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Download all git history and tags | |
- name: Extract r2 version | |
shell: bash | |
run: echo "branch=`sys/version.py -n`" >> $GITHUB_OUTPUT | |
id: r2v | |
- name: Prepare release notes | |
run: ./sys/release-notes.sh | tee ./RELEASE_NOTES.md | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: dist/artifacts | |
- name: Create GitHub release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.check_release.outputs.tag_name }} | |
release_name: ${{ steps.r2v.outputs.branch }} | |
body_path: ./RELEASE_NOTES.md | |
draft: false | |
prerelease: false | |
- name: Upload asset for Debian (amd64) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-acr-deb-64/radare2/radare2_${{ steps.r2v.outputs.branch }}_amd64.deb | |
asset_name: radare2_${{ steps.r2v.outputs.branch }}_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for Debian (arm64) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-acr-deb-arm64/radare2/radare2_${{ steps.r2v.outputs.branch }}_arm64.deb | |
asset_name: radare2_${{ steps.r2v.outputs.branch }}_arm64.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload prefetched tarball (source) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/tarball/radare2-${{ steps.r2v.outputs.branch }}.tar.xz | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}.tar.xz | |
asset_content_type: application/x-txz | |
- name: Upload prefetched zip (source) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/tarball/radare2-${{ steps.r2v.outputs.branch }}.zip | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}.zip | |
asset_content_type: application/x-zip | |
- name: Upload asset for Debian (i386) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-acr-deb-32/radare2/radare2_${{ steps.r2v.outputs.branch }}_i386.deb | |
asset_name: radare2_${{ steps.r2v.outputs.branch }}_i386.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for Windows (w64) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/w64-meson/radare2-${{ steps.r2v.outputs.branch }}-w64.zip | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-w64.zip | |
asset_content_type: application/zip | |
- name: Upload asset for Windows (w32) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/w32-meson/radare2-${{ steps.r2v.outputs.branch }}-w32.zip | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-w32.zip | |
asset_content_type: application/zip | |
- name: Upload asset for macOS-x64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/macos-acr-x64/radare2-x64-${{ steps.r2v.outputs.branch }}.pkg | |
asset_name: radare2-x64-${{ steps.r2v.outputs.branch }}.pkg | |
asset_content_type: application/x-xar | |
- name: Upload asset for macOS-m1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/macos-acr-m1/radare2-m1-${{ steps.r2v.outputs.branch }}.pkg | |
asset_name: radare2-m1-${{ steps.r2v.outputs.branch }}.pkg | |
asset_content_type: application/x-xar | |
- name: Upload asset for iPhoneOS (arm) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/ios-cydia/dist/cydia/radare2/radare2_${{ steps.r2v.outputs.branch }}_iphoneos-arm.deb | |
asset_name: radare2_${{ steps.r2v.outputs.branch }}_iphoneos-arm.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for iPhoneOS (arm32) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/ios-cydia32/radare2-arm32_${{ steps.r2v.outputs.branch }}_iphoneos-arm.deb | |
asset_name: radare2-arm32_${{ steps.r2v.outputs.branch }}_iphoneos-arm.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for iOS SDK | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/ios-cydia/r2ios-sdk.zip | |
asset_name: r2ios-sdk-${{ steps.r2v.outputs.branch }}.zip | |
asset_content_type: application/zip | |
- name: Upload asset for Android (arm) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/android-acr-arm/radare2-${{ steps.r2v.outputs.branch }}-android-arm.tar.gz | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-android-arm.tar.gz | |
asset_content_type: application/gzip | |
# - name: Upload asset for Android (x86_64) | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: dist/artifacts/android-meson-x86_64/radare2-android-x86_64.tar.gz | |
# asset_name: radare2-${{ steps.r2v.outputs.branch }}-android-x86_64.tar.gz | |
# asset_content_type: application/x-tar | |
- name: Upload asset for Android (aarch64) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/android-acr-aarch64/radare2-${{ steps.r2v.outputs.branch }}-android-aarch64.tar.gz | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-android-aarch64.tar.gz | |
asset_content_type: application/gzip | |
- name: Upload asset for Linux (static) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-static/r2-static.tar.xz | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-static.tar.xz | |
asset_content_type: application/x-xz | |
- name: Upload asset for Debian dev (amd64) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-acr-deb-64/radare2-dev/radare2-dev_${{ steps.r2v.outputs.branch }}_amd64.deb | |
asset_name: radare2-dev_${{ steps.r2v.outputs.branch }}_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for Debian dev (i386) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-acr-deb-32/radare2-dev/radare2-dev_${{ steps.r2v.outputs.branch }}_i386.deb | |
asset_name: radare2-dev_${{ steps.r2v.outputs.branch }}_i386.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload asset for WASI | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/linux-wasi/radare2-${{ steps.r2v.outputs.branch }}-wasi.zip | |
asset_name: radare2-${{ steps.r2v.outputs.branch }}-wasi.zip | |
asset_content_type: application/zip | |
# - name: Upload asset for FreeBSD | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: dist/artifacts/freebsd/radare2-freebsd.tgz | |
# asset_name: radare2-${{ steps.r2v.outputs.branch }}-freebsd.tgz | |
# asset_content_type: application/gzip | |
- name: Upload asset for Windows (w64-blob) | |
continue-on-error: true | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/w64-static/r2blob.zip | |
asset_name: r2blob-${{ steps.r2v.outputs.branch }}-w64.zip | |
asset_content_type: application/zip |