forked from yamsergey/yamsergey.termux.flutter
-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (69 loc) · 2.15 KB
/
validate.yml
File metadata and controls
80 lines (69 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: validate
on:
push:
paths:
- 'patches/**'
- 'build.py'
- 'build.toml'
- 'test_build.py'
- 'utils.py'
- 'stubs/**'
- 'requirements.txt'
pull_request:
paths:
- 'patches/**'
- 'build.py'
- 'build.toml'
- 'test_build.py'
- 'utils.py'
- 'stubs/**'
- 'requirements.txt'
permissions:
contents: read
jobs:
test-python:
name: Python unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python requirements
run: pip install -r requirements.txt pytest
- name: Run unit tests
run: python3 -m pytest test_build.py -v
test-patch:
name: Verify engine patch applies to Flutter tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Read Flutter tag from build.toml
id: tag
run: |
TAG=$(python3 -c "
import tomllib
with open('build.toml', 'rb') as f:
cfg = tomllib.load(f)
print(cfg['flutter']['tag'])
")
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "Flutter tag: $TAG"
- name: Clone Flutter at configured tag (shallow)
run: |
git clone --depth=1 --branch "${{ steps.tag.outputs.TAG }}" \
https://github.com/flutter/flutter flutter
- name: Apply engine patch
working-directory: flutter
run: git apply ../patches/engine.patch
- name: Verify patched files
run: |
echo "=== engine/src/build/config/BUILDCONFIG.gn (termux sections) ==="
grep -n "is_termux\|termux:compiler\|termux:runtime_library" \
flutter/engine/src/build/config/BUILDCONFIG.gn
echo "=== engine/src/flutter/shell/testing/BUILD.gn ==="
grep -n "is_termux\|vk_swiftshader\|tester_context_vk_factory" \
flutter/engine/src/flutter/shell/testing/BUILD.gn
echo "=== New termux config files ==="
ls flutter/engine/src/build/config/termux/
ls flutter/engine/src/build/toolchain/termux/