#!/bin/sh # The native gate, on a Mac: fixtures against the API schema, the string # catalog, EquipoKit's tests, the Mac app and an unsigned iPhone Simulator # build. The proof vector's server half runs in `make test` (Go). set -eu cd "$(dirname "$0")/.." logs=build/logs; mkdir -p "$logs" swift package --package-path apple resolve python3 scripts/check-oficina-id.py python3 scripts/check-sign-in-lifetime.py python3 scripts/check-share.py swift test --package-path share --jobs 4 > "$logs/share-test.log" 2>&1 || { tail -40 "$logs/share-test.log"; exit 1; } # Includes Go Render/RenderDraft golden freshness; Swift tests compare every tree. export EQUIPO_MARKDOWN_DIFFERENTIAL="$(pwd)/build/markdown-differential.json" python3 scripts/check-fixtures.py python3 scripts/check-strings.py python3 scripts/check-parity.py # The repository-wide reference scan (make ci) reads native files too. python3 ../scripts/runner-dead-references.py swift test --package-path apple > "$logs/swift-test.log" 2>&1 || { tail -40 "$logs/swift-test.log"; exit 1; } grep -E 'Test run with .* passed' "$logs/swift-test.log" swift build --package-path apple --product EquipoMac > "$logs/mac-build.log" 2>&1 || { grep -E 'error' "$logs/mac-build.log" | head -20; exit 1; } echo "EquipoMac builds" scripts/build-iphone.sh simulator > "$logs/phone-build.log" 2>&1 || { grep -E 'error' "$logs/phone-build.log" | head -20; exit 1; } echo "EquipoPhone builds for the iOS Simulator"