mirror of
https://github.com/cea-sec/miasm
synced 2026-08-17 10:26:03 -04:00
163 lines
5.7 KiB
YAML
163 lines
5.7 KiB
YAML
name: Miasm regression tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.10', '3.13']
|
|
|
|
steps:
|
|
|
|
- name: Git checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Update pip
|
|
run: pip install pip --upgrade
|
|
|
|
- name: Install llvm 15 (llvmlite compatible)
|
|
run: sudo apt-get install llvm-15
|
|
|
|
- name: Install Miasm
|
|
uses: ./.github/actions/install
|
|
|
|
- name: Base tests
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py && git ls-files -o --exclude-standard
|
|
|
|
- name: Regression tests
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o regression -t long,python,llvm,gcc,z3,qemu,cparser
|
|
|
|
- name: Run examples
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o example -t long,python,llvm,gcc,z3,qemu,cparser
|
|
|
|
- name: Test long tests
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o long
|
|
|
|
- name: Test qemu jitter llvm/gcc
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o qemu -t llvm,gcc
|
|
|
|
- name: Test qemu jitter python/gcc
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o qemu -t python,gcc
|
|
|
|
- name: Test qemu jitter python/llvm
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o qemu -t python,llvm
|
|
|
|
- name: Test llvm qemu/long
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o llvm -t qemu,long
|
|
|
|
- name: Test gcc qemu/long
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o gcc -t qemu,long
|
|
|
|
- name: Test python qemu/long
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o python -t qemu,long
|
|
|
|
- name: Z3 tests
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o z3
|
|
|
|
- name: Cparser tests
|
|
run: cd test; python --version |& grep -q "Python 3" || flags="-W error"; python $flags test_all.py $MIASM_TEST_EXTRA_ARG && git ls-files -o --exclude-standard
|
|
env:
|
|
MIASM_TEST_EXTRA_ARG: -o cparser
|
|
|
|
- name: Loader tests
|
|
run: cd example/loader; python --version |& grep -q "Python 3" || flags="-W error"; for i in ../../miasm-extended-tests/loader/dll_win_xp/*.dll; do python get_exports.py $i; done
|
|
env:
|
|
MIASM_EXTENTED_TESTS_LOADER: loader
|
|
|
|
- name: Loader tests
|
|
run: cd "miasm-extended-tests/$MIASM_EXTENTED_TESTS_LOADER" && ./test_dll.py
|
|
env:
|
|
MIASM_EXTENTED_TESTS_LOADER: loader
|
|
|
|
- name: IR tests
|
|
run: cd "miasm-extended-tests/$MIASM_EXTENTED_TESTS_IR" && ./run.sh
|
|
env:
|
|
MIASM_EXTENTED_TESTS_IR: ir_tests
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.13']
|
|
|
|
steps:
|
|
|
|
- name: Git checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Update pip
|
|
run: python -m pip install pip --upgrade
|
|
shell: bash
|
|
|
|
- name: Install LLVM/Clang
|
|
run: |
|
|
choco install llvm -y --no-progress
|
|
"C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
shell: pwsh
|
|
|
|
- name: Install Miasm
|
|
uses: ./.github/actions/install
|
|
|
|
- name: Windows tests
|
|
run: cd test; python -W error test_all.py -t gcc && git ls-files -o --exclude-standard
|
|
shell: bash
|
|
|
|
macos-aarch64:
|
|
runs-on: macos-26
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.13']
|
|
|
|
steps:
|
|
|
|
- name: Git checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Show host architecture
|
|
run: python -c "import platform; print(platform.platform()); print(platform.machine())"
|
|
|
|
- name: Update pip
|
|
run: python -m pip install pip --upgrade
|
|
|
|
- name: Install Miasm
|
|
uses: ./.github/actions/install
|
|
|
|
- name: macOS tests
|
|
run: cd test; python -W error test_all.py -t gcc,llvm,qemu,long && git ls-files -o --exclude-standard
|