includes/type: Fix parsing of signed leb128 (#333) #1491
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Unit Tests" | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
repository_dispatch: | |
types: [run_tests] | |
jobs: | |
tests: | |
name: 🧪 Unit Tests | |
runs-on: ubuntu-24.04 | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: 🧰 Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: ⬇️ Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y \ | |
build-essential \ | |
ccache \ | |
gcc-14 \ | |
g++-14 \ | |
lld \ | |
${PKGCONF:-} \ | |
cmake \ | |
ninja-build \ | |
python3 \ | |
python3-pip \ | |
libmagic-dev \ | |
lcov | |
sudo pip install jsonschema | |
- name: 📜 Setup ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: ${{ runner.os }}-ccache-${{ github.run_id }} | |
restore-keys: ${{ runner.os }}-ccache | |
max-size: 1G | |
- name: 🛠️ Build | |
run: | | |
mkdir -p build | |
cd build | |
CC=gcc-14 CXX=g++-14 cmake \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_C_FLAGS="-fuse-ld=lld --coverage" \ | |
-DCMAKE_CXX_FLAGS="-fuse-ld=lld --coverage" \ | |
-DIMHEX_PATTERNS_ENABLE_UNIT_TESTS=ON \ | |
-DLIBPL_ENABLE_TESTS=OFF \ | |
-DLIBPL_ENABLE_CLI=OFF \ | |
-G Ninja \ | |
.. | |
ninja unit_tests | |
- name: 🧪 Perform Unit Tests | |
run: | | |
cd build | |
ctest --output-on-failure -j 4 | |
- name: 📎 Validate JSON Files | |
run: | | |
cd constants | |
for file in ./[!_schema.json]*; do jsonschema -i $file _schema.json; done | |
cd .. | |
cd tips | |
for file in ./[!_schema.json]*; do jsonschema -i $file _schema.json; done | |
cd .. |