Verify public release artifacts and installer
This commit is contained in:
@@ -25,8 +25,9 @@ Work is tracked in Gitea Issues for `tmk241/ink-releases`. Do not mirror issues
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
bash -n install.sh
|
bash -n install.sh
|
||||||
python3 test/installer_e2e.py
|
uv run test/installer_e2e.py
|
||||||
redgate lint < requirements.tsv
|
bash test/repository_e2e.sh
|
||||||
|
awk '/^## / { component=$2; next } /^[0-9][0-9][0-9]\t/ { print component "/" $0 }' REQUIREMENTS.md | redgate lint -
|
||||||
```
|
```
|
||||||
|
|
||||||
Final reports must include `REQUIREMENT IMPACT: IDs` or `REQUIREMENT IMPACT: none`.
|
Final reports must include `REQUIREMENT IMPACT: IDs` or `REQUIREMENT IMPACT: none`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# req: installer/001, installer/002, installer/003, installer/004, installer/006 test
|
# req: installer/001, installer/002, installer/003, installer/004, installer/005, installer/006 test
|
||||||
import hashlib
|
import hashlib
|
||||||
import http.server
|
import http.server
|
||||||
import os
|
import os
|
||||||
|
|||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
# req: distribution/001, distribution/002, distribution/003, distribution/005, distribution/006, distribution/008 test
|
||||||
|
|
||||||
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||||
|
ink=$root/channels/main/ink
|
||||||
|
set=$root/channels/main/toolset
|
||||||
|
manifest=$set/ink-toolset-main-x86_64-linux-musl.manifest.tsv
|
||||||
|
|
||||||
|
(cd "$ink" && sha256sum -c ink-SHA256SUMS >/dev/null)
|
||||||
|
(cd "$set" && sha256sum -c ink-toolset-SHA256SUMS >/dev/null)
|
||||||
|
file "$ink/ink-x86_64-linux-musl" | grep -q 'statically linked'
|
||||||
|
|
||||||
|
awk -F '\t' '
|
||||||
|
NR == 1 {
|
||||||
|
if ($0 != "source_repository\tsource_commit\texecutable\tset\ttarget\tbytes\tsha256\tasset") exit 1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
$1 != "tmk241/ink-toolset" || $2 !~ /^[0-9a-f]{40}$/ || $5 != "x86_64-linux-musl" || $6 !~ /^[0-9]+$/ || $7 !~ /^[0-9a-f]{64}$/ || $8 == "" { exit 1 }
|
||||||
|
END { if (NR < 2) exit 1 }
|
||||||
|
' "$manifest"
|
||||||
|
|
||||||
|
while IFS="$(printf '\t')" read -r source commit name group target bytes digest asset; do
|
||||||
|
[ "$source" = source_repository ] && continue
|
||||||
|
[ -f "$set/$asset" ]
|
||||||
|
[ "$(wc -c < "$set/$asset" | tr -d ' ')" = "$bytes" ]
|
||||||
|
[ "$(sha256sum "$set/$asset" | cut -d ' ' -f 1)" = "$digest" ]
|
||||||
|
file "$set/$asset" | grep -q 'statically linked'
|
||||||
|
done < "$manifest"
|
||||||
|
|
||||||
|
podman run --rm -v "$root/channels/main:/release:ro" ghcr.io/void-linux/void-musl:latest /bin/sh -c '
|
||||||
|
set -eu
|
||||||
|
/release/ink/ink-x86_64-linux-musl --help >/dev/null
|
||||||
|
count=0
|
||||||
|
for asset in /release/toolset/*-x86_64-linux-musl; do
|
||||||
|
"$asset" --help >/dev/null
|
||||||
|
count=$((count+1))
|
||||||
|
done
|
||||||
|
[ "$count" -gt 0 ]
|
||||||
|
'
|
||||||
Reference in New Issue
Block a user