From ed74e65a71094d4dc279b15da01bb178330be675 Mon Sep 17 00:00:00 2001 From: Millian Poquet <millian.poquet@irit.fr> Date: Thu, 25 Jan 2024 15:58:59 +0100 Subject: [PATCH] doc: batcloud-specific README --- README.md | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 8c92051..3dbd483 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,20 @@ **batsched** is a set of [Batsim]-compatible algorithms implemented in C++. -## Install -### For [Nix] users -``` bash -# Up-to-date version -nix-env -iA batsched-master -f 'https://github.com/oar-team/nur-kapack/archive/master.tar.gz' -# Latest release -nix-env -iA batsched -f 'https://github.com/oar-team/nur-kapack/archive/master.tar.gz' -``` +## Development setup prerequisites +1. Install Nix with the `nix` command and nix `flakes` enabled. + This can be done via [nix-portable](https://github.com/DavHau/nix-portable) or with a [full install](https://nixos.org/download) + [configuration](https://nixos.wiki/wiki/Flakes#Other_Distros.2C_without_Home-Manager). -### Manually -``` bash -git clone https://framagit.org/batsim/batsched.git -mkdir -p batsched/build -cd batsched/build -cmake .. -make -make install -``` +## Dev workflow 1 (pure build every time) +1. Hack some input files. +2. (if you have added new files to Git that are needed to compile batsched, you must `git add` them) +3. Build batsched via `nix`: `nix build .#batsched` from the git repository's root. +4. Use the `batsched` that has been compiled. It is available in `./result/bin/batsched` -Up-to-date dependencies and versions are fully defined in [batsched's CI nix recipe](./release.nix). -Here is a quick (and probably outdated) list: -- decent clang/gcc and cmake -- zmq (C and C++) -- redox (hiredis + libev) -- [loguru] -- [intervalset] -- decent boost, gmp, rapidjson... - -[Batsim]: https://framagit.org/batsim/batsim/ -[intervalset]: https://framagit.org/batsim/intervalset -[loguru]: https://github.com/emilk/loguru -[Nix]: https://nixos.org/nix/ +## Dev workflow 2 (iterative builds) +1. Hack some input files. +2. Enter a shell that you'll use to compile batsched: `nix develop .#batsched`. + In this shell you can compile batsched how you'd do without Nix: + - `meson setup build` once + - then `ninja -C build` everytime you want to compile batsched +3. Use the `batsched` that has been compiled. It is available in `./build/batsched` -- GitLab