about summary refs log tree commit diff stats
path: root/.github/workflows
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2021-08-23 18:03:20 +0200
committerGitHub <noreply@github.com>2021-08-23 18:03:20 +0200
commita7f9f78b67ab50050172be151b324789f96ac43d (patch)
treefdcaea21f3b97c7ed7bd4a785979058abbbe8b7e /.github/workflows
parent6fa54ea61f193775970240a34d67a6423ee146d7 (diff)
parent02489ad58117cc9e0c70e0e3f1ce4ab0e71d5fb0 (diff)
downloadmiasm-a7f9f78b67ab50050172be151b324789f96ac43d.tar.gz
miasm-a7f9f78b67ab50050172be151b324789f96ac43d.zip
Merge pull request #1379 from serpilliere/github_actions
Add github actions
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/tests.yml100
1 files changed, 100 insertions, 0 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 00000000..327b2426
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,100 @@
+name: Miasm regression tests
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: ['2.7', '3.6']
+
+    steps:
+
+    - name: Git checkout
+      uses: actions/checkout@v2
+
+    - name: Use Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Install requirements
+      run: pip install -r requirements.txt
+
+    - name: Install optional requirements
+      run: pip install -r optional_requirements.txt
+
+    - name: Install llvm
+      run: sudo apt-get install llvm
+
+    - 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 "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