interplane.Get Omega
Read in your language

synapse

A component of the AienOS ecosystem.

Brought by drakestapleton

branch main Branches Tags History

synapse / scripts / ci / portable.sh

34 lines · 1290 bytes Raw Blame History
1#!/usr/bin/env bash
2# Portable conformance only. No hardware, energy or performance qualification.
3set -euo pipefail
4cd "$(dirname "$0")/../.."
5mode=${1:?usage: portable.sh workspace|conformance}
6out=${CI_EVIDENCE_DIR:-$PWD/target/ci-evidence}
7mkdir -p "$out"
8exec > >(tee "$out/$mode.log") 2>&1
9printf 'synapse_sha=%s\n' "$(git rev-parse HEAD)"
10printf 'source_status:\n'; git status --porcelain
11rustc -Vv
12cargo -V
13cc --version
14git --version
15uname -a
16case "$mode" in
17 workspace)
18 cargo fmt --all --check
19 cargo metadata --format-version 1 --locked >/dev/null
20 cargo clippy --locked --workspace --all-targets -- -D warnings
21 cargo test --locked --workspace
22 ;;
23 conformance)
24 arch=${AIEN_ARCHITECTURE_REPO:?pinned architecture checkout required}
25 pin=29780e56c9e6b9111d884e0d4b146737228c19f6
26 test "$(git -C "$arch" rev-parse HEAD)" = "$pin"
27 printf 'architecture_sha=%s\n' "$pin"
28 OUT_DIR="$out/qualification" bash scripts/qualify-crumb-synapse.sh "$arch"
29 cargo run --quiet --locked -p synapse-bench --bin verify-qualification -- "$out/qualification/results.json"
30 (cd "$out/qualification" && sha256sum -c SHA256SUMS)
31 ;;
32 *) echo "unknown gate: $mode" >&2; exit 2 ;;
33esac
34printf 'PASS portable %s; GB10 performance and energy: NOT_RUN\n' "$mode"