packages
The Louise packages, each released on its own
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#28 · main · 3 min 34 s
0Étoiles
0Forks
3Issues
| 1 | #!/bin/sh |
| 2 | # CI of louise-lang/packages: what a pull request waits on, and what main |
| 3 | # and the nightly run check. Run it locally the same way. |
| 4 | # |
| 5 | # scripts/ci.sh the packages scripts/affected.sh selects |
| 6 | # LOUISE_CI_ALL=1 scripts/ci.sh every package (main, nightly) |
| 7 | # |
| 8 | # Needs louise on PATH (the toolchain step installs the pinned release) and a |
| 9 | # C compiler for the native tests. Optional: |
| 10 | # LOUISE_PG_URL a PostgreSQL for postgres, eventsourcing and throttle's |
| 11 | # live tests, which skip without it |
| 12 | # LOUISE_NET_TESTS loopback socket tests (set here for postgres and fetch) |
| 13 | |
| 14 | set -eu |
| 15 | cd "$(dirname "$0")/.." |
| 16 | |
| 17 | step() { printf '\n== %s\n' "$*"; } |
| 18 | |
| 19 | if [ "${LOUISE_CI_ALL:-0}" = 1 ]; then |
| 20 | selected=$(for m in */louise.toml; do dirname "$m"; done) |
| 21 | else |
| 22 | selected=$(scripts/affected.sh "${LOUISE_CI_BASE:-origin/main}") |
| 23 | fi |
| 24 | if [ -z "$selected" ]; then |
| 25 | echo "ci: no package changed" |
| 26 | exit 0 |
| 27 | fi |
| 28 | echo "ci: $(echo $selected)" |
| 29 | |
| 30 | step "formatting" |
| 31 | louise fmt --check $selected |
| 32 | |
| 33 | step "released packages are well formed" |
| 34 | scripts/check-manifests.sh $selected |
| 35 | |
| 36 | for pkg in $selected; do |
| 37 | step "$pkg" |
| 38 | ( |
| 39 | cd "$pkg" |
| 40 | louise check --deny-warnings --locked |
| 41 | case "$pkg" in |
| 42 | # C bindings whose tests only run natively. |
| 43 | argon2 | stringzilla | vectors) louise test --native --locked ;; |
| 44 | # Their PostgreSQL tests share a database: one at a time. |
| 45 | throttle | eventsourcing) louise test --locked && louise test --native --locked --jobs 1 ;; |
| 46 | # Deterministic loopback and wire tests, native only. |
| 47 | postgres | fetch) louise test --locked && LOUISE_NET_TESTS=1 louise test --native --locked ;; |
| 48 | *) louise test --locked && louise test --native --locked ;; |
| 49 | esac |
| 50 | ) |
| 51 | rm -rf "$pkg/build" |
| 52 | done |
| 53 | |
| 54 | echo |
| 55 | echo "ci: all checks passed" |