Skip to content

Add a justfile with basic support for building CBMC and executing Rust API tests. #7486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

NlightNFotis
Copy link
Contributor

This is a rudimentary justfile (for https://github.com/casey/just), added as a base for easy running of the Rust API tests locally and online - as it allows for literally one-step build + test.

Over time I intend for this to be used for two purposes:

  1. Streamline building of CBMC for existing and new contributors
  2. Streamline build infrastructure in CI.

Also adding myself as a codeowner for the file just so that I can be notified about any changes made to it (assuming I'm the person with the most just knowledge for now).

…ust API tests.

This is a rudimentary file, added as a base for easy running of the
Rust API tests locally and online - as it allows for literally one-step
build + test.

Over time I intend for this to be used for two purposes:

1. Streamline building of CBMC for existing and new contributors
2. Streamline build infrastructure in CI.

Also adding mysefl as a codeowner for the file just so that I can be
notified about any changes made to it (assuming I'm the person with
the most `just` knowledge for now).
@martin-cs
Copy link
Collaborator

I have not come across just before. What can it do that make or CMake can't?

@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Base: 78.48% // Head: 78.48% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (bae0dae) compared to base (f76d7fa).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7486   +/-   ##
========================================
  Coverage    78.48%   78.48%           
========================================
  Files         1663     1663           
  Lines       191188   191189    +1     
========================================
+ Hits        150054   150055    +1     
  Misses       41134    41134           
Impacted Files Coverage Δ
src/goto-checker/stop_on_fail_verifier.h 78.57% <0.00%> (+0.79%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@NlightNFotis
Copy link
Contributor Author

NlightNFotis commented Jan 18, 2023

Hi @martin-cs, there are 2 sides to this question, that I will attempt to answer - the first one is what is just and what can it do that other tools can't, and the second is how are we deploying it within the context of CBMC.

  1. just is a command/task runner, whereas make is a build system. The difference here is (as I understand it, at least) that a build system is built around the concept of files, and is tracking any updates to files with regards to incorporating it to a final artefact that is the result of the build process. Any outside tool invocation is thus becoming cumbersome, because it's not a file target, hence you have to resort to weird syntax like .PHONY directives in make as an example.

just is basically a tool to have a portable set of tasks/command sequences that you can run with one instruction. The idea being that you can use it to orchestrate one-step build/test/format processes in any kind of project.

  1. I was envisioning the following usage within the context of CBMC:
  • Consolidate build instructions into a single space, for documentation/orchestration. That would allow us or new developers to build using just build without caring about the underlying layer and its configuration (I'm presenting it as an abstraction/convenience layer, but of course this is building into some assumptions, like a default build directory of build/).
  • Allow parts (ideally, all of) the CI checks to be performed as part of a just orchestration, so that it's easier to maintain and easier for a developer to perform one of the CI sequences locally.

Of course just is a very sophisticated tool, it can do a lot more than that, but I'm also in the process of learning it, so expect to hear/see more of it as my understanding evolves. For now, I had this file locally as a convenience for some processes like testing the Rust API, but I figured I can leverage this in CI to do so in a reproducible way.

@NlightNFotis
Copy link
Contributor Author

This is seeing some resistance in some offline conversations, and my aim here is to move the Rust API testing in CI, so I'll refrain from this getting pushed further in the interest of delivering other priorities in time.

@NlightNFotis NlightNFotis deleted the add_justfile branch January 20, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants