tobogganSe connecter

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.

55 lignes · 1796 octetsBrut · Historique
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
14set -eu
15cd "$(dirname "$0")/.."
16
17step() { printf '\n== %s\n' "$*"; }
18
19if [ "${LOUISE_CI_ALL:-0}" = 1 ]; then
20 selected=$(for m in */louise.toml; do dirname "$m"; done)
21else
22 selected=$(scripts/affected.sh "${LOUISE_CI_BASE:-origin/main}")
23fi
24if [ -z "$selected" ]; then
25 echo "ci: no package changed"
26 exit 0
27fi
28echo "ci: $(echo $selected)"
29
30step "formatting"
31louise fmt --check $selected
32
33step "released packages are well formed"
34scripts/check-manifests.sh $selected
35
36for 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"
52done
53
54echo
55echo "ci: all checks passed"