Skip to content

Commit a12f4ac

Browse files
committed
CI
1 parent c855d7f commit a12f4ac

File tree

5 files changed

+28
-32
lines changed

5 files changed

+28
-32
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ on:
1414
default: 'false'
1515

1616
env:
17-
version: m116-d2c211228d
17+
version: m142-f4ed99d244
1818

1919
jobs:
2020
macos:
21-
runs-on: macos-11
21+
runs-on: macos-14
2222
strategy:
2323
matrix:
2424
machine: ["x64", "arm64"]
2525
build_type: [Release, Debug]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
3030
if: ${{ github.event.inputs.skip_release != 'true' }}
3131
env:
@@ -34,7 +34,7 @@ jobs:
3434
- run: python3 script/checkout.py --version ${{ env.version }}
3535
- run: python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
3636
- run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
37-
- uses: actions/upload-artifact@v3
37+
- uses: actions/upload-artifact@v4
3838
with:
3939
name: Skia-${{ env.version }}-macos-${{ matrix.build_type }}-${{ matrix.machine }}.zip
4040
path: '*.zip'
@@ -44,14 +44,14 @@ jobs:
4444
API_TOKEN: ${{ secrets.API_TOKEN }}
4545

4646
linux:
47-
runs-on: ubuntu-20.04
47+
runs-on: ubuntu-22.04
4848
strategy:
4949
matrix:
5050
target_machine: ["x64", "arm64"]
5151
build_type: [Release, Debug]
5252
fail-fast: false
5353
steps:
54-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
5555
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
5656
if: ${{ github.event.inputs.skip_release != 'true' }}
5757
env:
@@ -65,7 +65,7 @@ jobs:
6565
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }}
6666
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
6767
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
68-
- uses: actions/upload-artifact@v3
68+
- uses: actions/upload-artifact@v4
6969
with:
7070
name: Skia-${{ env.version }}-linux-${{ matrix.build_type }}-${{ matrix.target_machine }}.zip
7171
path: '*.zip'
@@ -76,12 +76,12 @@ jobs:
7676

7777
android:
7878
if: false
79-
runs-on: ubuntu-20.04
79+
runs-on: ubuntu-22.04
8080
strategy:
8181
matrix:
8282
machine: [arm, arm64, x64, x86]
8383
steps:
84-
- uses: actions/checkout@v3
84+
- uses: actions/checkout@v4
8585
- run: python3 script/check_release.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
8686
if: ${{ github.event.inputs.skip_release != 'true' }}
8787
env:
@@ -93,7 +93,7 @@ jobs:
9393
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
9494
- 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"
9595
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --system android --machine ${{ matrix.machine }}
96-
- uses: actions/upload-artifact@v3
96+
- uses: actions/upload-artifact@v4
9797
with:
9898
name: Skia-${{ env.version }}-android-Release-${{ matrix.machine }}.zip
9999
path: '*.zip'
@@ -109,7 +109,7 @@ jobs:
109109
build_type: [Release, Debug]
110110
fail-fast: false
111111
steps:
112-
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v4
113113
- shell: bash
114114
run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
115115
if: ${{ github.event.inputs.skip_release != 'true' }}
@@ -126,7 +126,7 @@ jobs:
126126
run: python3 script/build.py --build-type ${{ matrix.build_type }}
127127
- shell: bash
128128
run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
129-
- uses: actions/upload-artifact@v3
129+
- uses: actions/upload-artifact@v4
130130
with:
131131
name: Skia-${{ env.version }}-windows-${{ matrix.build_type }}-x64.zip
132132
path: '*.zip'

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/skia
2-
/depot_tools
32
*.zip
4-
__pycache__
3+
__pycache__

patches/warn_SkMatrix.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
2-
index 03140760d6..ec7cd35923 100644
2+
index 02c873623b..be12953daa 100644
33
--- a/include/core/SkMatrix.h
44
+++ b/include/core/SkMatrix.h
5-
@@ -86,7 +86,7 @@ public:
5+
@@ -96,7 +96,7 @@ public:
66
return m;
77
}
8-
static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkVector t) { return Translate(t.x(), t.y()); }
9-
- static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkIVector t) { return Translate(t.x(), t.y()); }
10-
+ static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkIVector t) { return Translate((SkScalar) t.x(), (SkScalar) t.y()); }
11-
12-
/** Sets SkMatrix to rotate by |deg| about a pivot point at (0, 0).
13-
8+
[[nodiscard]] static SkMatrix Translate(SkVector t) { return Translate(t.x(), t.y()); }
9+
- [[nodiscard]] static SkMatrix Translate(SkIVector t) { return Translate(t.x(), t.y()); }
10+
+ [[nodiscard]] static SkMatrix Translate(SkIVector t) { return Translate((SkScalar) t.x(), (SkScalar) t.y()); }
11+
12+
[[nodiscard]] static SkMatrix ScaleTranslate(float sx, float sy, float tx, float ty);
13+

script/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def main():
2222
'skia_use_system_libpng=false',
2323
'skia_use_system_libwebp=false',
2424
'skia_use_system_zlib=false',
25-
'skia_use_sfntly=false',
25+
# 'skia_use_sfntly=false',
2626
'skia_use_freetype=true',
2727
# 'skia_use_harfbuzz=true',
2828
'skia_use_system_harfbuzz=false',
@@ -82,7 +82,7 @@ def main():
8282
gn = 'gn.exe' if 'windows' == system else 'gn'
8383
subprocess.check_call([os.path.join('bin', gn), 'gen', out, '--args=' + ' '.join(args)])
8484
ninja = 'ninja.bat' if 'windows' == system else 'ninja'
85-
subprocess.check_call([os.path.join('..', 'depot_tools', ninja), '-C', out, 'skia', 'modules'])
85+
subprocess.check_call([os.path.join('third_party/ninja', ninja), '-C', out, 'skia', 'modules'])
8686

8787
return 0
8888

script/checkout.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ def main():
88
parser = common.create_parser(True)
99
args = parser.parse_args()
1010

11-
# Clone depot_tools
12-
if not os.path.exists("depot_tools"):
13-
subprocess.check_call(["git", "clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git", "depot_tools"])
14-
1511
# Clone Skia
1612
match = re.match('(m\\d+)(?:-([0-9a-f]+)(?:-([1-9][0-9]*))?)?', args.version)
1713
if not match:
@@ -48,12 +44,13 @@ def main():
4844
subprocess.check_call(["git", "apply", str(x)])
4945

5046
# git deps
47+
env = os.environ.copy()
5148
if 'windows' == common.system():
52-
env = os.environ.copy()
5349
env['PYTHONHTTPSVERIFY']='0'
54-
subprocess.check_call(["python3", "tools/git-sync-deps"], env=env)
55-
else:
56-
subprocess.check_call(["python3", "tools/git-sync-deps"])
50+
51+
subprocess.check_call(["python3", "tools/git-sync-deps"], env=env)
52+
subprocess.check_call(["python3", "bin/fetch-gn"], env=env)
53+
subprocess.check_call(["python3", "bin/fetch-ninja"], env=env)
5754

5855
return 0
5956

0 commit comments

Comments
 (0)