- Linux-x64
- build/publish native assets
- OSX-x64
- build/publish native assets
- Win-x64
- build/publish native assets
Join
- Copy all native assets locally
- Build managed
- Package managed + native into .nupkg
- Linux-x64
- build/publish native assets
- OSX-x64
- build/publish native assets
- Win-x64
- build/publish native assets
- Win
- build/publish managed assets
Join
- Copy all managed and native assets locally
- Package managed + native into .nupkg
- Linux-x64
- publish native assets
- OSX-x64
- publish native assets
Join
- Copy all native assets locally
- Build managed + Win-x64 native
- Package managed + native into .nupkg
I like Option 1
- It is consistent, no 'special' leg gets native + managed assets built
- It scales when other Windows legs are brought online (win-x86, win-arm)
I vote for 1a as well. It requires we only ever have one managed flavor that we care to package (EG: we don't start pivoting at the build level across a managed TFM or some feature flag or something) but I think that's a safe assumption.
One stipulation I have is that packaging portion of the build is independently runnable. It can rely on locally built binaries but it should not be tightly coupled to the managed build (eg as an afterbuild step in a csproj or something). IOW, I want to be able to do
build -managed -skipPackaging
thenbuild -packages
You should also consider where signing fits in.