mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-26 23:21:11 +00:00
Fix workflows
This commit is contained in:
parent
4d0bf508b2
commit
01fe52b2cc
14
.github/workflows/LLVM-Tblgen-Build.yml
vendored
14
.github/workflows/LLVM-Tblgen-Build.yml
vendored
@ -25,8 +25,10 @@ jobs:
|
||||
build-and-test-llvm-tblgen:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout llvm-capstone
|
||||
- name: Checkout llvm-capstone (patched backends)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@ -46,18 +48,26 @@ jobs:
|
||||
run: |
|
||||
./gen_cs_tables.sh
|
||||
|
||||
- name: Checkout llvm-capstone
|
||||
- name: Checkout LLVM
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: false
|
||||
ref: auto-sync-18-base
|
||||
|
||||
- name: Build LLVM llvm-tblgen
|
||||
run: |
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../llvm
|
||||
cmake --build . --target llvm-tblgen --config Debug
|
||||
cd ..
|
||||
|
||||
- name: Checkout llvm-capstone (patched backends)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: false
|
||||
|
||||
- name: Generate original LLVM tables
|
||||
run: |
|
||||
./gen_llvm_tables.sh
|
||||
|
@ -1,9 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Compare the generated tables of our refactored TableGen to the original ones.
|
||||
archs="AArch64 ARM PPC"
|
||||
file_names="GenAsmWriter GenDisassemblerTables GenInstrInfo GenRegisterInfo GenSubtargetInfo GenSystemOperands"
|
||||
release="18"
|
||||
gen_dir="output_tmp"
|
||||
|
||||
# Requires that LLVM tables were generated before.
|
||||
echo "Diff LLVM files"
|
||||
echo "Diff LLVM files (blanks and empty lines are ignored)"
|
||||
for arch in $archs; do
|
||||
for file_name in $file_names; do
|
||||
out_CPP_LLVM="$gen_dir/$arch$file_name""_CPP_LLVM.inc"
|
||||
@ -15,7 +19,7 @@ for arch in $archs; do
|
||||
|
||||
diff -w -B "$out_CPP_LLVM" "$out_CPP_CS" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "The following files mismatch: $out_CPP_LLVM <-> $out_CPP_CS"
|
||||
echo "The following files mismatch: $out_CPP_LLVM $out_CPP_CS"
|
||||
mismatch="true"
|
||||
fi
|
||||
done
|
||||
|
0
gen_cs_tables.sh
Normal file → Executable file
0
gen_cs_tables.sh
Normal file → Executable file
0
gen_llvm_tables.sh
Normal file → Executable file
0
gen_llvm_tables.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user