Fix #14 - Add -T flag for testing oneliners #99
Workflow file for this run
This file contains hidden or 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: ci | |
env: | |
R2V: 6.0.2 | |
ZIP_PREFIX: radare2-mcp- | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "[0-9]*" | |
pull_request: | |
jobs: | |
r2git: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Installing radare2 from git | |
run: ( git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2 && sys/install.sh /usr ) | |
- name: Building radare2-mcp | |
run: ./configure && make | |
- name: Create Linux zip archive | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p release | |
zip -j release/${ZIP_PREFIX}${{ github.ref_name }}-linux-x64.zip r2mcp | |
- name: Upload Linux binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x64-binary | |
path: release/${ZIP_PREFIX}${{ github.ref_name }}-linux-x64.zip | |
linux-deb: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Installing radare2 from deb | |
run: | | |
wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2_${{env.R2V}}_amd64.deb | |
wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-dev_${{env.R2V}}_amd64.deb | |
sudo dpkg -i *.deb | |
- name: Building radare2-mcp | |
run: ./configure && make | |
- name: Building Debian package | |
if: startsWith(github.ref, 'refs/tags/') | |
run: make -C dist/debian | |
- name: List Debian package files | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ls -la dist/debian/*.deb | |
- name: Upload Debian package | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: debian-package | |
path: dist/debian/*.deb | |
macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64, arm64] | |
env: | |
ARCH: ${{ matrix.arch }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cloning radare2 | |
run: git clone --depth=1 --branch "${{env.R2V}}" https://github.com/radareorg/radare2 | |
- name: Building and installing radare2 | |
run: | | |
cd radare2 | |
sys/install.sh | |
- name: Building radare2-mcp | |
run: ./configure && make | |
- name: Create macOS zip archive | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p release | |
zip -j release/${ZIP_PREFIX}${{ github.ref_name }}-macos-${{ matrix.arch }}.zip r2mcp | |
- name: Upload macOS binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-${{ matrix.arch }}-binary | |
path: release/${ZIP_PREFIX}${{ github.ref_name }}-macos-${{ matrix.arch }}.zip | |
release: | |
needs: [r2git, linux-deb, macos] | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: release-artifacts | |
- name: List downloaded artifacts | |
run: find release-artifacts -type f | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
release-artifacts/**/*.zip | |
release-artifacts/**/*.deb | |
generate_release_notes: true |