Skip to content

Commit 8cdf3cb

Browse files
committed
feat: add WASIX extension assets and release workflows
Move the repository to source-controlled asset inputs with CI-generated release payloads. Keep asset and AOT crates as source-only templates, stage portable assets under crates/assets/payload during release, and remove committed runtime/AOT blobs from git. Centralize artifact download/install in xtask, add a maintainer-only LLVM AOT serializer path, tighten dependency invariants, and split source-only validation from runtime validation. Remove obsolete spike workspaces now that production WASIX build inputs live under assets/wasix-build.
1 parent 05d42e5 commit 8cdf3cb

178 files changed

Lines changed: 25182 additions & 125765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Setup Rust Tools
2+
description: Install the pinned Rust toolchain, cache Cargo output, and install optional Cargo tools.
3+
4+
inputs:
5+
toolchain:
6+
description: Rust toolchain version.
7+
required: false
8+
default: "1.92"
9+
components:
10+
description: Comma-separated Rust components.
11+
required: false
12+
default: ""
13+
cache:
14+
description: Whether to enable the Cargo cache.
15+
required: false
16+
default: "true"
17+
cache-workspaces:
18+
description: Workspace mapping for Swatinem/rust-cache.
19+
required: false
20+
default: ". -> target"
21+
cache-save-if:
22+
description: Expression string passed to Swatinem/rust-cache save-if.
23+
required: false
24+
default: "false"
25+
tools:
26+
description: Comma-separated tools for taiki-e/install-action.
27+
required: false
28+
default: ""
29+
30+
runs:
31+
using: composite
32+
steps:
33+
- name: Install Rust toolchain
34+
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
35+
with:
36+
toolchain: ${{ inputs.toolchain }}
37+
components: ${{ inputs.components }}
38+
39+
- name: Cache Cargo output
40+
if: ${{ inputs.cache == 'true' }}
41+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
42+
with:
43+
workspaces: ${{ inputs.cache-workspaces }}
44+
save-if: ${{ inputs.cache-save-if }}
45+
46+
- name: Install Cargo tools
47+
if: ${{ inputs.tools != '' }}
48+
uses: taiki-e/install-action@1f2425cdb59f8fffb99ee16a5968edf6f57a2b93
49+
with:
50+
tool: ${{ inputs.tools }}

.github/pull_request_template.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44

55
- [ ] Package/API/runtime change: PR title uses `feat:`, `fix:`, `perf:`, `refactor:`, `revert:`, or a breaking `!`.
66
- [ ] Docs/CI/repository-only change: no release intended.
7+
- [ ] Asset/source-spine change: source pins/fingerprints are current and the Assets workflow will generate/test release artifacts.
78

89
## Verification
910

10-
- [ ] `scripts/validate.sh ci`
11-
- [ ] `scripts/validate.sh release`
11+
- [ ] `scripts/validate.sh repo`
12+
- [ ] `scripts/validate.sh artifacts`
13+
- [ ] `scripts/validate.sh lint`
14+
- [ ] `scripts/validate.sh test`
15+
- [ ] `scripts/validate.sh package` when published package contents changed
1216
- [ ] `cargo deny check`

.github/scripts/check-release-changelog.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ EOF
9999
exit 1
100100
fi
101101

102-
expected_unreleased="[Unreleased]: https://github.com/f0rr0/pglite-oxide/compare/pglite-oxide-v${package_version}...HEAD"
102+
expected_unreleased="[Unreleased]: https://github.com/f0rr0/pglite-oxide/compare/${package_version}...HEAD"
103103

104104
if ! grep -Fxq "${expected_unreleased}" CHANGELOG.md; then
105105
cat >&2 <<EOF

.github/scripts/check-release-intent.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ if [[ -z "${base_versions}" || -z "${head_versions}" ]]; then
6767
exit 1
6868
fi
6969

70-
if [[ "${base_versions}" != "${head_versions}" && "${is_release_pr}" != true ]]; then
70+
changed_existing_versions="$(
71+
join -t $'\t' \
72+
<(printf '%s\n' "${base_versions}" | sed 's/=/\t/' | sort -t $'\t' -k1,1) \
73+
<(printf '%s\n' "${head_versions}" | sed 's/=/\t/' | sort -t $'\t' -k1,1) |
74+
awk -F '\t' '$2 != $3 { print $1 "=" $2 " -> " $3 }'
75+
)"
76+
77+
if [[ -n "${changed_existing_versions}" && "${is_release_pr}" != true ]]; then
7178
cat >&2 <<EOF
7279
This PR changes one or more workspace package versions.
7380
@@ -86,6 +93,9 @@ ${base_versions}
8693
8794
Head package versions:
8895
${head_versions}
96+
97+
Changed existing package versions:
98+
${changed_existing_versions}
8999
EOF
90100
exit 1
91101
fi
@@ -94,7 +104,7 @@ while IFS= read -r file; do
94104
[[ -z "${file}" ]] && continue
95105

96106
case "${file}" in
97-
Cargo.toml | Cargo.lock | build.rs | src/* | assets/* | crates/* | xtask/* | examples/* | benches/*)
107+
Cargo.toml | build.rs | src/* | crates/*)
98108
affected_files+=("${file}")
99109
;;
100110
esac
@@ -125,8 +135,9 @@ Breaking changes may use any type with !, for example:
125135
release-plz PRs are exempt only when their branch starts with release-plz- and
126136
their title starts with chore(release):.
127137
128-
Docs, CI, issue-template, and repository-only changes can keep non-release types
129-
such as docs:, ci:, chore:, style:, or test: when they do not touch package code.
138+
Docs, CI, tests, examples, xtask-only maintenance, source-checkout scripts, and
139+
other repository-only changes can keep non-release types such as docs:, ci:,
140+
chore:, style:, or test: when they do not touch published package code.
130141
131142
Received:
132143
${subject}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
: "${GITHUB_SHA:?GITHUB_SHA is required}"
5+
: "${GITHUB_TOKEN:?GITHUB_TOKEN is required}"
6+
7+
cargo run -p xtask -- assets download --sha "$GITHUB_SHA" --all-targets
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
workflow="${1:?usage: require-workflow-success.sh <workflow> <sha> [timeout-seconds]}"
5+
sha="${2:?usage: require-workflow-success.sh <workflow> <sha> [timeout-seconds]}"
6+
timeout="${3:-7200}"
7+
8+
: "${GH_TOKEN:?GH_TOKEN is required}"
9+
: "${GH_REPO:?GH_REPO is required}"
10+
11+
deadline=$((SECONDS + timeout))
12+
while true; do
13+
runs="$(gh run list \
14+
--workflow "$workflow" \
15+
--commit "$sha" \
16+
--limit 10 \
17+
--json databaseId,status,conclusion,url \
18+
--jq '.[] | [.databaseId, .status, (.conclusion // ""), .url] | @tsv')"
19+
if [ -n "$runs" ]; then
20+
echo "$runs"
21+
if echo "$runs" | awk -F '\t' '$2 == "completed" && $3 == "success" { found=1 } END { exit found ? 0 : 1 }'; then
22+
exit 0
23+
fi
24+
if echo "$runs" | awk -F '\t' '$2 == "completed" && $3 != "success" { failed=1 } END { exit failed ? 0 : 1 }'; then
25+
echo "$workflow failed for $sha" >&2
26+
exit 1
27+
fi
28+
else
29+
echo "waiting for $workflow workflow for $sha"
30+
fi
31+
if [ "$SECONDS" -ge "$deadline" ]; then
32+
echo "timed out waiting for successful $workflow workflow for $sha" >&2
33+
exit 1
34+
fi
35+
sleep 60
36+
done

0 commit comments

Comments
 (0)