Skip to content

Add a C++ test outline #19

Add a C++ test outline

Add a C++ test outline #19

Workflow file for this run

name: CI
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install kaitaistruct
test-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Need for a recent version of cmake
- name: Install kitware cmake archive
run: |
curl -LO https://apt.kitware.com/kitware-archive.sh
sudo bash kitware-archive.sh
- name: Install compiler and cmake
run: |
sudo apt update -y
sudo apt install -y build-essential cmake
# The version here should match the one in ci/cpp/CMakeLists.txt
- name: Install kaitai-struct-compiler
run: |
curl -LO https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/0.10/kaitai-struct-compiler_0.10_all.deb
sudo apt install -y ./kaitai-struct-compiler_0.10_all.deb
- name: Build C++ test executable
run: |
cd ci/cpp
cmake -S . -B build
cmake --build build