Skip to content

Continuous integration and releases

Three GitHub Actions workflows live in .github/workflows/. None of them has the game: no disc image, extracted executable, assembly fallback or scene module is in the repository or reachable from a runner.

Validation on pushes to main in ci.yml

ci.yml runs on every push to main. A newer run on the same ref cancels the one before it (ci-<ref>), so the latest commit is the one tested.

clang-format (format). make format-check CLANG_FORMAT=clang-format with the clang-format version tools/config/helpers.json pins (make helpers installs the same one locally). It fails on any tracked C or C++ file that make format would change.

Python and host tests (tests). make helpers installs the Python 3.12 helper venv (tools/third_party/venv, cached by runner image and helper config/setup files) and runs make test PYTHON=tools/third_party/venv/bin/python. Running with the helper venv ensures rabbitizer is present so no test skips.

Compiles to the verified matching build (byte-match). make setup installs the pinned EE GCC compilers and their Docker runtime, and make check-digests compiles all 818 unit objects (the 813 units and 5 function-flag variants) and the 707 scene-script objects of the 14 levels with them. It then compares each object with tools/config/compiled-digests.json.

That file comes from make digests (tools/compiled_digests.py record), which only a machine with the disc can run. It runs tools/build_sources.py --strict-data (complete .text EXACT, no referenced data differing) and tools/port/match_scripts.py match all --data --image (14 byte-identical .PS2 modules), and refuses to write unless both pass. It then digests the objects those two builds compiled, and checks that the disc-free compile CI runs reproduces every one of them. So a green CI run means the sources still compile to objects that were checked byte for byte against the disc: the game's .text, which is what make iso writes into both executables on the disc, its placed data, and the 14 script modules.

A digest covers what the matcher places and compares: each allocated section's contents, its relocations (target by name, or by section and offset for local labels), and the named symbols. Anonymous-namespace names are reduced to the function part, as the matcher reads them, because GCC 3.2 derives the rest from the file. Debug sections are left out, so a comment, a blank line or a reformat keeps an object's digest, while any change to code, data, relocations or symbols changes it.

The linked SDK, runtime and library code and the gaps between functions are not compiled at all: tools/config/source-tree.json lists them as reference_ranges, and make match and make iso copy their bytes from extracted/HITMAN3.ELF. CI never sees them.

The assembly fallbacks are the exception. The five files under asm/ hold the disc's opcode words for the INCLUDE_ASM lines left in game units (ProgressHandler and four STLport instances), so make extract writes them from the user's disc and Git does not track them. INCLUDE_ASM assembles them into the section .text.openblood_asm, which has no relocations, and a digest covers that section by its size, not its contents. Before it compiles, make check-digests writes a .space stand-in of the right size for each INCLUDE_ASM line to build/compiled-digests/stand-ins/asm/ and passes that directory to the assembler with -Wa,-I. The assembler tries a path relative to the working directory first, so a machine with asm/ assembles the real words and a runner assembles the stand-ins, and both give the same digests. The words are still checked: make extract compares each fallback with the SHA-256 that tools/config/source-tree.json records for its range, and make match and make iso compare them with the disc.

tools/runtime/Dockerfile pins libc6-i386=2.36-9+deb12u14, which is Debian bookworm's current version on 24 November 2026. The Debian archive keeps only the latest point release, so when bookworm moves on, make setup on a fresh runner fails until the pin is updated; make check-digests then shows whether the new runtime still compiles the same objects.

After changing src/: run make match and make match-scripts while working, then make digests, and commit tools/config/compiled-digests.json with the change. A commit that changes an object without new digests fails CI with the list of objects that differ.

Formatting

.clang-format at the root is the style for src/ and tools/; src/scripts/.clang-format and port/.clang-format change the few rules where those trees differ (operators at the end of a broken line, a function's brace on its own line in port/). Rules that matter for this repository:

  • ColumnLimit: 0 keeps the existing line breaks; the tools read comments such as // 0x003da594: Name (N bytes) and // Debug signature: as single lines.
  • Standard: c++03, because the game units are C++98 for GCC 3.2, which needs > >.
  • SortIncludes: Never: include order decides which use of a header inline GCC 3.2 inlines.
  • FixNamespaceComments: false, ReflowComments: Never, BreakStringLiterals: false.
  • Macros and TypeNames name the scripts' type macros (SC_POINTER_SLOT, SC_POINTER_TYPED_WORD, SC_HOST_ALIGN4) and __SIZE_TYPE__, which clang-format otherwise splits from their declarators or reads as a bitwise and.

.clang-format-ignore lists the files that generators write (the script thunks, the script SDK headers, the shader blob, the property graph) and tools/runtime/msvcrt_qsort.c, whose hash tools/config/toolchain.json pins.

The tree was reformatted once on 24 November 2026. The pre-format commit compiles to the same 1,753 digests as the formatted tree, the full matching build stayed EXACT, all 14 script modules stayed byte-identical, the rebuilt ISO matched all 4,016,177,152 bytes, and the port's M00, M01 and M10 traces kept every event. clang-format joins a line break that goes against its operator rule, so some long conditions that were broken in the other style are now one line.

On a tag: release.yml

Pushing a tag that starts with v (git tag v0.1.0 && git push origin v0.1.0) starts five release jobs for Windows, Linux, macOS, iOS and Android. Each job uses the tag as its package version. Runs on the same tag are serialized (release-<ref>, cancel-in-progress: false). After every build succeeds, the publish job downloads all artifacts, writes SHA256SUMS over them, and creates the GitHub release with generated notes; if the release already exists (for instance on a re-run after a partial publish), it uploads every asset with gh release upload --clobber instead.

Asset Contents
openbloodmoney-TAG-linux-x86_64.tar.gz openbloodmoney without debug sections, with FFmpeg linked in, libSDL3.so.0 (the executable's RUNPATH starts with $ORIGIN), licences, README
openbloodmoney-TAG-windows-x86_64.zip openbloodmoney.exe with SDL3, zlib and FFmpeg linked in (it needs only system DLLs and the Universal CRT of Windows 10 and later), licences, README
openbloodmoney-TAG-windows-x86_64-pdb.zip openbloodmoney.pdb, which the crash handler reads to name a backtrace
openbloodmoney-TAG-macos-arm64.zip OpenBloodMoney.app, signed ad hoc: openbloodmoney without debug information, with FFmpeg linked in, and libSDL3.0.dylib in Contents/Frameworks (the executable's rpath starts with @executable_path/../Frameworks); licences, README
openbloodmoney-TAG-android-arm64.apk Android APK for ARM64, signed with the project's release key
openbloodmoney-TAG-ios-arm64-unsigned.ipa Unsigned iOS IPA for ARM64
ffmpeg-VERSION.tar.xz The FFmpeg source the executables link, as port/port.json pins it
SHA256SUMS SHA-256 checksums of all release assets

The Linux and Windows builds run on ubuntu-24.04. The Linux build is make port-setup, make check-shaders, make port and make port-test, so it needs glibc 2.39 or later. The Windows build cross-compiles with zig (make port-windows-setup, make port-windows VERSION=...; port/port.json pins zig 0.17.1 and zlib 1.3.1) for x86_64-windows-gnu, the target of the earlier Windows builds. The macOS build is make port-setup and make port on macos-15-intel, with Ninja from Homebrew. The desktop job sets OB_MACOS_TARGET_ARCH=arm64 for SDL3, zlib, FFmpeg and the game. The iOS job uses the same Intel runner and targets arm64 with the iPhoneOS SDK. Both jobs check the executable architecture before uploading. port/port.json pins its deployment target, macOS 11.0, which tools/port/setup_port.py passes to SDL3, FFmpeg and the port alike; the executable uses Metal and zlib from the system. tools/port/package_release.py makes the desktop archives and works the same locally; for macOS it fails if the executable would load a library that is neither part of macOS nor in the bundle (a Homebrew FFmpeg found on the build machine, say).

The --version value is embedded into binary metadata where the platform carries it: Windows VERSIONINFO (FILEVERSION, PRODUCTVERSION, FileVersion, ProductVersion from port/launcher/icons/OpenBloodMoney.rc.in), macOS and iOS Info.plist bundle versions, and Android versionName and versionCode in port/mobile/android/build.gradle. Non-tag strings such as dev or pr-42-abc1234 fall back to safe numeric defaults (0,0,0,0 for Windows, 0.0.0 / 1 for iOS, and versionCode 1 for Android).

All desktop and mobile setups build the same FFmpeg 9.0.2 from source as static libraries (FFMPEG_OPTIONS in tools/port/setup_port.py): LGPL only, no programs, network, assembly or autodetected system libraries, and only what the movie player calls (the MPEG program-stream, raw MPEG video, Bink and Ogg demuxers; the MPEG-1/2, Bink video, Bink audio and Vorbis decoders and their parsers; the file protocol; libswscale). The packaged Linux build plays M00's M00_Star.pss to its end (22.77 seconds, 48 kHz stereo sound). The packaged macOS build, run with the build tree's SDL3 moved away, loads M00 and decodes the same movie's sound, and starts from Finder. licences/FFmpeg.txt in each archive gives the version, source, hash and configuration, with the LGPL 2.1. The LGPL lets users relink a statically linked program with a changed FFmpeg, so a binary release also needs the program's object files or its source available to its users.

Limits:

  • The macOS release runs on Apple silicon only. OpenBloodMoney.app is not signed with a Developer ID or notarized, so macOS blocks its first start after a download; the README in the archive says how to open it (Control-click, Open, or xattr -dr com.apple.quarantine OpenBloodMoney.app).
  • Android will not install an unsigned APK (it reports the package as invalid), so the Android job signs the APK with apksigner (zipalign -P 16, then the v3 scheme, which covers Android 11 and later). The key comes from four repository secrets: OB_ANDROID_KEYSTORE_BASE64 (the keystore file, base64-encoded), OB_ANDROID_KEYSTORE_PASSWORD, OB_ANDROID_KEY_ALIAS and, when it differs from the keystore password, OB_ANDROID_KEY_PASSWORD. Without them the job fails rather than publish an APK that cannot be installed. Every release must be signed with the same key: Android installs an update only over an app signed with the same key, and a lost key means players have to uninstall (losing their settings) to install the next release. Keep a copy of the keystore and its passwords outside GitHub.
  • The Windows executable is compiled and linked in CI, and each level's script data lies between its markers in it, but no runner starts it. Its game units are force-included with port/engine/system/_sdl/mingwmemicmp.h, which keeps MinGW's memicmp(const void *, const void *, size_t) out of them. With it in scope, a call to the game's memicmp(..., int) with an unsigned length is ambiguous.

Documentation: docs.yml

docs.yml builds the documentation with mkdocs build --strict on every push to main. After a successful build, it uploads build/site and deploys the site to GitHub Pages. The repository’s Pages publishing source must be set to GitHub Actions.