mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
333ce16a77 | ||
|
|
4929f3c06d | ||
|
|
505103dacb | ||
|
|
8cbf438488 | ||
|
|
4447ff2425 |
No files matched your search
@@ -223,6 +223,9 @@ jobs:
|
||||
# (tools/release/win-bundle.sh), as Microsoft documents for app-local deployment.
|
||||
windows:
|
||||
runs-on: ${{ (vars.RELEASE_WINDOWS_RUNNER && fromJSON(vars.RELEASE_WINDOWS_RUNNER)) || 'windows-latest' }}
|
||||
# the signing identity's federated credential trusts this repository's environment "signing" and nothing else
|
||||
# (Azure app raea-release-signing); with no identity set there is no environment, and the zip is unsigned
|
||||
environment: ${{ vars.AZURE_SIGN_CLIENT_ID != '' && 'signing' || '' }}
|
||||
timeout-minutes: 350
|
||||
env:
|
||||
# the compile cache, as build's
|
||||
@@ -352,9 +355,24 @@ jobs:
|
||||
run: bash tools/release/lavapipe.sh
|
||||
- name: Where the skills gate passed
|
||||
run: bash tools/release/skills-passed.sh "$TAG" "${{ inputs.skills_passed }}"
|
||||
# raea's own Windows programs signed (#221), once the repository has the signing identity: the variables
|
||||
# AZURE_SIGN_CLIENT_ID, AZURE_SIGN_TENANT_ID and AZURE_SIGN_SUBSCRIPTION_ID name an Azure app whose federated
|
||||
# credential trusts this workflow and which holds the Artifact Signing Certificate Profile Signer role on the
|
||||
# account (no secret is stored: the job's own token is exchanged). Without them the zip is unsigned, as before
|
||||
- name: Sign in to Azure for signing
|
||||
if: ${{ vars.AZURE_SIGN_CLIENT_ID != '' }}
|
||||
uses: azure/login@v2
|
||||
with:
|
||||
client-id: ${{ vars.AZURE_SIGN_CLIENT_ID }}
|
||||
tenant-id: ${{ vars.AZURE_SIGN_TENANT_ID }}
|
||||
subscription-id: ${{ vars.AZURE_SIGN_SUBSCRIPTION_ID }}
|
||||
- name: jsign (signs raea's programs)
|
||||
if: ${{ vars.AZURE_SIGN_CLIENT_ID != '' }}
|
||||
run: choco install jsign -y --no-progress
|
||||
- name: Pack and check (tools/release.sh)
|
||||
env:
|
||||
RAEA_CHECK_DIR: ${{ runner.temp }}/release-check
|
||||
RAEA_WIN_SIGN: ${{ vars.AZURE_SIGN_CLIENT_ID != '' && '1' || '' }}
|
||||
run: bash tools/release.sh "${TAG#v}" target/dist HEAD
|
||||
# live play on Windows (PT20 left it unproven): bevy-ts's play cases, `play --offscreen` with an input script and
|
||||
# a snapshot's pixels probed, run by the raea just built; check.sh reads the pixels with ImageMagick, which the
|
||||
|
||||
Generated
+1
@@ -15003,6 +15003,7 @@ dependencies = [
|
||||
"bytemuck",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-facts",
|
||||
"raea-core-program",
|
||||
"raea-core-shape",
|
||||
"raea-gpu-device",
|
||||
|
||||
@@ -122,12 +122,22 @@ fn draw(dir: &Path, file: &str, composition: Option<&str>, how: &[&str], env: &[
|
||||
if !run.status.success() {
|
||||
return Err(format!("the held render failed: {}", err.lines().rev().take(4).collect::<Vec<_>>().into_iter().rev().collect::<Vec<_>>().join(" | ")));
|
||||
}
|
||||
Ok(())
|
||||
unshaded(out)
|
||||
}
|
||||
|
||||
/// A held run whose shaders didn't compile drew without them (a Solari pipeline that failed leaves the frame to
|
||||
/// whatever is left), and its light says nothing about the path it was held for: refused, with the shader's error.
|
||||
fn unshaded(out: &Path) -> R<()> {
|
||||
let log = std::fs::read_to_string(out.join("render.log")).unwrap_or_default();
|
||||
let Some(at) = log.find("failed to process shader") else { return Ok(()) };
|
||||
let why: Vec<&str> = log[at..].lines().skip(1).map(str::trim).filter(|l| !l.is_empty()).take(3).collect();
|
||||
Err(format!("a shader of this render didn't compile, so its frames aren't the light it was held for: {} ({}/render.log)", why.join(" "), out.display()))
|
||||
}
|
||||
|
||||
/// The held frames of `dir` measured: DIR/steady.png and steady.json written, and the report, its "steady" saying
|
||||
/// whether the light held (`max`: the blotch a run may show, percent; MAX when None).
|
||||
pub fn report(dir: &Path, max: Option<f64>) -> R<Value> {
|
||||
unshaded(dir)?;
|
||||
let max = max.unwrap_or(MAX);
|
||||
// the second half: the first is the light building from nothing, which a render's lead-in covers
|
||||
let files = held(dir)?;
|
||||
@@ -237,4 +247,17 @@ mod tests {
|
||||
assert!(blotch["blotch"].as_f64().unwrap() > 2.0, "{blotch}");
|
||||
assert!(blotch["spread"].as_f64().unwrap() > 0.6, "{blotch}");
|
||||
}
|
||||
|
||||
/// A run whose shaders failed isn't measured: its frames are another light's.
|
||||
#[test]
|
||||
fn a_run_that_drew_without_its_shaders_is_refused() {
|
||||
let dir = std::env::temp_dir().join(format!("raea-steady-unshaded-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
std::fs::write(dir.join("render.log"), "ERROR bevy_render::render_resource::pipeline_cache: failed to process shader error:\n use of a reserved word `target`\n").unwrap();
|
||||
let e = report(&dir, None).unwrap_err();
|
||||
assert!(e.contains("didn't compile") && e.contains("reserved word"), "{e}");
|
||||
std::fs::write(dir.join("render.log"), "APPLIED 96 frames\n").unwrap();
|
||||
assert!(unshaded(&dir).is_ok());
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ raea-sys-gi = { path = "../../systems/gi" }
|
||||
bevy = { version = "=0.20.0", default-features = false, features = ["std", "default_app", "multi_threaded", "3d_bevy_render", "ui_bevy_render", "png", "tonemapping_luts", "ktx2", "zstd_rust"] }
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "hdr"] }
|
||||
# an edit as rows keyed per frame, and 3D shapes as values (docs/media.feature M2)
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
raea-core-program = { path = "../../core/program" }
|
||||
# procedural surfaces on a mesh row (`proc`)
|
||||
raea-sys-procmat = { path = "../../systems/procmat" }
|
||||
|
||||
@@ -128,7 +128,7 @@ impl Engine {
|
||||
app.add_plugins((raea_plugins::RaeaPlugins, raea_plugins::RegisteredPlugins { fps: prog.fps }));
|
||||
app.sub_app_mut(bevy::render::RenderApp).add_systems(
|
||||
bevy::render::Render,
|
||||
wait_pipelines.in_set(bevy::render::RenderSystems::Render).before(bevy::render::renderer::render_system),
|
||||
(wait_pipelines, failed_pipelines).chain().in_set(bevy::render::RenderSystems::Render).before(bevy::render::renderer::render_system),
|
||||
);
|
||||
// overlapping fog volumes composited in one order whatever frames came before (raea-sys-fog's FogRank)
|
||||
app.sub_app_mut(bevy::render::RenderApp)
|
||||
@@ -292,3 +292,22 @@ fn solari_cut(mut cams: Query<(&raea_sys_post::cut::CameraCut, &mut bevy::solari
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A pipeline whose shader didn't compile draws nothing, and the frame comes out without its pass (Solari's light, a
|
||||
/// material): an error of the render, said once a pipeline, so `raea render` ends on it instead of "0 errors" over a
|
||||
/// picture that isn't the scene's (11-25: a reserved word in a shader, and three held runs measured as if lit). A
|
||||
/// shader still loading is Bevy's to retry, not a failure.
|
||||
fn failed_pipelines(cache: Res<bevy::render::render_resource::PipelineCache>, mut told: Local<std::collections::HashSet<usize>>) {
|
||||
use bevy::render::render_resource::CachedPipelineState;
|
||||
use bevy::shader::ShaderCacheError;
|
||||
for (i, p) in cache.pipelines().enumerate() {
|
||||
let CachedPipelineState::Err(e) = &p.state else { continue };
|
||||
if matches!(e, ShaderCacheError::ShaderNotLoaded(_) | ShaderCacheError::ShaderImportNotYetAvailable) || !told.insert(i) {
|
||||
continue;
|
||||
}
|
||||
let why = e.to_string();
|
||||
let found = raea_core_facts::Finding::new("shader", raea_core_facts::Level::Error, format!("a shader didn't compile, so its pass isn't in the picture: {}", why.lines().map(str::trim).filter(|l| !l.is_empty()).take(4).collect::<Vec<_>>().join(" ")), "raea render");
|
||||
eprintln!("raea: {}", found.line());
|
||||
raea_core_facts::finding::said(&[found]);
|
||||
}
|
||||
}
|
||||
@@ -59,8 +59,8 @@ raea_plugin! {
|
||||
ProcMatPlugin: raea_sys_procmat::install, "Procedural surfaces: wood, stone, brick, tiles and the rest, with dust and dirt (systems/procmat).";
|
||||
PaintPlugin: super::paint::install, "The paint and cartoon looks' surfaces (paint.rs).";
|
||||
PassesPlugin: super::passes::install, "Render passes per view (passes.rs).";
|
||||
TracedAoPlugin: raea_sys_rt::passes, "Traced passes: ambient occlusion, raea GI's world probes and the sun's far shadow map (raea-sys-rt).";
|
||||
GiScreenPlugin: raea_sys_gi::install, "raea GI's light on screen: each pixel's indirect diffuse from the world cache, read by the main pass (raea-sys-gi, RAEA_GI=1).";
|
||||
TracedAoPlugin: raea_sys_rt::passes, "Traced passes: ambient occlusion, raealism's world probes and the sun's far shadow map (raea-sys-rt).";
|
||||
GiScreenPlugin: raea_sys_gi::install, "raealism's light on screen: each pixel's indirect diffuse from the world cache, read by the main pass (raea-sys-gi, RAEA_GI=1).";
|
||||
VolumePlugin: super::volume::install, "Simulated smoke, clouds and contrails, raymarched (volume.rs).";
|
||||
GrassPlugin: raea_sys_grass::install, "Fields of grass, made in tiles as detailed as the camera's distance asks (systems/grass).";
|
||||
DetailPlugin: raea_sys_lod::install, "Where each part is drawn: levels by distance or size on screen, cross-faded, draw distance and shadows left to a coarser level (raea-sys-lod, docs/realism.feature LT21).";
|
||||
|
||||
+30
-1
@@ -143,7 +143,8 @@ open my $f, '>:raw', $out or die "$out: $!";
|
||||
print $f 'RIFF', pack('V', 36 + 2 * $n), 'WAVEfmt ', pack('VvvVVvv', 16, 1, 1, $sr, 2 * $sr, 2, 16), 'data', pack('V', 2 * $n), pack('s<*', @s);
|
||||
PL
|
||||
(cd "$check/song" && HOME="$check/song/home" LOCALAPPDATA="$check/song/home" RAEA_NO_TREE=1 "$raea" song loop.wav > song.log 2>&1) || { tail -20 "$check/song/song.log" >&2; fail "the unpacked raea didn't map a song"; }
|
||||
tempo=$(jq -r '.tempo' "$check/song/loop.song.json" | tr -d '\r')
|
||||
# (read without jq: a person's PC has none, tools/release-machines.sh)
|
||||
tempo=$(tr -d '\r\n' < "$check/song/loop.song.json" | sed -n 's/.*"tempo"[[:space:]]*:[[:space:]]*\([0-9.eE+-]*\).*/\1/p')
|
||||
awk -v t="$tempo" 'BEGIN { exit !(t >= 118 && t <= 122) }' || fail "raea song read the 120 BPM loop as $tempo BPM"
|
||||
# engine only: no raea API in the binaries, nothing key-shaped anywhere
|
||||
api=$(cat "$check"/raea/bin/* | grep -aoE '(api|sign)\.raea\.io|RAEA_(SIGN|GEN)_TOKEN' | sort -u | tr '\n' ' ' || true)
|
||||
@@ -172,5 +173,33 @@ if [ -f "$check/raea/bin/raea.exe" ]; then
|
||||
done
|
||||
"$check/raea/bin/uv.exe" --version 2>&1 | grep -q '^uv ' || fail "bin/uv.exe doesn't run"
|
||||
fi
|
||||
# RAEA_CHECK_HARD=1 (tools/release-machines.sh, on real machines: a PC's own GPU, the Linux box): what reports from
|
||||
# other systems needed and a runner's one pass doesn't show.
|
||||
if [ "${RAEA_CHECK_HARD:-}" = 1 ]; then
|
||||
# a project in a folder with a space and letters outside ASCII, as a person's own folders have ("C:\Users\José M\"):
|
||||
# the page, its 3D, and an MP4 of it (#40-#42, #78, #169: paths read as URLs, as \\?\ paths, with backslashes kept)
|
||||
hard="$check/José's work/proj é"
|
||||
mkdir -p "$hard" && cp "$check/p/hello.tsx" "$check/3d/cube.tsx" "$hard/"
|
||||
(cd "$hard" && RAEA_NO_TREE=1 RUST_BACKTRACE=1 "$raea" render hello.tsx --frame 3 -o "héllo out.png" > render.log 2>&1 && [ -s "héllo out.png" ]) || { tail -20 "$hard/render.log" >&2; fail "no frame from a folder with a space and letters outside ASCII"; }
|
||||
! grep -q "is all black" "$hard/render.log" || fail "the frame from a folder with a space and letters outside ASCII is all black"
|
||||
# 3D on this machine's own GPU: Windows too, which a runner (WARP, lavapipe) never draws on (#66: an AMD GPU drew nothing)
|
||||
(cd "$hard" && RAEA_NO_TREE=1 RUST_BACKTRACE=1 "$raea" render cube.tsx --frame 3 -o cube.png > cube.log 2>&1 && [ -s cube.png ]) || { tail -20 "$hard/cube.log" >&2; fail "no 3D frame on this machine's GPU"; }
|
||||
! grep -q "is all black" "$hard/cube.log" || fail "the 3D frame on this machine's GPU is all black"
|
||||
(cd "$hard" && RAEA_NO_TREE=1 RUST_BACKTRACE=1 "$raea" render hello.tsx -o hello.mp4 > mp4.log 2>&1 && [ -s hello.mp4 ]) || { tail -20 "$hard/mp4.log" >&2; fail "no MP4 from a folder with a space and letters outside ASCII"; }
|
||||
# the same render over and over: a crash one run in many is still a crash (#65: a segfault at exit, 1 run in 160, after
|
||||
# the frames were written), so every run's exit is read, not only its file
|
||||
n=${RAEA_CHECK_REPEATS:-40}
|
||||
for i in $(seq "$n"); do
|
||||
(cd "$hard" && RAEA_NO_TREE=1 "$raea" render cube.tsx --frame $((i % 9)) -o "again.png" > again.log 2>&1) || { s=$?; tail -20 "$hard/again.log" >&2; fail "run $i of $n of the same 3D render ended with exit $s"; }
|
||||
done
|
||||
# two renders at once, each in its own folder: neither takes the other's work folder away (#29)
|
||||
mkdir -p "$hard/a" "$hard/b" && cp "$hard/hello.tsx" "$hard/a/" && cp "$hard/hello.tsx" "$hard/b/"
|
||||
(cd "$hard/a" && RAEA_NO_TREE=1 "$raea" render hello.tsx -o out.mp4 > render.log 2>&1) & pa=$!
|
||||
(cd "$hard/b" && RAEA_NO_TREE=1 "$raea" render hello.tsx -o out.mp4 > render.log 2>&1) & pb=$!
|
||||
wait $pa || { tail -20 "$hard/a/render.log" >&2; fail "one of two renders running at once failed"; }
|
||||
wait $pb || { tail -20 "$hard/b/render.log" >&2; fail "one of two renders running at once failed"; }
|
||||
[ -s "$hard/a/out.mp4" ] && [ -s "$hard/b/out.mp4" ] || fail "two renders at once didn't both write their MP4"
|
||||
echo "release: the hard pass too: a folder with a space and letters outside ASCII, 3D on this GPU, $n runs of one render, two at once"
|
||||
fi
|
||||
echo "release: $archive checked: an unpacked copy rendered a frame and checked an app on both targets with RAEA_NO_TREE=1"
|
||||
rm -rf "$check"
|
||||
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash
|
||||
# The engine's release check run on real machines, hard pass and all (tools/release-check.sh with RAEA_CHECK_HARD=1):
|
||||
# a release's Windows zip on the Windows PC, on its own GPU, and its Linux tarball on the Linux box. release.yml's
|
||||
# runners check each archive once, on a software GPU on Windows; what people reported from their own machines (a folder
|
||||
# with a space or an accent in its name, an AMD or NVIDIA GPU, a crash one run in many, two renders at once) only shows
|
||||
# on a machine like theirs. This is the engine's half of the app's tools/raea-app/everywhere.sh (raea-platform).
|
||||
# tools/release-machines.sh VERSION [linux windows] e.g. tools/release-machines.sh 0.1.10-rc3
|
||||
# The archives come from the release (kept in ~/.cache/raea-app/engine-VERSION, as everywhere.sh keeps them), go to each
|
||||
# machine, are checked there and removed. One line per machine at the end; exit 1 names what failed.
|
||||
# RAEA_WIN_CHECK_HOST names the PC; RAEA_LINUX_BOX the Sprite; RAEA_CHECK_REPEATS how many times the one render repeats (40).
|
||||
set -uo pipefail
|
||||
version=${1:?usage: release-machines.sh VERSION [linux windows]}
|
||||
version=${version#v}
|
||||
shift
|
||||
machines=("$@"); [ ${#machines[@]} -gt 0 ] || machines=(linux windows)
|
||||
REPO=shinyobjectz/raea
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
cache="$HOME/.cache/raea-app/engine-$version"; mkdir -p "$cache"
|
||||
logs=${RAEA_MACHINES_LOGS:-$(mktemp -d)}; mkdir -p "$logs"
|
||||
repeats=${RAEA_CHECK_REPEATS:-40}
|
||||
archive() {
|
||||
local name=$1
|
||||
[ -f "$cache/$name" ] || gh release download "v$version" -R "$REPO" -p "$name" -p "$name.sha256" -D "$cache" --clobber >&2 || return 1
|
||||
(cd "$cache" && shasum -a 256 -c "$name.sha256" >/dev/null) || { echo "FAIL $name doesn't match its .sha256" >&2; return 1; }
|
||||
echo "$cache/$name"
|
||||
}
|
||||
# the check and what it reads beside itself (release/win-bundle.files), as one small tarball
|
||||
kit="$logs/kit.tar"
|
||||
tar -cf "$kit" -C "$root/tools" release-check.sh release/win-bundle.files || exit 1
|
||||
|
||||
linux() {
|
||||
local a; a=$(archive "raea-$version-linux-x86_64.tar.gz") || return 1
|
||||
# shellcheck disable=SC1091
|
||||
. "$root/sdk/cloud/deploy/sprites/org.sh" || { echo "FAIL no Sprite org"; return 1; }
|
||||
local S=(-o "$ORG" -s "${RAEA_LINUX_BOX:-raea-linux}") dir="raea-engine-check-$(date +%s)-$$"
|
||||
sprite exec --no-stdin "${S[@]}" -- bash -c "mkdir -p ~/$dir" || { echo "FAIL the Linux box isn't reachable"; return 1; }
|
||||
local want got
|
||||
want=$(wc -c < "$a" | tr -d ' ')
|
||||
got=$(sprite exec "${S[@]}" -- bash -c "cat > ~/$dir/raea.tar.gz && wc -c < ~/$dir/raea.tar.gz" < "$a" | tr -dc 0-9)
|
||||
[ "$got" = "$want" ] || { echo "FAIL the archive didn't reach the Linux box whole (${got:-0} of $want bytes)"; return 1; }
|
||||
sprite exec "${S[@]}" -- bash -c "tar -xf - -C ~/$dir" < "$kit" || { echo "FAIL copying the check"; return 1; }
|
||||
echo "machines: the check is running on the Linux box"
|
||||
# (no stdin of ours held open: a check started with it open sits silent, 11-25; under Xvfb, as release.yml runs it:
|
||||
# the app check opens a window, and the box has no screen)
|
||||
sprite exec --no-stdin "${S[@]}" -- bash -c "cd ~/$dir && RAEA_CHECK_HARD=1 RAEA_CHECK_REPEATS=$repeats timeout 2400 xvfb-run -a -s '-screen 0 1280x1024x24' bash release-check.sh ~/$dir/raea.tar.gz > check.out 2>&1 < /dev/null; code=\$?; tail -40 check.out; cd ~ && rm -rf ~/$dir; exit \$code"
|
||||
}
|
||||
|
||||
windows() {
|
||||
local a; a=$(archive "raea-$version-windows-x86_64.zip") || return 1
|
||||
local host=${RAEA_WIN_CHECK_HOST:-cuda-box} dir="raea-engine-check-$(date +%s)-$$"
|
||||
ssh -o ConnectTimeout=15 "$host" "mkdir $dir" >/dev/null || { echo "FAIL the PC isn't reachable over ssh"; return 1; }
|
||||
# shellcheck disable=SC2064
|
||||
trap "ssh -o ConnectTimeout=15 '$host' 'rmdir /s /q $dir' >/dev/null 2>&1" RETURN
|
||||
local free
|
||||
free=$(ssh "$host" "powershell -NoProfile -Command [math]::Floor((Get-PSDrive C).Free/1MB)" | tr -dc 0-9)
|
||||
[ "${free:-0}" -ge 3000 ] || { echo "FAIL the PC has ${free:-?} MB free on C:, and the check needs 3000"; return 1; }
|
||||
scp -q "$a" "$host:$dir/raea.zip" && scp -q "$kit" "$host:$dir/kit.tar" || { echo "FAIL copying the archive to the PC"; return 1; }
|
||||
# the PC's ssh shell is cmd, which takes `>` and `&&` in a command for itself: the check's line goes as a file
|
||||
printf 'cd ~/%s && tar -xf kit.tar && RAEA_CHECK_HARD=1 RAEA_CHECK_REPEATS=%s RAEA_CHECK_DIR="$PWD/c" bash release-check.sh "$PWD/raea.zip" > check.out 2>&1; code=$?; tail -40 check.out; exit $code\n' "$dir" "$repeats" > "$logs/win-run.sh"
|
||||
scp -q "$logs/win-run.sh" "$host:$dir/run.sh" || { echo "FAIL copying the check to the PC"; return 1; }
|
||||
echo "machines: the check is running on the PC"
|
||||
ssh "$host" "\"C:\\Program Files\\Git\\bin\\bash.exe\" $dir/run.sh"
|
||||
}
|
||||
|
||||
echo "machines: the engine $version on: ${machines[*]} (logs: $logs)"
|
||||
pids=()
|
||||
for m in "${machines[@]}"; do
|
||||
case $m in linux | windows) ;; *) echo "machines: linux or windows, not $m"; exit 2 ;; esac
|
||||
"$m" > "$logs/$m.log" 2>&1 &
|
||||
pids+=($!)
|
||||
done
|
||||
failed=()
|
||||
for i in "${!machines[@]}"; do
|
||||
m=${machines[$i]}
|
||||
if wait "${pids[$i]}"; then
|
||||
echo "machines: $m ok $(grep -h 'the hard pass too' "$logs/$m.log" | tail -1)"
|
||||
else
|
||||
echo "machines: $m FAILED $(grep -h -E '^(FAIL|release: )' "$logs/$m.log" | tail -1)"; failed+=("$m")
|
||||
fi
|
||||
done
|
||||
[ ${#failed[@]} -eq 0 ] || { echo "FAIL ${failed[*]} (engine $version; logs in $logs)"; exit 1; }
|
||||
echo "ok the engine $version on ${machines[*]}"
|
||||
@@ -206,6 +206,12 @@ for md in "$stage"/share/raea/skills/*/SKILL.md; do
|
||||
perl -0pi -e 's/\A---\n(.*?)\n---\n/"---\n" . join("\n", grep { !\/^version:\/ } split(\/\n\/, $1)) . "\nversion: '"$version"'\n---\n"/se' "$md"
|
||||
done
|
||||
if [ $platform = windows-x86_64 ]; then
|
||||
# RAEA_WIN_SIGN=1: raea's own programs signed before they're zipped (tools/release/win-sign.sh, #221). Off, the zip is
|
||||
# as it was: unsigned, which Smart App Control blocks on a PC that has it on
|
||||
if [ "${RAEA_WIN_SIGN:-}" = 1 ]; then
|
||||
bash "$root/tools/release/win-sign.sh" "$stage/bin/raea.exe" "$stage/bin/raea_bundle.dll" "$stage/bin/raea-perceive.exe" "$stage/bin/raea-rune-host.exe" "$stage/bin/raea-page-host.exe" ||
|
||||
{ echo "release.sh: raea's Windows programs couldn't be signed (RAEA_WIN_SIGN=1)" >&2; exit 1; }
|
||||
fi
|
||||
archive=$name.zip
|
||||
rm -f "$out/$archive"
|
||||
(cd "$(dirname "$stage")" && 7z a -tzip -bso0 -bsp0 "$out/$archive" raea)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Authenticode-signs raea's own Windows programs before release.sh zips them (#221: Smart App Control and SmartScreen
|
||||
# block an unsigned raea.exe and its DLL on a PC that has them on). release.sh calls it when RAEA_WIN_SIGN=1, with the
|
||||
# files; the others in bin\ (Microsoft's, FFmpeg, uv) keep their makers' signatures or none, and are never re-signed.
|
||||
# The same account and profile as the app's (raea-platform tools/raea-app/win/sign.sh): Azure Artifact Signing, account
|
||||
# raeasigning, timestamped by Microsoft's TSA so a signature outlives its days-long certificate. The access token comes
|
||||
# from the Azure CLI, signed in by a person (az login) or by the release workflow's own identity (azure/login).
|
||||
# tools/release/win-sign.sh FILE...
|
||||
set -euo pipefail
|
||||
[ $# -gt 0 ] || { echo "usage: win-sign.sh FILE..." >&2; exit 2; }
|
||||
command -v jsign >/dev/null || { echo "win-sign.sh: no jsign (brew install jsign; choco install jsign)" >&2; exit 1; }
|
||||
endpoint=${RAEA_SIGN_ENDPOINT:-eus.codesigning.azure.net}
|
||||
account=${RAEA_SIGN_ACCOUNT:-raeasigning}
|
||||
profile=${RAEA_SIGN_PROFILE:-raea-app}
|
||||
token=$(az account get-access-token --resource https://codesigning.azure.net --query accessToken -o tsv | tr -d '\r') ||
|
||||
{ echo "win-sign.sh: no Azure token (az login)" >&2; exit 1; }
|
||||
jsign --storetype TRUSTEDSIGNING --keystore "$endpoint" --storepass "$token" --alias "$account/$profile" \
|
||||
--tsaurl http://timestamp.acs.microsoft.com --tsmode RFC3161 --replace --name raea --url https://raea.io "$@"
|
||||
Reference in new issue
Block a user