doc: switch shell session code blocks to console type.

This commit is contained in:
Graham Christensen
2021-04-05 16:07:00 +00:00
parent 16902f3866
commit 2e47970a97
3 changed files with 67 additions and 31 deletions

View File

@ -3,38 +3,50 @@
This section provides some notes on how to hack on Hydra. To get the
latest version of Hydra from GitHub:
$ git clone git://github.com/NixOS/hydra.git
$ cd hydra
```console
$ git clone git://github.com/NixOS/hydra.git
$ cd hydra
```
To enter a shell in which all environment variables (such as PERL5LIB)
are set up so that those dependencies can be found:
$ nix-shell
```console
$ nix-shell
```
To build Hydra, you should then do:
[nix-shell]$ ./bootstrap
[nix-shell]$ configurePhase
[nix-shell]$ make
```console
[nix-shell]$ ./bootstrap
[nix-shell]$ configurePhase
[nix-shell]$ make
```
You start a local database, the webserver, and other components with
foreman:
$ foreman start
```console
$ foreman start
```
You can run just the Hydra web server in your source tree as follows:
$ ./src/script/hydra-server
```console
$ ./src/script/hydra-server
```
You can run Hydra's test suite with the following:
[nix-shell]$ make check
[nix-shell]$ # to run as many tests as you have cores:
[nix-shell]$ make check YATH_JOB_COUNT=$NIX_BUILD_CORES
[nix-shell]$ # or run yath directly:
[nix-shell]$ yath test
[nix-shell]$ # to run as many tests as you have cores:
[nix-shell]$ yath test -j $NIX_BUILD_CORES
```console
[nix-shell]$ make check
[nix-shell]$ # to run as many tests as you have cores:
[nix-shell]$ make check YATH_JOB_COUNT=$NIX_BUILD_CORES
[nix-shell]$ # or run yath directly:
[nix-shell]$ yath test
[nix-shell]$ # to run as many tests as you have cores:
[nix-shell]$ yath test -j $NIX_BUILD_CORES
```
When using `yath` instead of `make check`, ensure you have run `make`
in the root of the repository at least once.
@ -54,4 +66,6 @@ will reload the page every time you save.
To build Hydra and its dependencies:
$ nix-build release.nix -A build.x86_64-linux
```console
$ nix-build release.nix -A build.x86_64-linux
```