@@ -10,82 +10,76 @@ jobs:
1010 fail-fast : false
1111 matrix :
1212 # os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
13- os : [windows-latest, ubuntu-20 .04]
14- python-version : [3.8, 3.9]
13+ os : [windows-latest, ubuntu-22 .04]
14+ python-version : ["3.9", "3.11"]
1515 include :
1616 - os : ubuntu-22.04
1717 python-version : 3.9
1818 container : Docker
1919
2020 steps :
21- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v3
2222
23- - name : Set up Python
24- uses : actions/setup-python@v4
25- with :
26- python-version : ${{ matrix.python-version }}
23+ - name : Set up Python
24+ uses : actions/setup-python@v4
25+ with :
26+ python-version : ${{ matrix.python-version }}
2727
28+ - name : Win setup MSVC
29+ if : contains(matrix.os, 'windows')
30+ uses : microsoft/setup-msbuild@v1
2831
29- - name : Win setup MSVC
30- if : contains(matrix.os, 'windows')
31- uses : microsoft/setup-msbuild@v1
32-
33-
34- - name : Win configure Pagefile
35- if : contains(matrix.os, 'windows')
36- 37- with :
32+ - name : Win configure Pagefile
33+ if : contains(matrix.os, 'windows')
34+ 35+ with :
3836 minimum-size : 16GB
3937 maximum-size : 16GB
4038 disk-root : " C:"
4139
42-
43- - name : win run tests
44- if : contains(matrix.os, 'windows')
45- shell : bash
46- run : |
40+ - name : win run tests
41+ if : contains(matrix.os, 'windows')
42+ shell : bash
43+ run : |
4744 powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"
4845 powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"
4946 powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
5047 powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Add-MpPreference -ExclusionPath $GITHUB_WORKSPACE'"
51- pip3 install setuptools wheel
5248 pip3 install .
5349 cd examples
5450 rm -rf rootfs
5551 curl -LJk -o master.zip https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip && unzip master.zip
5652 mv rootfs-master rootfs
57- cd $GITHUB_WORKSPACE
53+ cd " $GITHUB_WORKSPACE"
5854 cmd.exe //C 'examples\scripts\dllscollector.bat'
59- cd $GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin
55+ cd " $GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin"
6056 unzip -Pinfected wannacry.bin.zip
6157 unzip -Pinfected UselessDisk.bin.zip
6258 unzip -Pinfected GandCrab502.bin.zip
6359 unzip -Pinfected al-khaser.bin.zip
6460 unzip -Pinfected sality.dll.zip
65- cd $GITHUB_WORKSPACE/tests
61+ cd " $GITHUB_WORKSPACE/tests"
6662 cmd.exe //C '.\test_pe.bat'
6763
64+ - name : linux run tests
65+ if : contains(matrix.os, 'ubuntu')
66+ shell : ' script -q -e -c "bash {0}"'
67+ run : |
68+ cd examples
69+ rm -rf rootfs
70+ wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
71+ unzip master.zip && mv rootfs-master rootfs
72+ cd ../qiling
73+ cd ../examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
74+ cd ../../../../
75+ pip3 install -e .[RE]
6876
69- - name : linux run tests
70- if : contains(matrix.os, 'ubuntu')
71- shell : ' script -q -e -c "bash {0}"'
72- run : |
73- cd examples
74- rm -rf rootfs
75- wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
76- unzip master.zip && mv rootfs-master rootfs
77- cd ../qiling
78- cd ../examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
79- cd ../../../../
80- pip3 install -e .[evm,RE]
81-
82- if [ ${{ matrix.os }} == 'ubuntu-18.04' ] and [ ${{ matrix.python-version }} == '3.9' ]; then
83- docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "cd tests && ./test_onlinux.sh"
84- else
85- pip3 install setuptools wheel
86- cd tests && ./test_onlinux.sh
87- fi
88-
77+ if [ ${{ matrix.os }} == 'ubuntu-18.04' ] and [ ${{ matrix.python-version }} == '3.9' ]; then
78+ docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "cd tests && ./test_onlinux.sh"
79+ else
80+ pip3 install poetry
81+ cd tests && ./test_onlinux.sh
82+ fi
8983
9084 # - name: mac run tests
9185 # if: contains(matrix.os, 'macos')
9791 # cd $GITHUB_WORKSPACE/examples/rootfs/x8664_macos/kext
9892 # unzip -Pinfected SuperRootkit.kext.zip
9993 # cd $GITHUB_WORKSPACE/tests
100- # ./test_macho.sh
94+ # ./test_macho.sh
0 commit comments