Skip to content

Commit

Permalink
Generate libmatroska v1.x semantic separately
Browse files Browse the repository at this point in the history
As 2.0 evolves we can't keep the same generated code on both sides.
Especially as the class names will change for Matroska-Org/libmatroska#137
  • Loading branch information
robUx4 committed Jan 7, 2024
1 parent 80217c9 commit f5172da
Show file tree
Hide file tree
Showing 4 changed files with 1,101 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/libmatroska-semantic_1x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "libmatroska v1.x Semantic"
on:
push:
branches: [ master ]
pull_request:
# branches: [ master ]
schedule:
- cron: '44 16 * * 6'

jobs:
xlst_generators:
name: Generate code from EBML Schema
runs-on: ubuntu-latest
steps:
- name: Get pushed code
uses: actions/checkout@v3

- name: Get EBML Schema
run: curl -o ebml_matroska.xml https://raw.githubusercontent.com/ietf-wg-cellar/matroska-specification/master/ebml_matroska.xml

- name: Setup test tools
# we need the apt update because old packages won't load
run: |
sudo apt update
sudo apt install xsltproc
- name: Generate code
run: |
xsltproc -o _build/src/KaxSemantic.cpp spectool/schema_2_kaxsemantic_cpp_1x.xsl ebml_matroska.xml
xsltproc -o _build/matroska/KaxSemantic.h spectool/schema_2_kaxsemantic_h_1x.xsl ebml_matroska.xml
- name: Get current libmatroska v1.x code
run: |
curl -o KaxSemantic.cpp https://raw.githubusercontent.com/Matroska-Org/libmatroska/v1.x/src/KaxSemantic.cpp
curl -o KaxSemantic.h https://raw.githubusercontent.com/Matroska-Org/libmatroska/v1.x/matroska/KaxSemantic.h
- name: Generate libmatroska v1.x artifacts
uses: actions/upload-artifact@v3
with:
name: libmatroska-semantic
path: _build

- name: Verify libmatroska semantic
run: |
diff -pur _build/matroska/KaxSemantic.h KaxSemantic.h || exit 1
diff -pur _build/src/KaxSemantic.cpp KaxSemantic.cpp || exit 1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![binaries](https://github.com/Matroska-Org/foundation-source/actions/workflows/generate-tools-bin.yaml/badge.svg)](https://github.com/Matroska-Org/foundation-source/actions/workflows/generate-tools-bin.yaml)
[![libmatroska2 code](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska2-semantic.yaml/badge.svg)](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska2-semantic.yaml)
[![libmatroska code](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska-semantic.yaml/badge.svg)](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska-semantic.yaml)
[![libmatroska v1.x code](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska-semantic_1x.yaml/badge.svg)](https://github.com/Matroska-Org/foundation-source/actions/workflows/libmatroska-semantic_1x.yaml)

libEBML2, libMatroska2, mkvalidator, mkclean and the specifications

Expand Down
Loading

0 comments on commit f5172da

Please sign in to comment.