-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (124 loc) · 4.37 KB
/
Copy pathconformance.yml
File metadata and controls
157 lines (124 loc) · 4.37 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: conformance
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
xsd-validation:
runs-on: ubuntu-latest
name: OOXML schema validation (ECMA-376)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, mbstring, zip
coverage: none
- name: Install xmllint
run: sudo apt-get update -qq && sudo apt-get install -y -qq libxml2-utils
- name: Install dependencies (locked)
run: composer install --prefer-dist --no-interaction --no-progress
- name: Cache OOXML schemas
uses: actions/cache@v4
with:
path: .cache/ooxml-xsd
key: ooxml-xsd-ecma376-4-5ed
- name: Fetch schemas
run: bash scripts/fetch-ooxml-schemas.sh
- name: Generate reference document
run: php scripts/conformance/generate.php
- name: Validate against ECMA-376 Transitional XSD
run: bash scripts/conformance/xsd-check.sh
- name: Publish job summary
if: always()
run: cat build/conformance/summary-xsd.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload reference and reports
if: always()
uses: actions/upload-artifact@v4
with:
name: conformance-xsd
path: build/conformance/
consumer-smoke:
runs-on: ubuntu-latest
name: Consumer smoke (LibreOffice + python-docx)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, mbstring, zip
coverage: none
- name: Install LibreOffice and python-docx
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends libreoffice-writer
pip3 install --quiet python-docx
- name: Install dependencies (locked)
run: composer install --prefer-dist --no-interaction --no-progress
- name: Generate reference document
run: php scripts/conformance/generate.php
- name: Run consumer smoke
run: bash scripts/conformance/consumer-smoke.sh
- name: Publish job summary
if: always()
run: cat build/conformance/summary-consumers.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload converted output
if: always()
uses: actions/upload-artifact@v4
with:
name: conformance-consumers
path: build/conformance/
reader-fidelity:
runs-on: ubuntu-latest
name: Reader fidelity (external corpus)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, mbstring, zip
coverage: none
- name: Install external producers and validators
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends libreoffice-writer libxml2-utils
pip3 install --quiet python-docx
- name: Install dependencies (locked)
run: composer install --prefer-dist --no-interaction --no-progress
- name: Install corpus producers (PHPWord)
run: composer install --working-dir scripts/corpus --prefer-dist --no-interaction --no-progress
- name: Cache OOXML schemas
uses: actions/cache@v4
with:
path: .cache/ooxml-xsd
key: ooxml-xsd-ecma376-4-5ed
- name: Fetch schemas
run: bash scripts/fetch-ooxml-schemas.sh
- name: Generate corpus
run: |
php scripts/corpus/generate-phpword.php
python3 scripts/corpus/generate-pydocx.py
bash scripts/corpus/generate-libreoffice.sh
php scripts/corpus/generate-own.php
- name: Run reader-fidelity harness
run: php scripts/conformance/reader-fidelity.php
- name: Publish job summary
if: always()
run: cat build/conformance/summary-fidelity.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload corpus and reports
if: always()
uses: actions/upload-artifact@v4
with:
name: reader-fidelity
path: |
build/corpus/
build/conformance/summary-fidelity.md
docs/READER-FIDELITY.md