Skip to content

Commit 2be49a5

Browse files
committed
M034: rebuild unpublished tail without temp artifacts
1 parent 904d5d7 commit 2be49a5

File tree

244 files changed

+33443
-435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+33443
-435
lines changed

.DS_Store

-10 KB
Binary file not shown.

.github/workflows/deploy-services.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags: ['v*']
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
concurrency:
912
group: deploy-fly-${{ github.ref_name }}
1013
cancel-in-progress: false
@@ -13,6 +16,7 @@ jobs:
1316
deploy-registry:
1417
name: Deploy mesh-registry
1518
runs-on: ubuntu-latest
19+
timeout-minutes: 15
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@v4
@@ -29,6 +33,7 @@ jobs:
2933
deploy-packages-website:
3034
name: Deploy mesh-packages website
3135
runs-on: ubuntu-latest
36+
timeout-minutes: 15
3237
steps:
3338
- name: Checkout
3439
uses: actions/checkout@v4
@@ -46,21 +51,14 @@ jobs:
4651
name: Post-deploy health checks
4752
needs: [deploy-registry, deploy-packages-website]
4853
runs-on: ubuntu-latest
54+
timeout-minutes: 20
4955
steps:
50-
- name: Check registry API
51-
run: |
52-
curl -sf --retry 5 --retry-delay 10 --retry-connrefused \
53-
https://api.packages.meshlang.dev/api/v1/packages > /dev/null && \
54-
echo "Registry API: OK"
55-
56-
- name: Check packages website
57-
run: |
58-
curl -sf --retry 5 --retry-delay 10 --retry-connrefused \
59-
https://packages.meshlang.dev > /dev/null && \
60-
echo "Packages website: OK"
56+
- name: Checkout
57+
uses: actions/checkout@v4
6158

62-
- name: Check docs site
59+
- name: Verify public surface contract
60+
shell: bash
61+
timeout-minutes: 8
6362
run: |
64-
curl -sf --retry 3 --retry-delay 5 \
65-
https://meshlang.dev > /dev/null && \
66-
echo "Docs site: OK"
63+
set -euo pipefail
64+
python3 scripts/lib/m034_public_surface_contract.py public-http --root "$GITHUB_WORKSPACE" --artifact-dir "$RUNNER_TEMP/m034-public-surface-contract"

.github/workflows/deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 15
2122
steps:
2223
- name: Checkout
2324
uses: actions/checkout@v4
@@ -42,6 +43,12 @@ jobs:
4243
run: npm run build
4344
working-directory: website
4445

46+
- name: Verify public docs contract
47+
shell: bash
48+
run: |
49+
set -euo pipefail
50+
python3 scripts/lib/m034_public_surface_contract.py built-docs --root "$GITHUB_WORKSPACE" --dist-root "$GITHUB_WORKSPACE/website/docs/.vitepress/dist"
51+
4552
- name: Upload artifact
4653
uses: actions/upload-pages-artifact@v3
4754
with:
@@ -53,6 +60,7 @@ jobs:
5360
url: ${{ steps.deployment.outputs.page_url }}
5461
needs: build
5562
runs-on: ubuntu-latest
63+
timeout-minutes: 15
5664
steps:
5765
- name: Deploy to GitHub Pages
5866
id: deployment
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Extension release proof
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
verified_vsix_path:
7+
description: Repo-relative path to the verified VSIX.
8+
value: ${{ jobs.proof.outputs.verified_vsix_path }}
9+
verified_vsix_artifact_name:
10+
description: Artifact name containing the verified VSIX file.
11+
value: ${{ jobs.proof.outputs.verified_vsix_artifact_name }}
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
proof:
18+
name: Verify extension release proof
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 45
21+
outputs:
22+
verified_vsix_path: ${{ steps.capture.outputs.verified_vsix_path }}
23+
verified_vsix_artifact_name: ${{ steps.capture.outputs.verified_vsix_artifact_name }}
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Verify extension proof entrypoint
30+
shell: bash
31+
run: test -f scripts/verify-m034-s04-extension.sh
32+
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: npm
38+
cache-dependency-path: tools/editors/vscode-mesh/package-lock.json
39+
40+
- name: Cache LLVM
41+
uses: actions/cache@v4
42+
id: cache-llvm
43+
with:
44+
path: ~/llvm
45+
key: llvm-21.1.8-v3-x86_64-unknown-linux-gnu
46+
47+
- name: Install LLVM 21 (Linux x86_64)
48+
if: steps.cache-llvm.outputs.cache-hit != 'true'
49+
timeout-minutes: 10
50+
run: |
51+
LLVM_VERSION="21.1.8"
52+
LLVM_ARCHIVE="LLVM-${LLVM_VERSION}-Linux-X64.tar.xz"
53+
LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVM_ARCHIVE}"
54+
curl -sSfL "$LLVM_URL" -o llvm.tar.xz
55+
mkdir -p "$HOME/llvm"
56+
tar xf llvm.tar.xz --strip-components=1 -C "$HOME/llvm"
57+
rm llvm.tar.xz
58+
59+
- name: Set LLVM prefix (Linux tarball)
60+
shell: bash
61+
run: echo "LLVM_SYS_211_PREFIX=$HOME/llvm" >> "$GITHUB_ENV"
62+
63+
- name: Install Rust
64+
uses: dtolnay/rust-toolchain@stable
65+
timeout-minutes: 10
66+
with:
67+
targets: x86_64-unknown-linux-gnu
68+
69+
- name: Cargo cache
70+
uses: Swatinem/rust-cache@v2
71+
with:
72+
key: extension-release-proof-x86_64-unknown-linux-gnu
73+
74+
- name: Run extension release proof
75+
id: proof
76+
shell: bash
77+
timeout-minutes: 35
78+
run: |
79+
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
80+
export EXPECTED_TAG="$GITHUB_REF_NAME"
81+
fi
82+
bash scripts/verify-m034-s04-extension.sh
83+
84+
- name: Capture verified VSIX metadata
85+
id: capture
86+
shell: bash
87+
run: |
88+
verified_vsix_path="$(< .tmp/m034-s04/verify/verified-vsix-path.txt)"
89+
artifact_name="extension-release-vsix"
90+
test -n "$verified_vsix_path"
91+
test -f "$verified_vsix_path"
92+
echo "verified_vsix_path=$verified_vsix_path" >> "$GITHUB_OUTPUT"
93+
echo "verified_vsix_artifact_name=$artifact_name" >> "$GITHUB_OUTPUT"
94+
95+
- name: Upload verified VSIX
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: ${{ steps.capture.outputs.verified_vsix_artifact_name }}
99+
path: ${{ steps.capture.outputs.verified_vsix_path }}
100+
if-no-files-found: error
101+
retention-days: 7
102+
103+
- name: Upload extension proof diagnostics
104+
if: failure()
105+
uses: actions/upload-artifact@v4
106+
timeout-minutes: 5
107+
with:
108+
name: extension-release-proof-diagnostics
109+
path: .tmp/m034-s04/verify/**
110+
if-no-files-found: error
111+
retention-days: 7
Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Publish Mesh VS Code extension to VS Code Marketplace and Open VSX
2-
# Trigger: git tag ext-v0.2.0 && git push origin ext-v0.2.0
2+
# Trigger: git tag ext-vX.Y.Z && git push origin ext-vX.Y.Z
33
# Requires secrets: VS_MARKETPLACE_TOKEN, OPEN_VSX_TOKEN
44

55
name: Publish Extension
@@ -13,40 +13,41 @@ permissions:
1313
contents: read
1414

1515
jobs:
16+
proof:
17+
name: Verify extension release proof
18+
uses: ./.github/workflows/extension-release-proof.yml
19+
1620
publish:
21+
name: Publish verified extension
22+
needs:
23+
- proof
1724
runs-on: ubuntu-latest
25+
timeout-minutes: 15
1826
steps:
19-
- uses: actions/checkout@v4
20-
21-
- uses: actions/setup-node@v4
27+
- name: Download verified VSIX
28+
uses: actions/download-artifact@v4
2229
with:
23-
node-version: 20
24-
25-
- name: Install dependencies
26-
run: npm ci
27-
working-directory: tools/editors/vscode-mesh
28-
29-
- name: Compile TypeScript
30-
run: npm run compile
31-
working-directory: tools/editors/vscode-mesh
30+
name: ${{ needs.proof.outputs.verified_vsix_artifact_name }}
31+
path: tools/editors/vscode-mesh/dist/
3232

33-
- name: Package VSIX
34-
id: package
33+
- name: Confirm verified VSIX handoff
34+
shell: bash
35+
env:
36+
VERIFIED_VSIX_PATH: ${{ needs.proof.outputs.verified_vsix_path }}
3537
run: |
36-
npx vsce package --no-dependencies
37-
echo "vsix_path=$(ls *.vsix)" >> "$GITHUB_OUTPUT"
38-
working-directory: tools/editors/vscode-mesh
38+
test -n "$VERIFIED_VSIX_PATH"
39+
test -f "$VERIFIED_VSIX_PATH"
40+
echo "Publishing verified VSIX: $VERIFIED_VSIX_PATH"
3941
4042
- name: Publish to Open VSX Registry
4143
uses: HaaLeo/publish-vscode-extension@v2
42-
continue-on-error: true
4344
with:
4445
pat: ${{ secrets.OPEN_VSX_TOKEN }}
45-
extensionFile: tools/editors/vscode-mesh/${{ steps.package.outputs.vsix_path }}
46+
extensionFile: ${{ needs.proof.outputs.verified_vsix_path }}
4647

4748
- name: Publish to Visual Studio Marketplace
4849
uses: HaaLeo/publish-vscode-extension@v2
4950
with:
5051
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
5152
registryUrl: https://marketplace.visualstudio.com
52-
extensionFile: tools/editors/vscode-mesh/${{ steps.package.outputs.vsix_path }}
53+
extensionFile: ${{ needs.proof.outputs.verified_vsix_path }}

0 commit comments

Comments
 (0)