Composite GitHub Action to install radare2 in CI workflows. Supports Linux, macOS and Windows runners, with options to install from release packages or build from git source.
Reference the action from your workflow:
- uses: radareorg/github-actions@master| Input | Description | Default |
|---|---|---|
version |
Radare2 version to install (e.g., 6.1.2). Empty for latest. |
"" (latest) |
from-git |
Build from git source instead of release packages. | false |
prefix |
Installation prefix. | /usr |
| Output | Description |
|---|---|
version |
Installed radare2 version |
prefix |
Installation prefix path |
steps:
- uses: radareorg/github-actions@mastersteps:
- uses: radareorg/github-actions@master
with:
version: '6.1.2'steps:
- uses: radareorg/github-actions@master
with:
from-git: truesteps:
- uses: radareorg/github-actions@master
with:
version: '6.1.2'
from-git: truesteps:
- uses: radareorg/github-actions@master
with:
from-git: true
prefix: '/opt/radare2'name: CI
on:
push:
branches: ['**']
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
build_system: [make, meson]
exclude:
- os: windows-latest
build_system: make
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: radareorg/github-actions@master
id: r2
- name: Build with Make
if: matrix.build_system == 'make'
run: make
- name: Setup Meson
if: matrix.build_system == 'meson'
run: pip install meson ninja --break-system-packages
- name: Build with Meson
if: matrix.build_system == 'meson'
run: |
meson setup build
meson compile -C buildsteps:
- uses: radareorg/github-actions@master
id: r2
- run: echo "Installed r2 ${{ steps.r2.outputs.version }} at ${{ steps.r2.outputs.prefix }}"The operating system is auto-detected from the runner:
- Linux - Downloads and installs
.debpackages (radare2+radare2-dev). Architecture is detected viadpkg --print-architecture. - macOS - Downloads and installs
.pkgpackage. Detectsarm64vsx86_64automatically. - Windows - Downloads and extracts the
.ziprelease using PowerShell, handles nested subdirectories automatically, then addsbin/toPATH.
When from-git is true, the action clones the radare2 repository and builds from source using sys/install.sh on Unix or meson/ninja on Windows.
- Windows git builds use meson/ninja and require a Visual C++ environment. Add
ilammy/msvc-dev-cmd@v1before this action if building from source on Windows. - Both
radare2andradare2-devpackages are installed on Linux so headers and pkg-config files are available for building plugins. - The action verifies the installation by running
radare2 -vat the end. - Use
concurrencywithcancel-in-progress: trueto avoid wasting CI minutes on superseded pushes. - Use
fail-fast: falsein matrix builds so a failure on one platform doesn't cancel the others.