Skip to content

Commit 5cd392e

Browse files
committed
m132-9ab7c2064b
1 parent 28f7147 commit 5cd392e

File tree

6 files changed

+42
-62
lines changed

6 files changed

+42
-62
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717
contents: write
1818

1919
env:
20-
version: m123-4a0a5e9906
20+
version: m132-9ab7c2064b
2121

2222
jobs:
2323
macos:
@@ -50,7 +50,7 @@ jobs:
5050
runs-on: ubuntu-22.04
5151
strategy:
5252
matrix:
53-
target_machine: ["x64", "arm64"]
53+
target_machine: ["x64"]
5454
build_type: [Release, Debug]
5555
fail-fast: false
5656
steps:
@@ -77,34 +77,6 @@ jobs:
7777
env:
7878
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7979

80-
android:
81-
if: false
82-
runs-on: ubuntu-22.04
83-
strategy:
84-
matrix:
85-
machine: [arm, arm64, x64, x86]
86-
steps:
87-
- uses: actions/checkout@v4
88-
- run: python3 script/check_release.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
89-
if: ${{ github.event.inputs.skip_release != 'true' }}
90-
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92-
- uses: actions/setup-java@v1
93-
with:
94-
java-version: 1.8
95-
- run: sudo ./script/prepare_linux.sh
96-
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
97-
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --system android --machine ${{ matrix.machine }} --ndk "/usr/local/lib/android/sdk/ndk-bundle"
98-
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --system android --machine ${{ matrix.machine }}
99-
- uses: actions/upload-artifact@v4
100-
with:
101-
name: Skia-${{ env.version }}-android-Release-${{ matrix.machine }}.zip
102-
path: '*.zip'
103-
- run: python3 script/release.py --system android --machine ${{ matrix.machine }}
104-
if: ${{ github.event.inputs.skip_release != 'true' }}
105-
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107-
10880
windows:
10981
runs-on: windows-latest
11082
strategy:

patches/GrD3DUtil.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

script/archive.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,18 @@ def main():
2323
'out/' + build_type + '-' + machine + '/*.a',
2424
'out/' + build_type + '-' + machine + '/*.lib',
2525
'out/' + build_type + '-' + machine + '/icudtl.dat',
26+
'out/' + build_type + '-' + machine + '/defines.cmake',
2627
'include/**/*',
27-
'modules/particles/include/*.h',
28-
'modules/skcms/skcms.h',
29-
'modules/skcms/src/skcms_public.h',
30-
'modules/skottie/include/*.h',
31-
'modules/skottie/src/*.h',
32-
'modules/skottie/src/animator/*.h',
33-
'modules/skottie/src/effects/*.h',
34-
'modules/skottie/src/layers/*.h',
35-
'modules/skottie/src/layers/shapelayer/*.h',
36-
'modules/skottie/src/text/*.h',
37-
'modules/skparagraph/include/*.h',
38-
'modules/skplaintexteditor/include/*.h',
39-
'modules/skresources/include/*.h',
40-
'modules/sksg/include/*.h',
41-
'modules/skshaper/include/*.h',
42-
'modules/skshaper/src/*.h',
43-
'modules/skunicode/include/*.h',
44-
'modules/svg/include/*.h',
28+
'modules/particles/**/*.h',
29+
'modules/skcms/**/*.h',
30+
'modules/skottie/**/*.h',
31+
'modules/skparagraph/**/*.h',
32+
'modules/skplaintexteditor/**/*.h',
33+
'modules/skresources/**/*.h',
34+
'modules/sksg/**/*.h',
35+
'modules/skshaper/**/*.h',
36+
'modules/skunicode/**/*.h',
37+
'modules/svg/**/*.h',
4538
'src/**/*.h',
4639
'third_party/externals/angle2/LICENSE',
4740
'third_party/externals/angle2/include/**/*',

script/build.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#! /usr/bin/env python3
22

3-
import common, os, subprocess, sys
3+
import common, os, re, subprocess, sys
44

55
def main():
6-
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir, 'skia'))
6+
os.chdir(f'{common.basedir}/skia')
77

88
build_type = common.build_type()
99
machine = common.machine()
@@ -78,12 +78,27 @@ def main():
7878
'ndk="' + ndk + '"'
7979
]
8080

81+
# Generate build instructions
8182
out = os.path.join('out', build_type + '-' + machine)
8283
gn = 'gn.exe' if 'windows' == system else 'gn'
8384
subprocess.check_call([os.path.join('bin', gn), 'gen', out, '--args=' + ' '.join(args)])
85+
86+
# Compile
8487
ninja = 'ninja.exe' if 'windows' == system else 'ninja'
8588
subprocess.check_call([os.path.join('third_party/ninja', ninja), '-C', out, 'skia', 'modules'])
8689

90+
# Extract all unique defines from ninja commands
91+
ninja_commands = subprocess.check_output([os.path.join('third_party/ninja', ninja), '-C', out, '-t', 'commands'], text=True)
92+
defines = set()
93+
for match in re.finditer(r'-D(\S+)', ninja_commands):
94+
defines.add(match.group(1))
95+
defines_file = os.path.join(out, 'defines.cmake')
96+
with open(defines_file, 'w') as f:
97+
f.write('add_definitions(\n')
98+
for define in sorted(defines):
99+
f.write(' -D' + define.replace('\\', '') + '\n')
100+
f.write(')\n')
101+
87102
return 0
88103

89104
if __name__ == '__main__':

script/clean.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /usr/bin/env python3
2+
import common, os, shutil, sys
3+
4+
def main():
5+
os.chdir(common.basedir)
6+
shutil.rmtree("skia/out", ignore_errors=True)
7+
return 0
8+
9+
if __name__ == '__main__':
10+
sys.exit(main())

script/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import argparse, base64, os, platform, re, subprocess
44

5+
basedir = os.path.abspath(os.path.dirname(__file__) + '/..')
6+
57
def create_parser(version_required=False):
68
parser = argparse.ArgumentParser()
79
parser.add_argument('--build-type', default='Release')

0 commit comments

Comments
 (0)