4 ms·
>have to build some hack that involves generating the Actions YAML before you commit or similar You could probably use jsonnet expressions and invoke them from
by CameronNemo 6y ago
>have to build some hack that involves generating the Actions YAML before you commit or similar
You could probably use jsonnet expressions and invoke them from a pre-commit hook.
That seems fairly elegant to me.
- throwaway894345 6y agoI’m not doing json net, but I am generating them effectively from a pre-commit hook. One of the jobs that I generate validates that the actions that were committed are up-to-date. This works well because I don’t have too many dependencies, but if you have deep dependency trees then the builds will end up taking a long time and you end up reinventing Nix or Bazel poorly.
- CameronNemo 6y agoAre nix and Bazel in the same category? I have used nix very little and never used Bazel. But I have used Make and jsonnet pretty often. Can you re-run Make in a pipeline to verify that the actions in use match what would be generated based on the repo state?
- throwaway894345 6y ago> Are nix and Bazel in the same category? Nix bills itself as a fully reproducible package manager and Bazel as a fully reproducible build tool. In the abstract, both of these reproducibly build software, so that puts them in the same category in general. > Can you re-run Make in a pipeline to verify that the actions in use match what would be generated based on the repo state? Yes, and I’m doing something similar although not with Make. The problem is that this home-grown build system doesn’t do incremental builds, so everything will be fully built from source every time, and that can take a while for very deep dependency graphs. Conceivably your “Actions generator” script could generate only the jobs that need to be run based on what changed since the previous commit, referencing artifacts from the previous commit for those build steps which weren’t invalidated. This is a neat concept, but we’re well on our way to reinventing Nix or Bazel.