Skip to content

Commit 58e2bd2

Browse files
authored
Merge pull request #70 from JetBrains/v.mazunin/up-skia-version-to-m138
Updated Skia version to m138-9e6b5bff162
2 parents 1f06eeb + f634487 commit 58e2bd2

File tree

3 files changed

+35
-13
lines changed

3 files changed

+35
-13
lines changed

.github/workflows/build.yml

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

1818
env:
19-
version: m132-a00c390e98-1
19+
version: m138-9e6b5bff162-1
2020

2121
jobs:
2222
macos:
@@ -174,7 +174,7 @@ jobs:
174174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175175

176176
windows:
177-
runs-on: windows-2019
177+
runs-on: windows-2022
178178
strategy:
179179
matrix:
180180
build_type: [Debug, Release]

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ Prebuilt binaries can be found [in releases](https://github.com/JetBrains/skia-p
1515

1616
## Building locally
1717

18+
Note: Better check build.yml for the detailed command for your machine
19+
1820
```sh
19-
python3 script/checkout.py --version m126-6fd3120c1b
21+
python3 script/checkout.py --version m138-9e6b5bff162
2022
python3 script/build.py
21-
python3 script/archive.py --version m126-6fd3120c1b
23+
python3 script/archive.py --version m138-9e6b5bff162
2224
```
2325

2426
To build a debug build:
2527

2628
```sh
27-
python3 script/checkout.py --version m126-6fd3120c1b
29+
python3 script/checkout.py --version m138-9e6b5bff162
2830
python3 script/build.py --build-type Debug
29-
python3 script/archive.py --version m126-6fd3120c1b --build-type Debug
31+
python3 script/archive.py --version m138-9e6b5bff162 --build-type Debug
3032
```
3133

3234
### Windows-specific

script/checkout.py

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

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

55
def checkout_skia(commit):
66
# Clone Skia
@@ -21,6 +21,30 @@ def checkout_skia(commit):
2121
print("> Checking out", commit)
2222
subprocess.check_call(["git", "-c", "advice.detachedHead=false", "checkout", commit])
2323

24+
def git_sync_with_retries(max_retries=3, backoff_seconds=5):
25+
attempt = 0
26+
while True:
27+
try:
28+
print("> Running tools/git-sync-deps (attempt {}/{})".format(attempt+1, max_retries+1))
29+
# On Windows we need to disable HTTPS verify
30+
if common.host() == 'windows':
31+
env = os.environ.copy()
32+
env['PYTHONHTTPSVERIFY'] = '0'
33+
subprocess.check_call([sys.executable, "tools/git-sync-deps"], env=env)
34+
else:
35+
subprocess.check_call([sys.executable, "tools/git-sync-deps"])
36+
print("Success")
37+
break
38+
except subprocess.CalledProcessError as e:
39+
attempt += 1
40+
if attempt > max_retries:
41+
print("All {} retries failed. Giving up.".format(max_retries))
42+
raise
43+
else:
44+
wait = backoff_seconds * attempt
45+
print(f"Failed (exit {e.returncode}), retrying in {wait}s…")
46+
time.sleep(wait)
47+
2448
def main():
2549
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
2650

@@ -40,12 +64,8 @@ def main():
4064

4165
# git deps
4266
print("> Running tools/git-sync-deps")
43-
if 'windows' == common.host():
44-
env = os.environ.copy()
45-
env['PYTHONHTTPSVERIFY']='0'
46-
subprocess.check_call(["python3", "tools/git-sync-deps"], env=env)
47-
else:
48-
subprocess.check_call(["python3", "tools/git-sync-deps"])
67+
# Trying to avoid 429 HTTP Error from Google repos
68+
git_sync_with_retries()
4969

5070
# fetch ninja
5171
print("> Fetching ninja")

0 commit comments

Comments
 (0)