neph
Neph
A modern command line job processor written in Crystal that can execute jobs concurrently. :rocket:
Neph can be substitute for make
command. :rocket:
Neph is self-hosting. So after installing neph, try
> neph
at installed directory.
Installation
Cloning this project
git clone https://github.com/tbrand/neph
Compile
> cd neph
> shards build --release
Now executable binary is at neph/bin/neph
.
Usage
Put neph.yml
at root of your project
main:
command:
echo "Hello Neph!"
Execute neph
> neph
STDOUT and STDERR logs are located at .neph/log/[job_name]/*
Options
You can specify job name by -j
. In neph.yml,
hello:
command:
echo "Hello!"
Then,
> neph -j hello
To see other usages, use --help
option
> neph --help
neph.yml
You can define dependencies between jobs like this
main:
command:
echo "Main!"
depends_on:
- hello
hello:
command:
echo "Hello!"
Here main
job depends on hello
. So when you execute neph
, hello
job is triggered before the execution of the main
job.
You can ignore errors by ignore_error: true
main:
command:
echo "Main!"
depends_on:
- hello
hello:
command:
hogehoge
ignore_error:
true
In this jobs, hello job will raise an error since hogehoge
command doesn't exist. But main job will be triggered by ignoring the error.
You can specify sources by sources:
for the jobs like make
command.
main:
command:
echo "Main!"
depends_on:
- hello
sources:
- src/test.c
hello:
command:
hogehoge
ignore_error:
true
If the sources are not updated, the job will be skipped.
See sample for details.
Used
Neph is used in which_is_the_fastest. In which_is_the_fastest
, building time is reduced from 102[sec] to 33[sec]. neph.yml is here.
Contributing
- Fork it ( https://github.com/tbrand/neph/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- tbrand Taichiro Suzuki - creator, maintainer