Skip to content

Build Script

Workers are built and published by virtufin-worker, the CLI in common's virtufin-dev package (Worker CLI). CI runs the same commands (common's worker-nuget-common.yaml for HttpGet, the *-package.yaml workflows for the Python workers).

pip install 'virtufin-dev[workers]' --extra-index-url https://pypi.haenerconsulting.com/api/packages/virtufin/pypi/simple/
virtufin-worker build HttpGet            # managed nupkg
virtufin-worker build HttpGet --native   # managed + NativeAOT in one nupkg
virtufin-worker build Hello              # Python worker wheel

Everything lands in build/<Worker>/: the artefact and build_version.txt (the version virtufin-worker publish reads).

Version

LIBRARY_VERSION from <Worker>/versions.env, or --library-version V. It is passed to dotnet publish as -p:PackageVersion, so it is baked into the nuspec at build time. virtufin-worker publish refuses a version that is already on the feed.

Managed (.NET)

dotnet publish of the project with <VirtufinPackageWorker>true under <Worker>/src/. Worker.DevKit's VirtufinPackageWorker target writes <PackageId>.nupkg: lib/<tfm>/<AssemblyName>.dll plus the nuspec (direct dependencies and the virtufin* elements), zipped deterministically.

Native (--native)

For each RID (--rids, default linux-arm64,linux-x64), the *.Native.csproj is AOT-published inside docker.haenerconsulting.com/library/dotnet-crossbuild:11 via docker buildx (the repo root is the build context, so restore sees NuGet.Config and Directory.Packages.props). --docker-image '' publishes on the host instead (needs clang and the cross-binutils). Each RID's <AssemblyName>.so is added to the managed nupkg as runtimes/<rid>/native/lib<AssemblyName>.so, plus the .supported-rids sidecar (one RID per line). The managed nuspec is the package's only nuspec; its virtufinAbiVersion must match the native protocol or the build fails.

Python

A wheel holding the entry file (script_path in config/config.json) as worker.py and one Requires-Dist line per dependency in pyproject.toml (plus RECORD, without which Gitea's PyPI silently never indexes the upload). The WorkManager Runtime installs the dependencies when it loads the wheel.

See also