diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68919c195c711426ba973bd99dcf0945dc0b62a4..c2aed47e78520cf7d4aed494e2ea7cbd93ff715d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,5 @@ -container-recipes: - script: ./containerize.bash - rules: - - changes: - - containerize.bash - artifacts: - paths: - - ./Dockerfile - - ./singularity.def +stages: + - deploy + +include: + - local: .gitlab-ci/*.yml diff --git a/.gitlab-ci/container-recipes.yml b/.gitlab-ci/container-recipes.yml new file mode 100644 index 0000000000000000000000000000000000000000..b5c60c4ce2192413a11fbbf765c5f9cdb6a4c545 --- /dev/null +++ b/.gitlab-ci/container-recipes.yml @@ -0,0 +1,12 @@ +container-recipes: + stage: deploy + script: ./containerize.bash + rules: + - changes: + - containerize.bash + - .gitlab-ci/container-recipes.yml + artifacts: + paths: + - ./Dockerfile + - ./singularity.def + diff --git a/.gitlab-ci/pages.yml b/.gitlab-ci/pages.yml new file mode 100644 index 0000000000000000000000000000000000000000..0294e314e472121eb2d0cac26111bfc1250c574e --- /dev/null +++ b/.gitlab-ci/pages.yml @@ -0,0 +1,28 @@ +pages: + stage: deploy + image: archlinux + variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + before_script: + - pacman -Syu --noconfirm + - pacman -Sy --noconfirm base-devel rustup python-pytorch + - export PATH="$PATH:$CARGO_HOME/bin" + - cargo install mdbook mdbook-toc mdbook-cmdrun --force & + - rustup toolchain install nightly & + - wait + script: + - cd $(dirname $(cargo locate-project --message-format PLAIN)) + - cd doc + - mdbook build . -d public + - mv public .. + rules: + - changes: + - doc/**/* + - src/bin/doc.rs + - .gitlab-ci/pages.yml + artifacts: + paths: + - public + cache: + paths: + - $CARGO_HOME/bin diff --git a/README.md b/README.md index 61acdb6a63175094d7382f3a74e27cd26df2bba8..35756d2c7c3d6648d4c507a23969c4ad9c15e540 100644 --- a/README.md +++ b/README.md @@ -5,78 +5,5 @@ following its specifications within Nicolas Galtier's draft paper *Phylogenetic conflicts: distinguishing gene flow from incomplete lineage sorting* (2023). -Sources available at: https://gitlab.mbb.cnrs.fr/ibonnici/aphid/. - -## Build instructions - -### With Apptainer/Singularity - -Aphid can be run from an apptainer -provided you have [Apptainer] (aka. Singularity) installed. - -First, build the container image as root: - -```sh -# Get definition file. -curl -L \ - https://gitlab.mbb.cnrs.fr/ibonnici/aphid/-/jobs/artifacts/rust-implementation/raw/singularity.def?job=container-recipes \ - > aphid.def # (or download by hand) - -# Build image. -sudo apptainer build aphid.sif aphid.def -``` - -Then run the container as regular user: - -```sh -./aphid.sif <arguments> -``` - -[Apptainer]: https://apptainer.org/ - -### With Docker - -Aphid can be run from a docker container, -provided you have [Docker] installed. - -First, build the container image: -```sh -docker buildx build -t aphid \ - https://gitlab.mbb.cnrs.fr/ibonnici/aphid/-/jobs/artifacts/rust-implementation/raw/Dockerfile?job=container-recipes -``` - -Then run the container: -```sh -docker run --rm -it -v ${PWD}:/home/aphid aphid <arguments> -``` - -[Docker]: https://www.docker.com/ - -### Manual compilation - -The program is still fairly easy to compile yet, -provided you have [git], [torch] and a [rust stable toolchain] installed. - -First clone and compile the project: - -```sh -git clone --recursive https://gitlab.mbb.cnrs.fr/ibonnici/aphid/ --branch rust-implementation -cd aphid -cargo test -cargo build --release -``` - -Then run the binary obtained: - -```sh -./target/release/aphid <arguments> -``` - -[git]: https://git-scm.com/ -[rust stable toolchain]: https://www.rust-lang.org/tools/install -[torch]: https://pytorch.org/get-started/locally/ - - -## Running Aphid - -TODO: rust doc not written yet. +Sources available at: https://gitlab.mbb.cnrs.fr/ibonnici/aphid/ +Documentation at: https://iago-lito.gitlab.io/aphid/ diff --git a/doc/src/intro.md b/doc/src/intro.md index 91c2f7a45388d8320e27e8e1301bfb0cd1f8eb19..5eecf5b97f4cfb5245f796eeb6adbb8099c6a048 100644 --- a/doc/src/intro.md +++ b/doc/src/intro.md @@ -33,4 +33,4 @@ and the outputs produced. Bug reports, feature requests and contributions are welcome [here][repo]. -[repo]: https://gitlab.mbb.cnrs.fr/ibonnici/aphid +[repo]: https://gitlab.mbb.cnrs.fr/ibonnici/aphid/-/tree/dev