This repository contains Dockerfiles that allow building images of reference Docker containers that are sufficient to run relevant portion of Kaitai Struct tests for a particular target language in a particular environment.
When speaking of running a portion of Kaitai Struct tests, we need to be aware of the following variables:
-
$TARGET: designates target programming language. -
$SUBTARGET: designates suffix to the programming language which results in a different generation result from a Kaitai Struct compiler.- Supported values so far:
_98and_11forcpp_stltarget
- Supported values so far:
-
$IMPLEMENTATION: describes specific name and version of the implementation of this programming language.- Examples:
1.18for go 1.18 (reference compiler and implementation)clang7.3for clang implementation of C++ compiler, version 7.3msvc141for Microsoft Visual C++, toolset v141temurin17for Eclipse Temurin build of Java JDK, version 17
- Examples:
-
$OS: operating system we'll be running on:linuxmacoswindows
-
$ARCH: CPU architecture we'll be running on / compiling for (use OS notation, e.g. result ofuname -mor something similar):x86_64(Linux, macOS),x64(Windows)i386(Linux),x86(Windows)arm64(Windows, Linux)
Therefore, accumulating all this, ultimately name of the Docker container will be structured as:
kaitai-$TARGET$SUBTARGET-$IMPLEMENTATION-$OS-$ARCH
for example:
kaitai-php-7.1-linux-x86_64
kaitai-cpp_stl_98-msvc141-windows-x64
kaitai-cpp_stl_11-clang7.3-macos-arm64
kaitai-csharp-netcore2.2.103-linux-x86_64
kaitai-javascript-nodejs16-linux-x86_64
kaitai-java-temurin11-linux-x86_64
Sources for these containers will be found in this repository in:
src/$TARGET/$IMPLEMENTATION-$OS-$ARCH
$TARGETMUST match-t/--targetof the compiler.$SUBTARGETmatches sum of certain Kaitai Struct compiler options.$TARGET$SUBTARGETis used for naming:- Dirs in
compiled/directory resulting from a run in tests repo - Dirs in
compiled/directory in ci_targets repo
- Dirs in
$TARGET$SUBTARGET/$VARIETYis used for naming branches in ci_artifacts
Go to tests repo and launch ./docker-ci, e.g.:
./docker-ci -t java -i temurin11