Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:
GO_VERSION: "1.22"
RIZIN_VERSION: "v0.8.0"
PYTHON_VERSION: "3.10"
RIZIN_DIR: "${{ github.workspace }}/rizin-build"
RZ_PM_DIR: "${{ github.workspace }}/rz-pm"

jobs:
build:
Expand Down Expand Up @@ -37,7 +39,6 @@ jobs:
meson_options: -Dportable=true -Db_vscrt=static_from_buildtype

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
Expand All @@ -47,15 +48,24 @@ jobs:
python3 -m pip install meson ninja
- uses: seanmiddleditch/gha-setup-vsdevenv@master
if: matrix.os == 'windows-latest'
- name: Install Rizin
- name: Cache rizin build dir
uses: actions/cache@v4
id: cache-rizin-build
with:
key: rizin-build-${{ matrix.os }}-${{ env.RIZIN_VERSION }}
path: ${{ env.RIZIN_DIR }}
- name: Build Rizin
if: steps.cache-rizin-build.outputs.cache-hit != 'true'
run: |
git clone https://github.com/rizinorg/rizin
cd rizin
git clone https://github.com/rizinorg/rizin ${{ env.RIZIN_DIR }}
cd ${{ env.RIZIN_DIR }}
git checkout ${{ env.RIZIN_VERSION }}
meson --buildtype=release --prefix=${{ matrix.prefix }} ${{ matrix.meson_options }} build
meson compile ${{ matrix.os == 'windows-latest' && '-j1' || '' }} -C build
- name: Install Rizin
run: |
cd ${{ env.RIZIN_DIR }}
${{ matrix.sudo }} meson install -C build
cd ..
- name: Add rizin dir to PATH
if: matrix.os == 'windows-latest'
run: |
Expand All @@ -67,13 +77,19 @@ jobs:
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
path: ${{ env.RZ_PM_DIR }}
- name: Run unit tests
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic
working-directory: ${{ env.RZ_PM_DIR }}
- name: Build the Go binary
run: go build
working-directory: ${{ env.RZ_PM_DIR }}
- name: Make sure jsdec is present in the database
run: ./rz-pm list | grep -q 'Converts asm to pseudo-C code'
working-directory: ${{ env.RZ_PM_DIR }}
- name: Install jsdec
run: ./rz-pm install jsdec
working-directory: ${{ env.RZ_PM_DIR }}
- name: Check jsdec
run: ls $(rizin -H RZ_USER_PLUGINS) | grep core_pdd
Loading