Lots going on here, I recommend reviewing one commit at a time. This PR will
Fix build caching in CI to speed up builds and combine format, linting, building, and testing into one job. Second part is debatable. Felt weird having a bunch of repeated caching code for the separate jobs.
Remove the workspace and various ABI/proto build/bindings crates in favor of using build.rs to build ABI and proto bindings. The generation runs before each build and drops the bindings directly into the steward crate. This could be improved by doing some sort of checksum to avoid unnecessary re-generation which can slow down builds by a few seconds (probably more in CI).
Move the contents of steward/ into the root of the repository as a consequence of the above
Reduce docker image size a lot by copying the final binary to a vanilla debian image (the same base image/version as the rust image used). Worth noting that a consequence of the change to use build.rs for proto bindings is that the version of tonic-build we are using requires rustfmt to be installed by default.
Speed up API doc build which now outputs a single markdown file
Build Go protos and API docs in the build.rs script
Other tidying:
Move scripts into a scripts folder
Closes #184, closes #188
Note: The API docs now build to a single markdown file. If we want adaptors to be neatly separated we'll need put them in their own sub-package.
Lots going on here, I recommend reviewing one commit at a time. This PR will
build.rs
to build ABI and proto bindings. The generation runs before each build and drops the bindings directly into the steward crate. This could be improved by doing some sort of checksum to avoid unnecessary re-generation which can slow down builds by a few seconds (probably more in CI).steward/
into the root of the repository as a consequence of the abovedebian
image (the same base image/version as therust
image used). Worth noting that a consequence of the change to usebuild.rs
for proto bindings is that the version oftonic-build
we are using requiresrustfmt
to be installed by default.Build Go protos and API docs in the build.rs scriptOther tidying:
scripts
folderCloses #184, closes #188
Note: The API docs now build to a single markdown file. If we want adaptors to be neatly separated we'll need put them in their own sub-package.