Skip to content

Commit 77e94d9

Browse files
authored
Merge pull request #6 from DrEden33773/introduction-video
feat: add FreshLoop demonstration video and optimize delivery
2 parents 533d027 + 8babcf4 commit 77e94d9

64 files changed

Lines changed: 5988 additions & 45 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.

.github/workflows/ci.yml

Lines changed: 111 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,21 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29-
native-changes:
30-
name: Detect native-relevant changes
31-
if: github.event_name == 'push'
29+
changes:
30+
name: Detect relevant changes
3231
runs-on: ubuntu-latest
3332
outputs:
34-
required: ${{ steps.paths.outputs.required }}
33+
android_native: ${{ steps.paths.outputs.android_native }}
34+
macos: ${{ steps.paths.outputs.macos }}
35+
macos_native: ${{ steps.paths.outputs.macos_native }}
36+
mobile: ${{ steps.paths.outputs.mobile }}
37+
source_package: ${{ steps.paths.outputs.source_package }}
38+
video: ${{ steps.paths.outputs.video }}
39+
windows: ${{ steps.paths.outputs.windows }}
3540

3641
steps:
3742
- name: Check out repository
43+
if: github.event_name != 'workflow_dispatch'
3844
uses: actions/checkout@v7
3945
with:
4046
fetch-depth: 0
@@ -45,21 +51,63 @@ jobs:
4551
env:
4652
BEFORE_SHA: ${{ github.event.before }}
4753
CURRENT_SHA: ${{ github.sha }}
54+
EVENT_NAME: ${{ github.event_name }}
55+
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
56+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
4857
run: |
49-
if [[ "$BEFORE_SHA" =~ ^0+$ ]]; then
50-
changed="$(git show --pretty=format: --name-only "$CURRENT_SHA")"
58+
domains=(
59+
android_native
60+
macos
61+
macos_native
62+
mobile
63+
source_package
64+
video
65+
windows
66+
)
67+
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
68+
for domain in "${domains[@]}"; do
69+
echo "$domain=false" >> "$GITHUB_OUTPUT"
70+
done
71+
exit 0
72+
fi
73+
74+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
75+
base="$PR_BASE_SHA"
76+
head="$PR_HEAD_SHA"
5177
else
52-
changed="$(git diff --name-only "$BEFORE_SHA" "$CURRENT_SHA")"
78+
base="$BEFORE_SHA"
79+
head="$CURRENT_SHA"
5380
fi
54-
if grep -Eq '^(mobile/|tools/freshloop/|tools/mac_env/|freshloop$|freshloop\.cmd$|mac_env$)' <<<"$changed"; then
55-
echo "required=true" >> "$GITHUB_OUTPUT"
81+
82+
if [[ "$base" =~ ^0+$ ]]; then
83+
changed="$(git ls-tree -r --name-only "$head")"
5684
else
57-
echo "required=false" >> "$GITHUB_OUTPUT"
85+
changed="$(git diff --name-only "$base" "$head")"
5886
fi
87+
printf '%s\n' "$changed"
88+
89+
set_output() {
90+
local name="$1"
91+
local pattern="$2"
92+
if grep -Eq "$pattern" <<<"$changed"; then
93+
echo "$name=true" >> "$GITHUB_OUTPUT"
94+
else
95+
echo "$name=false" >> "$GITHUB_OUTPUT"
96+
fi
97+
}
98+
99+
set_output mobile '^(\.github/workflows/ci\.yml$|mobile/)'
100+
set_output windows '^(\.github/workflows/ci\.yml$|tools/freshloop/|freshloop$|freshloop\.cmd$)'
101+
set_output macos '^(\.github/workflows/ci\.yml$|tools/(freshloop|mac_env)/|freshloop$|mac_env$)'
102+
set_output video '^(\.github/workflows/ci\.yml$|video/)'
103+
set_output source_package '^(\.github/workflows/ci\.yml$|mobile/|tools/(freshloop|mac_env)/|tools/(package_t22|validate_t22_package|test_package_t22|test_ci_path_gates)\.py$|freshloop$|freshloop\.cmd$|mac_env$|README\.md$|CONTRIBUTING\.md$|LICENSE$|THIRD_PARTY_NOTICES\.md$|docs/demo-script\.md$|submission/SUBMISSION-CONTENTS\.md$)'
104+
set_output android_native '^(\.github/workflows/ci\.yml$|mobile/)'
105+
set_output macos_native '^(\.github/workflows/ci\.yml$|mobile/|tools/(freshloop|mac_env)/|freshloop$|mac_env$)'
59106
60107
toolchain-contracts-windows:
61108
name: Windows toolchain contracts
62-
if: github.event_name != 'workflow_dispatch'
109+
needs: changes
110+
if: github.event_name != 'workflow_dispatch' && needs.changes.outputs.windows == 'true'
63111
runs-on: windows-latest
64112
timeout-minutes: 10
65113

@@ -81,7 +129,8 @@ jobs:
81129

82130
verify-mobile:
83131
name: Typecheck, lint, and test
84-
if: github.event_name != 'workflow_dispatch'
132+
needs: changes
133+
if: github.event_name != 'workflow_dispatch' && needs.changes.outputs.mobile == 'true'
85134
runs-on: ubuntu-latest
86135
timeout-minutes: 20
87136
defaults:
@@ -117,10 +166,54 @@ jobs:
117166
- name: Export iOS bundle
118167
run: npm run export:ios
119168

169+
verify-video:
170+
name: Typecheck and test Remotion video
171+
needs: changes
172+
if: github.event_name != 'workflow_dispatch' && needs.changes.outputs.video == 'true'
173+
runs-on: ubuntu-latest
174+
timeout-minutes: 10
175+
defaults:
176+
run:
177+
working-directory: video
178+
179+
steps:
180+
- name: Check out repository
181+
uses: actions/checkout@v7
182+
183+
- name: Set up Node.js
184+
uses: actions/setup-node@v7
185+
with:
186+
node-version: 24.14.0
187+
cache: npm
188+
cache-dependency-path: video/package-lock.json
189+
190+
- name: Install dependencies
191+
run: npm ci
192+
193+
- name: Typecheck
194+
run: npm run check
195+
196+
- name: Test video contracts
197+
run: npm run test:video
198+
199+
source-package-contracts:
200+
name: Source-package and workflow contracts
201+
needs: changes
202+
if: github.event_name != 'workflow_dispatch' && needs.changes.outputs.source_package == 'true'
203+
runs-on: ubuntu-latest
204+
timeout-minutes: 5
205+
206+
steps:
207+
- name: Check out repository
208+
uses: actions/checkout@v7
209+
210+
- name: Test source-package and CI path contracts
211+
run: python3 -m unittest -v tools/test_package_t22.py tools/test_ci_path_gates.py
212+
120213
android-release:
121214
name: Android single-ABI release build
122-
needs: native-changes
123-
if: always() && ((github.event_name == 'push' && needs.native-changes.outputs.required == 'true') || (github.event_name == 'workflow_dispatch' && inputs.android_i18n))
215+
needs: changes
216+
if: always() && ((github.event_name == 'push' && needs.changes.outputs.android_native == 'true') || (github.event_name == 'workflow_dispatch' && inputs.android_i18n))
124217
runs-on: ubuntu-latest
125218
timeout-minutes: 30
126219

@@ -204,7 +297,8 @@ jobs:
204297

205298
toolchain-contracts-macos:
206299
name: macOS toolchain contracts (${{ matrix.arch }})
207-
if: github.event_name != 'workflow_dispatch'
300+
needs: changes
301+
if: github.event_name != 'workflow_dispatch' && needs.changes.outputs.macos == 'true'
208302
runs-on: ${{ matrix.runner }}
209303
timeout-minutes: 10
210304
strategy:
@@ -247,8 +341,8 @@ jobs:
247341

248342
macos-release:
249343
name: macOS ARM native release build
250-
needs: native-changes
251-
if: always() && ((github.event_name == 'push' && needs.native-changes.outputs.required == 'true') || (github.event_name == 'workflow_dispatch' && inputs.mac_release))
344+
needs: changes
345+
if: always() && ((github.event_name == 'push' && needs.changes.outputs.macos_native == 'true') || (github.event_name == 'workflow_dispatch' && inputs.mac_release))
252346
runs-on: macos-15
253347
timeout-minutes: 35
254348

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ Thumbs.db
2424
# to a GitHub Release instead of committing them to the source history. Existing
2525
# tracked source recordings remain tracked; this pattern blocks new MP4 assets.
2626
*.mp4
27+
video/private/
28+
video/public/audio/demo/*.wav
29+
video/public/audio/demo/manifest.json
30+
video/public/recordings/demo/recording-manifest.json
31+
video/public/recordings/demo-edit/
2732
classroom-demo/FreshLoop-Android.apk
2833
submission/FreshLoop-Android.apk
2934
submission/FreshLoop-Project-Report.pdf

docs/asset-manifest.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FreshLoop planned asset manifest
22

3-
This manifest is the licensing boundary for the mobile visual system, T03 contact sheet, and T22 introduction video. No stock image, stock footage, music, voice, generated app screen, or fabricated Android screenshot is used. A new external or generated asset must be added with owner, license, provenance, and source before it can enter an app build or video render.
3+
This manifest is the licensing boundary for the mobile visual system, T03 contact sheet, T22 introduction video, and the separate Group 09 project demonstration. No stock image, stock footage, music, TTS, cloned voice, generated app screen, or fabricated Android screenshot is used. The project demonstration uses Wang Wenhan's own purpose-recorded narration. A new external or generated asset must be added with owner, license, provenance, and source before it can enter an app build or video render.
44

55
## License and provenance notes
66

@@ -9,6 +9,8 @@ This manifest is the licensing boundary for the mobile visual system, T03 contac
99
- Phosphor Icons: copyright Phosphor Icons; official core repository and source SVG catalog is `https://github.com/phosphor-icons/core`; license is MIT (`https://github.com/phosphor-icons/core/blob/main/LICENSE`). Preserve the notice in third-party notices when packaged.
1010
- FreshLoop brand typography, expiry ribbon, chapter cards, captions, loop diagram, and storyboard contact sheet are original project-team compositions made from the frozen tokens and basic geometric shapes. “Project-owned” means no third-party visual is embedded.
1111
- Android recordings were refreshed from the T21 release APK by the shared T22 recorder. Their provenance is the reproducible capture and shot log, not this document alone.
12+
- The eleven `FreshLoopDemo` recordings must come from the current release APK and stay separate from the T22 introduction sources. Their planned actions and capture boundary are in `docs/demo-video-shot-list.md`; edit proxies and final-frame holds contain only pixels deterministically derived from those verified masters.
13+
- The 24 demonstration narration clips are recorded by Wang Wenhan from the frozen English text in `docs/demo-video-script.md`. Raw and processed voice files remain local and are not committed.
1214

1315
## Human-readable inventory
1416

@@ -21,6 +23,8 @@ This manifest is the licensing boundary for the mobile visual system, T03 contac
2123
| `owned-contact-sheet` | Static SVG/PNG planning artifact | FreshLoop project team | Project-owned | Deterministic local renderer; app cells explicitly labeled placeholders | Generated in T03 |
2224
| `recipe-*` (12 catalog IDs) | Recipe visual contracts | FreshLoop project team | Project-owned | Original T07 recipe content in `mobile/src/content/recipes.ts`; future UI rendering must use project-owned shapes or recorded app UI | Catalogued in T07 |
2325
| `android-01``android-10` | Raw app recordings | FreshLoop project team | Project-owned recording | T21 release APK capture + `docs/video-shot-log.md` | Captured in T22 |
26+
| `demo-android-01``demo-android-11` | Raw app recordings | FreshLoop project team | Project-owned recording | Current release APK capture + `docs/demo-video-shot-list.md` | Captured and validated |
27+
| `demo-human-voice-01``demo-human-voice-24` | English narration | Wang Wenhan | Speaker-owned project recording | Frozen script, separate purpose-recorded clips, local processing manifest | Recorded and processed |
2428

2529
## Machine-readable asset contract
2630

0 commit comments

Comments
 (0)