Skip to content

Commit b928584

Browse files
committed
github CI: verify the generated libaformat code matches the specs
If the generated code is ever merged.
1 parent 2cc1776 commit b928584

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "libavformat Semantic"
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
# branches: [ master ]
7+
schedule:
8+
- cron: '44 16 * * 6'
9+
10+
jobs:
11+
xlst_generators:
12+
name: Generate code from EBML Schema
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Get pushed code
16+
uses: actions/checkout@v3
17+
18+
- name: Get EBML Schema
19+
run: curl -o ebml_matroska.xml https://raw.githubusercontent.com/ietf-wg-cellar/matroska-specification/master/ebml_matroska.xml
20+
21+
- name: Setup test tools
22+
# we need the apt update because old packages won't load
23+
run: |
24+
sudo apt update
25+
sudo apt install xsltproc
26+
27+
- name: Generate code
28+
run: |
29+
xsltproc -o _build/matroska_ids.h schema_2_lavf_h.xsl ebml_matroska.xml
30+
xsltproc -o _build/matroskasem.c schema_2_lavf_sem_c.xsl ebml_matroska.xml
31+
32+
- name: Get current libavformat code
33+
run: |
34+
curl -o matroskasem.c https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/HEAD:/libavformat/matroskadec.c
35+
curl -o matroska_ids.h https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/HEAD:/libavformat/matroska_ids.h
36+
37+
- name: Generate libavformat artifacts
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: libavformat-semantic
41+
path: _build
42+
43+
- name: Verify libavformat semantic
44+
run: |
45+
diff -pur _build/matroska_ids.h matroska_ids.h || exit 1
46+
diff -pur _build/matroskasem.c matroskasem.c || exit 1

0 commit comments

Comments
 (0)