Skip to content
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

Add justfile as a project workflow interface #180

Merged
merged 7 commits into from
Dec 6, 2024

Conversation

andreiltd
Copy link
Contributor

@andreiltd andreiltd commented Dec 2, 2024

I have been maintaining a justfile as a workflow interface for my recent work. This might be helpful for someone else, but feel free to close the PR otherwise.

This provide unified interface for most of the common jobs with a single line commands.

E.g just wpt-server will make all the steps necessary to spin up the wpt tests server. All the recipies are listed below.

    build target="" flags=""                       # Build specified target or all otherwise
    b target="" flags=""                           # alias for `build`
    clean                                          # Run clean target
    clean-all                                      # Remove build directory
    componentize script="" outfile="starling.wasm" # Componentize js script
    c script="" outfile="starling.wasm"            # alias for `componentize`
    default                                        # List all recipes
    format *ARGS                                   # Format code using clang-format. Use --fix to fix files inplace
    fmt *ARGS                                      # alias for `format`
    integration-test                               # Run integration test
    t                                              # alias for `integration-test`

    [wpt]
    wpt-build                                      # Build web platform test suite
    wpt-server                                     # Run wpt server
    wpt-setup                                      # Prepare WPT hosts
    wpt-test filter=""                             # Run web platform test suite
    w filter=""                                    # alias for `wpt-test`
    wpt-update                                     # Update web platform test expectations

The defaults can be overwritten like this:

just builddir=cmake-build-release flavour=release wpt-test # run wpt tests in release

Resolves #179.

@andreiltd andreiltd marked this pull request as draft December 2, 2024 20:34
Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally always maintain a bunch of these scripts and would be very much for having some easier commands.

Would we want to document this?

@andreiltd
Copy link
Contributor Author

andreiltd commented Dec 4, 2024

I'm happy to add an entry to Readme if we can resolve the discussion here: #179 :)

@andreiltd andreiltd marked this pull request as ready for review December 5, 2024 14:58
@andreiltd
Copy link
Contributor Author

Rendered Readme

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of comments then this would be great to see.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@guybedford
Copy link
Contributor

Will give this one a day here for any feedback from @tschneidereit, otherwise will land tomorrow.

@guybedford guybedford merged commit 59ead96 into bytecodealliance:main Dec 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task automation for the repo
2 participants