mirror of
https://github.com/mandiant/capa.git
synced 2026-01-01 23:40:08 -08:00
ci: add configuration for idalib tests
This commit is contained in:
49
.github/workflows/tests.yml
vendored
49
.github/workflows/tests.yml
vendored
@@ -217,3 +217,52 @@ jobs:
|
||||
exit_code=$(cat ../output.log | grep exit | awk '{print $NF}')
|
||||
exit $exit_code
|
||||
|
||||
idalib-tests:
|
||||
name: IDA tests for ${{ matrix.python-version }}
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [tests]
|
||||
env:
|
||||
IDA_LICENSE_ID: ${{ secrets.IDA_LICENSE_ID }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.13"]
|
||||
ida:
|
||||
- version: 9.0
|
||||
slug: "release/9.0/ida-essential/ida-essential_90_x64linux.run"
|
||||
- version: 9.2
|
||||
slug: "release/9.2/ida-essential/ida-essential_92_x64linux.run"
|
||||
steps:
|
||||
- name: Checkout capa with submodules
|
||||
# do only run if IDA_LICENSE_ID is available, have to do this in every step, see https://github.com/orgs/community/discussions/26726#discussioncomment-3253118
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup uv
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
uses: astral-sh/setup-uv@v6
|
||||
- name: Install dependencies
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
run: sudo apt-get install -y libyaml-dev
|
||||
- name: Install capa
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -e .[dev,scripts]
|
||||
pip install idapro
|
||||
- name: Install IDA ${{ matrix.ida.version }}
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
run: |
|
||||
uv run hcli --disable-updates ida install --download-id ${{ matrix.ida.slug }} --license-id ${{ secrets.IDA_LICENSE_ID }} --set-default --yes
|
||||
env:
|
||||
HCLI_API_KEY: ${{ secrets.HCLI_API_KEY }}
|
||||
IDA_LICENSE_ID: ${{ secrets.IDA_LICENSE_ID }}
|
||||
- name: Run tests
|
||||
if: ${{ env.IDA_LICENSE_ID != 0 }}
|
||||
run: pytest -v tests/test_idalib_features.py # explicitly refer to the idalib tests for performance. other tests run above.
|
||||
|
||||
Reference in New Issue
Block a user