Debian Codegraph @

.github/workflows/CITest.yml

raw symbols SCIP
1 name: Run Test
2 on:
3 push:
4 paths-ignore:
5 - ".gitignore"
6 - "docs/**"
7 - "ChangeLog"
8 - "CREDITS.TXT"
9 - "COMPILE.TXT"
10 - "COMPILE_MSVC.TXT"
11 - "COMPILE_CMAKE.TXT"
12 - "HACK.TXT"
13 - "LICENSE.TXT"
14 - "LICENSE_LLVM.TXT"
15 - "README.md"
16 - "RELEASE_NOTES"
17 - "SPONSORS.TXT"
18 - "TODO"
19 pull_request:
20
21 env:
22 CI: true
23
24 jobs:
25 Linux:
26 runs-on: ${{ matrix.config.os }}
27 name: ${{ matrix.config.name }}
28 strategy:
29 fail-fast: false
30 matrix:
31 config:
32 - {
33 name: 'ubuntu-22.04 x64 make',
34 os: ubuntu-22.04,
35 arch: x64,
36 build-system: 'make',
37 }
38 - {
39 name: 'ubuntu-22.04 x64 cmake',
40 os: ubuntu-22.04,
41 arch: x64,
42 build-system: 'cmake',
43 enable-asan: 'OFF'
44 }
45 - {
46 name: 'ubuntu-22.04 x64 ASAN',
47 os: ubuntu-latest,
48 arch: x64,
49 build-system: 'cmake',
50 enable-asan: 'ON'
51 }
52
53 steps:
54 - uses: actions/checkout@v3
55
56 - name: prepare
57 shell: 'script -q -e -c "bash {0}"'
58 run: |
59 export LD_LIBRARY_PATH=`pwd`/tests/:$LD_LIBRARY_PATH
60 wget https://github.com/groundx/capstonefuzz/raw/master/corpus/corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip
61 unzip -q corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip -d suite/fuzz
62 git clone https://git.cryptomilk.org/projects/cmocka.git suite/cstest/cmocka
63 chmod +x suite/cstest/build_cstest.sh
64
65 - name: make
66 if: startsWith(matrix.config.build-system, 'make')
67 shell: 'script -q -e -c "bash {0}"'
68 run: |
69 ./make.sh;
70 make check;
71 cp libcapstone.so.5 libcapstone.so.5.0
72 # sudo make install
73
74 - name: cmake
75 if: startsWith(matrix.config.build-system, 'cmake')
76 shell: 'script -q -e -c "bash {0}"'
77 run: |
78 mkdir build && cd build;
79 cmake -DCAPSTONE_INSTALL=1 -DBUILD_SHARED_LIBS=1 ..;
80 cmake --build . --config Release;
81 cp libcapstone.* ../;
82 # sudo make install;
83
84 - name: build python binding
85 shell: 'script -q -e -c "bash {0}"'
86 run: |
87 mkdir -p bindings/python/capstone/lib && cp libcapstone.so.5.* bindings/python/capstone/lib/libcapstone.so;
88 cd bindings/python;
89 make && make check ;
90 cd ../..;
91
92 - name: cstest
93 shell: 'script -q -e -c "bash {0}"'
94 run: |
95 cd suite/cstest && ./build_cstest.sh;
96 python cstest_report.py -D -t build/cstest -d ../MC;
97 python cstest_report.py -D -t build/cstest -f issues.cs; cd ..;
98
99 Windows:
100 runs-on: ${{ matrix.config.os }}
101 name: ${{ matrix.config.name }}
102 strategy:
103 fail-fast: false
104 matrix:
105 config:
106 - name: 'windows x64 MSVC 64bit'
107 os: windows-latest
108 arch: x64
109 platform: windows
110 python-arch: x64
111 python-version: '3.9'
112
113 steps:
114 - uses: actions/checkout@v3
115
116 - uses: lukka/get-cmake@latest
117 name: Get CMake
118
119 - name: '🛠️ Win MSVC 64 setup'
120 if: contains(matrix.config.name, 'MSVC 64')
121 uses: ilammy/msvc-dev-cmd@v1
122 with:
123 arch: 'x64'
124
125 - name: '🚧 Win MSVC 64 build'
126 if: contains(matrix.config.name, 'MSVC 64')
127 shell: bash
128 run: |
129 cmake --version
130 cmake --preset=${{ matrix.config.platform }}-x64
131 cmake --build --preset build-${{ matrix.config.platform }}-release
132 cmake --build --preset install-${{ matrix.config.platform }}-release