diff options
Diffstat (limited to 'pipeline/build.sh')
| -rwxr-xr-x | pipeline/build.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pipeline/build.sh b/pipeline/build.sh new file mode 100755 index 0000000..e4eac9c --- /dev/null +++ b/pipeline/build.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# Build every reader, every library and every writer, in both languages. +# +# Each project is its own flake and builds on its own. The library has no +# public url yet, so the three that depend on it are given the local copy with +# --override-input; that argument goes away when it is published. +set -e +. "$(dirname "$0")/config.sh" + +build() { # <directory> [flake output] + dir=$1; out=${2:-} + printf '%-44s' "$(basename "$(dirname "$dir")")/$(basename "$dir") ${out}" + if ( cd "$dir" && nix build ${out:+"$out"} \ + --override-input ocda-lib "path:$OCDA_LIB" >/dev/null 2>&1 ) \ + || ( cd "$dir" && nix build ${out:+"$out"} >/dev/null 2>&1 ) + then echo ok + else echo FAILED; failed=1 + fi +} + +failed=0 +build "$OCDA_LIB/dlang" .#ocda-dump +build "$OCDA_LIB/dlang" .#ocda-agree +build "$OCDA_LIB/gleam" +build "$SSP_READER/dlang" +build "$SSP_READER/gleam" +build "$DB_READER/dlang" +build "$DB_READER/gleam" +build "$WRITERS/dlang" +build "$WRITERS/gleam" +exit $failed |
