Skip to content

Commit 5245cc0

Browse files
committed
Add CI job to run rust score recalc
Signed-off-by: Nico Burns <[email protected]>
1 parent 417fccd commit 5245cc0

File tree

4 files changed

+121
-0
lines changed

4 files changed

+121
-0
lines changed

.github/workflows/rust-scoring.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Rust Scoring
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
score:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
- name: Install wpt cli
14+
run: cargo install [email protected]
15+
- name: Recalc scores
16+
run: wpt calc-scores --in ./runs-2020 --out ./site/scores.json --focus-areas ./focus-areas.json
17+
- uses: actions/upload-artifact@v4
18+
with:
19+
name: scores.json
20+
path: ./site/scores.json
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: RUST Nightly job to update internal WPT dashboard
2+
3+
on:
4+
pull_request:
5+
# Run an 2.5 hours after servo nightly job
6+
schedule:
7+
- cron: '0 8 * * *'
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
pages: write
14+
id-token: write
15+
16+
env:
17+
RUST_BACKTRACE: 1
18+
SHELL: /bin/bash
19+
20+
jobs:
21+
wpt-for-layout-2020:
22+
uses: ./.github/workflows/run-wpt.yml
23+
with:
24+
layout-engine: 2020
25+
artifact-name: wpt-chunks-2020
26+
27+
process-new-run:
28+
name: Process all chunks and update metrics
29+
runs-on: ubuntu-24.04
30+
needs:
31+
- wpt-for-layout-2020
32+
steps:
33+
- name: Checkout dashboard repo
34+
uses: actions/checkout@v3
35+
with:
36+
ref: main
37+
- name: Download wpt results for layout 2020
38+
uses: actions/download-artifact@v4
39+
with:
40+
path: wpt-chunks-2020
41+
pattern: wpt-chunks-2020-*
42+
merge-multiple: true
43+
- name: Install wpt cli
44+
run: cargo install [email protected]
45+
- name: Process new test results
46+
run: |
47+
CURRENT_DATE=$(date +"%Y-%m-%d")
48+
mkdir -p runs-2020
49+
wpt merge --in ./wpt-chunks-2020 --out ./merged-wpt-report.json
50+
wpt convert --in ./merged-wpt-report.json --out ./servo-score-report.json --js-sort
51+
xz -z ./servo-score-report.json -e
52+
cp ./servo-score-report.json.xz ./runs-2020/$CURRENT_DATE.json.xz
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: servo-score-report.json.xz
56+
path: ./servo-score-report.json.xz
57+
compression: 0
58+
# git config user.name github-actions
59+
# git config user.email [email protected]
60+
# git add runs-2020/${CURRENT_DATE}.xz
61+
# git commit -m "Add runs for $CURRENT_DATE"
62+
# git push
63+
64+
# - name: Setup Pages
65+
# uses: actions/configure-pages@v3
66+
# - name: Upload Pages artifact
67+
# uses: actions/upload-pages-artifact@v3
68+
# with:
69+
# path: 'site'
70+
# - name: Deploy to GitHub Pages
71+
# id: deployment
72+
# uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/node_modules
2+
/site
23
.DS_Store

focus-areas.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[
2+
{ "name": "All WPT tests", "areas": [""] },
3+
{ "name": "/content-security-policy/", "areas": ["/content-security-policy"] },
4+
{ "name": "/css/", "areas": ["/css"] },
5+
{ "name": "/css/CSS2/", "areas": ["/css/CSS2"] },
6+
{ "name": "/css/CSS2/abspos/", "areas": ["/css/CSS2/abspos"] },
7+
{ "name": "/css/CSS2/box-display/", "areas": ["/css/CSS2/box-display"] },
8+
{ "name": "/css/CSS2/floats/", "areas": ["/css/CSS2/floats"] },
9+
{ "name": "/css/CSS2/floats-clear/", "areas": ["/css/CSS2/floats-clear"] },
10+
{ "name": "/css/CSS2/linebox/", "areas": ["/css/CSS2/linebox"] },
11+
{ "name": "/css/CSS2/margin-padding-clear/", "areas": ["/css/CSS2/margin-padding-clear"] },
12+
{ "name": "/css/CSS2/normal-flow/", "areas": ["/css/CSS2/normal-flow"] },
13+
{ "name": "/css/CSS2/positioning/", "areas": ["/css/CSS2/positioning"] },
14+
{ "name": "/css/CSS2/tables/ & /css/css-tables/", "areas": [ "/css/CSS2/tables", "/css/css-tables" ] },
15+
{ "name": "/css/cssom/", "areas": ["/css/cssom"] },
16+
{ "name": "/css/css-align/", "areas": ["/css/css-align"] },
17+
{ "name": "/css/css-flexbox/", "areas": ["/css/css-flexbox"] },
18+
{ "name": "/css/css-grid/", "areas": ["/css/css-grid"] },
19+
{ "name": "/css/css-position/", "areas": ["/css/css-position"] },
20+
{ "name": "/css/css-sizing/", "areas": ["/css/css-sizing"] },
21+
{ "name": "/css/css-text/", "areas": ["/css/css-text"] },
22+
{ "name": "/gamepad/", "areas": ["/gamepad"] },
23+
{ "name": "/shadow-dom/", "areas": ["/shadow-dom"] },
24+
{ "name": "/streams/", "areas": ["/streams"] },
25+
{ "name": "/trusted-types/", "areas": ["/trusted-types"] },
26+
{ "name": "/WebCryptoAPI/", "areas": ["/WebCryptoAPI"] },
27+
{ "name": "/webxr/", "areas": ["/webxr"] }
28+
]

0 commit comments

Comments
 (0)