Skip to content

Commit 9741e7e

Browse files
committed
m123-4a0a5e9906
1 parent c855d7f commit 9741e7e

File tree

7 files changed

+41
-40
lines changed

7 files changed

+41
-40
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,52 @@ on:
1313
required: true
1414
default: 'false'
1515

16+
permissions:
17+
contents: write
18+
1619
env:
17-
version: m116-d2c211228d
20+
version: m123-4a0a5e9906
1821

1922
jobs:
2023
macos:
21-
runs-on: macos-11
24+
runs-on: macos-14
2225
strategy:
2326
matrix:
2427
machine: ["x64", "arm64"]
2528
build_type: [Release, Debug]
2629
fail-fast: false
2730
steps:
28-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
2932
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
3033
if: ${{ github.event.inputs.skip_release != 'true' }}
3134
env:
32-
API_TOKEN: ${{ secrets.API_TOKEN }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3336
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
3437
- run: python3 script/checkout.py --version ${{ env.version }}
3538
- run: python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
3639
- run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
37-
- uses: actions/upload-artifact@v3
40+
- uses: actions/upload-artifact@v4
3841
with:
3942
name: Skia-${{ env.version }}-macos-${{ matrix.build_type }}-${{ matrix.machine }}.zip
4043
path: '*.zip'
4144
- run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
4245
if: ${{ github.event.inputs.skip_release != 'true' }}
4346
env:
44-
API_TOKEN: ${{ secrets.API_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4548

4649
linux:
47-
runs-on: ubuntu-20.04
50+
runs-on: ubuntu-22.04
4851
strategy:
4952
matrix:
5053
target_machine: ["x64", "arm64"]
5154
build_type: [Release, Debug]
5255
fail-fast: false
5356
steps:
54-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
5558
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
5659
if: ${{ github.event.inputs.skip_release != 'true' }}
5760
env:
58-
API_TOKEN: ${{ secrets.API_TOKEN }}
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5962
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
6063
- run: sudo ./script/prepare_linux.sh
6164
- run: |
@@ -65,42 +68,42 @@ jobs:
6568
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }}
6669
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
6770
- 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
71+
- uses: actions/upload-artifact@v4
6972
with:
7073
name: Skia-${{ env.version }}-linux-${{ matrix.build_type }}-${{ matrix.target_machine }}.zip
7174
path: '*.zip'
7275
- run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
7376
if: ${{ github.event.inputs.skip_release != 'true' }}
7477
env:
75-
API_TOKEN: ${{ secrets.API_TOKEN }}
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7679

7780
android:
7881
if: false
79-
runs-on: ubuntu-20.04
82+
runs-on: ubuntu-22.04
8083
strategy:
8184
matrix:
8285
machine: [arm, arm64, x64, x86]
8386
steps:
84-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@v4
8588
- run: python3 script/check_release.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
8689
if: ${{ github.event.inputs.skip_release != 'true' }}
8790
env:
88-
API_TOKEN: ${{ secrets.API_TOKEN }}
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8992
- uses: actions/setup-java@v1
9093
with:
9194
java-version: 1.8
9295
- run: sudo ./script/prepare_linux.sh
9396
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
9497
- 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"
9598
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --system android --machine ${{ matrix.machine }}
96-
- uses: actions/upload-artifact@v3
99+
- uses: actions/upload-artifact@v4
97100
with:
98101
name: Skia-${{ env.version }}-android-Release-${{ matrix.machine }}.zip
99102
path: '*.zip'
100103
- run: python3 script/release.py --system android --machine ${{ matrix.machine }}
101104
if: ${{ github.event.inputs.skip_release != 'true' }}
102105
env:
103-
API_TOKEN: ${{ secrets.API_TOKEN }}
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104107

105108
windows:
106109
runs-on: windows-latest
@@ -109,12 +112,12 @@ jobs:
109112
build_type: [Release, Debug]
110113
fail-fast: false
111114
steps:
112-
- uses: actions/checkout@v3
115+
- uses: actions/checkout@v4
113116
- shell: bash
114117
run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
115118
if: ${{ github.event.inputs.skip_release != 'true' }}
116119
env:
117-
API_TOKEN: ${{ secrets.API_TOKEN }}
120+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118121
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
119122
- uses: microsoft/setup-msbuild@v1
120123
- uses: ilammy/msvc-dev-cmd@v1
@@ -126,12 +129,12 @@ jobs:
126129
run: python3 script/build.py --build-type ${{ matrix.build_type }}
127130
- shell: bash
128131
run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
129-
- uses: actions/upload-artifact@v3
132+
- uses: actions/upload-artifact@v4
130133
with:
131134
name: Skia-${{ env.version }}-windows-${{ matrix.build_type }}-x64.zip
132135
path: '*.zip'
133136
- shell: bash
134137
run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
135138
if: ${{ github.event.inputs.skip_release != 'true' }}
136139
env:
137-
API_TOKEN: ${{ secrets.API_TOKEN }}
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.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: 5 additions & 5 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 96a12f111e..5ffd87e13d 100644
33
--- a/include/core/SkMatrix.h
44
+++ b/include/core/SkMatrix.h
5-
@@ -86,7 +86,7 @@ public:
5+
@@ -93,7 +93,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()); }
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()); }
1111

1212
/** Sets SkMatrix to rotate by |deg| about a pivot point at (0, 0).
1313

script/build.py

Lines changed: 3 additions & 3 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',
@@ -81,8 +81,8 @@ def main():
8181
out = os.path.join('out', build_type + '-' + machine)
8282
gn = 'gn.exe' if 'windows' == system else 'gn'
8383
subprocess.check_call([os.path.join('bin', gn), 'gen', out, '--args=' + ' '.join(args)])
84-
ninja = 'ninja.bat' if 'windows' == system else 'ninja'
85-
subprocess.check_call([os.path.join('..', 'depot_tools', ninja), '-C', out, 'skia', 'modules'])
84+
ninja = 'ninja.exe' if 'windows' == system else 'ninja'
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

script/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def classifier():
5151
def github_headers():
5252
if os.environ.get('GITHUB_BASIC'):
5353
auth = 'Basic ' + base64.b64encode(os.environ.get('GITHUB_BASIC').encode('utf-8')).decode('utf-8')
54+
elif os.environ.get('GITHUB_TOKEN'):
55+
auth = 'Bearer ' + os.environ.get('GITHUB_TOKEN')
5456
else:
5557
auth = 'token ' + os.environ.get('API_TOKEN')
5658
return {

script/prepare_linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ apt-get install gcc-9 g++-9 -y
1111
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
1212
update-alternatives --config gcc
1313

14-
apt-get install git python wget -y
15-
apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev curl zip -y
14+
apt-get install git python3 wget -y
15+
apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev curl zip -y

0 commit comments

Comments
 (0)