-
Notifications
You must be signed in to change notification settings - Fork 457
118 lines (105 loc) · 3.53 KB
/
autotest.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: autotest
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
mac:
# the macos-latest may randomly give us macos-12.6.9 or macos-12.7.0 which may break the autotest.
runs-on: macos-13
steps:
- name: Check Out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Get Environment Cache
id: environment-cache
uses: actions/cache/restore@v4
with:
path: |
/usr/local/Cellar/ninja
/usr/local/Cellar/icu4c
/usr/local/bin/ninja
/usr/local/Cellar/yasm
/usr/local/bin/yasm
/usr/local/Cellar/gcovr
/usr/local/bin/gcovr
/usr/local/Cellar/python-lxml
/usr/local/Cellar/python-markupsafe
/usr/local/lib/python3.12/site-packages/gcovr
/usr/local/lib/python3.12/site-packages/lxml
/usr/local/lib/python3.12/site-packages/markupsafe
key: libpag-environment-autotest-202311129
restore-keys: libpag-environment-autotest-
- name: Get Third-Party Cache
id: third-party-cache
uses: actions/cache/restore@v4
with:
path: |
third_party
test/baseline/.cache
key: third-party-autotest-${{ hashFiles('DEPS') }}-${{ hashFiles('vendor.json') }}-${{ hashFiles('test/baseline/version.json') }}
restore-keys: third-party-autotest-
- name: Run depsync
run: |
npm install depsync -g
depsync
shell: bash
- name: Check Code Format
run: |
chmod +x codeformat.sh
./codeformat.sh
shell: bash
- name: Run Autotest
run: |
mkdir -p third_party/tgfx/out/cache
chmod +x autotest.sh
./autotest.sh
- name: Run Codecov
run: |
chmod +x codecov.sh
./codecov.sh
- name: Upload Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: result/coverage.xml
version: 'v0.7.3'
- name: Save Environment Cache
if: ${{ (github.event_name == 'push') && (steps.environment-cache.outputs.cache-hit != 'true') }}
uses: actions/cache/save@v4
with:
path: |
/usr/local/Cellar/ninja
/usr/local/Cellar/icu4c
/usr/local/bin/ninja
/usr/local/Cellar/yasm
/usr/local/bin/yasm
/usr/local/Cellar/gcovr
/usr/local/bin/gcovr
/usr/local/Cellar/python-lxml
/usr/local/Cellar/python-markupsafe
/usr/local/lib/python3.12/site-packages/gcovr
/usr/local/lib/python3.12/site-packages/lxml
/usr/local/lib/python3.12/site-packages/markupsafe
key: libpag-environment-autotest-202311129
- name: Save Third-Party Cache
if: ${{ (github.event_name == 'push') && (steps.third-party-cache.outputs.cache-hit != 'true') }}
uses: actions/cache/save@v4
with:
path: |
third_party
test/baseline/.cache
key: third-party-autotest-${{ hashFiles('DEPS') }}-${{ hashFiles('vendor.json') }}-${{ hashFiles('test/baseline/version.json') }}
- name: Job Failed
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: result
path: result
- uses: actions/upload-artifact@v4
with:
name: result
path: result