1+ name : PR Build Check
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+
7+ jobs :
8+ # Quick validation - only build minimal for PRs
9+ quick-check :
10+ name : Quick PR Validation
11+ runs-on : ubuntu-22.04
12+ timeout-minutes : 90
13+
14+ steps :
15+ - name : Checkout PR
16+ uses : actions/checkout@v4
17+ with :
18+ ref : ${{ github.event.pull_request.head.sha }}
19+
20+ - name : Check layer syntax
21+ run : |
22+ # Check for common BitBake syntax errors
23+ find sources/meta-linnie* -name "*.bb" -o -name "*.bbappend" | \
24+ xargs -I {} bash -c 'echo "Checking {}"; grep -n "```" {} && exit 1 || true'
25+
26+ - name : Free up disk space
27+ run : |
28+ sudo rm -rf /usr/share/dotnet
29+ sudo rm -rf /usr/local/lib/android
30+ sudo docker image prune --all --force
31+
32+ - name : Build Docker image
33+ run : |
34+ docker build -t linnie-yocto-builder:latest \
35+ -f .devcontainer/Dockerfile .
36+
37+ - name : Cache Yocto downloads
38+ uses : actions/cache@v4
39+ with :
40+ path : ~/yocto-dl-cache
41+ key : yocto-downloads-${{ hashFiles('kas/linnie.yml') }}
42+
43+ - name : Prepare directories
44+ run : |
45+ mkdir -p ~/yocto-dl-cache ~/yocto-sstate-cache
46+ mkdir -p ~/yocto-workspace ~/yocto-build
47+
48+ - name : Quick build test (minimal only)
49+ run : |
50+ docker run --rm \
51+ -v $(pwd):/workspaces/linnie:ro \
52+ -v ~/yocto-dl-cache:/yocto/downloads \
53+ -v ~/yocto-sstate-cache:/yocto/sstate-cache \
54+ -v ~/yocto-workspace:/yocto/workspace \
55+ -v ~/yocto-build:/yocto/build \
56+ --dns=8.8.8.8 \
57+ linnie-yocto-builder:latest \
58+ bash -c "kas build /workspaces/linnie/kas/linnie.yml -- core-image-minimal"
59+
60+ - name : Post PR comment
61+ if : success()
62+ uses : actions/github-script@v7
63+ with :
64+ script : |
65+ github.rest.issues.createComment({
66+ issue_number: context.issue.number,
67+ owner: context.repo.owner,
68+ repo: context.repo.repo,
69+ body: '✅ Quick validation passed! Full builds will run after merge.'
70+ });
0 commit comments