Skip to content

Commit 242ad37

Browse files
committed
Merge branch 'development' into video/segment-based-playback
2 parents 4fdd421 + 2eba029 commit 242ad37

File tree

278 files changed

+137653
-2642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+137653
-2642
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: development-generate-pdf-files
2+
run-name: "Generate ONVIF specs from the ${{ github.ref_name }} branch - Reason: ${{ inputs.reason || 'Push trigger' }}"
3+
4+
on:
5+
push:
6+
branches:
7+
- development
8+
workflow_dispatch:
9+
inputs:
10+
reason:
11+
description: 'Reason for manual run'
12+
required: false
13+
default: 'Testing'
14+
add_watermark:
15+
description: 'Add "draft" watermark to PDF?'
16+
required: true
17+
type: boolean
18+
default: true
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
env:
25+
DOCBOOK_SOURCE_DIR: ${{ github.workspace }}/doc
26+
DOCBOOK_BUILD_DIR: ${{ github.workspace }}/build
27+
JAVA_VERSION: openjdk-8-jdk
28+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
29+
30+
jobs:
31+
build-pdf:
32+
strategy:
33+
fail-fast: true
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- name: Install missing software
37+
run: |
38+
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
39+
sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y --force-yes curl unzip $JAVA_VERSION fonts-noto-color-emoji ttf-mscorefonts-installer asciidoctor fd-find ; \
40+
sudo fc-cache -fv
41+
pip install pdf-watermark
42+
- name: Checkout sources
43+
uses: actions/checkout@v3
44+
- name: Configure Java
45+
run: |
46+
echo "####" ; \
47+
export TARGET=$JAVA_HOME/jre/lib/jaxp.properties ; \
48+
sudo touch $TARGET; \
49+
sudo chmod 666 $TARGET ; \
50+
ls -al $JAVA_HOME/jre/lib ; \
51+
sudo echo jdk.xml.maxXMLNameLimit=1000 > $TARGET ; \
52+
sudo echo jdk.xml.xpathExprGrpLimit=0 >> $TARGET ; \
53+
sudo echo jdk.xml.xpathExprOpLimit=0 >> $TARGET ; \
54+
sudo echo jdk.xml.xpathTotalOpLimit=0 >> $TARGET ; \
55+
sudo echo javax.xml.accessExternalStylesheet=file,http >> $TARGET ; \
56+
sudo echo javax.xml.accessExternalDTD=file,http >> $TARGET ; \
57+
sudo echo javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl >> $TARGET ; \
58+
sudo echo javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING=false >> $TARGET ; \
59+
sudo echo jdk.xml.enableExtensionFunctions=true >> $TARGET ; \
60+
sudo chmod 644 $TARGET ;
61+
- name: Download Apache Fop 2.9
62+
uses: ethanjli/cached-download-action@v0.1.3
63+
with:
64+
url: https://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-2.9-bin.tar.gz
65+
destination: /tmp/fop-2.9-bin.tar.gz
66+
- name: Install Fop
67+
run: |
68+
cd /tmp ; sudo tar -xvzf fop-2.9-bin.tar.gz -C /usr/local
69+
- name: Download Apache Xalan-j 2.7.1
70+
uses: ethanjli/cached-download-action@v0.1.3
71+
with:
72+
url: https://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_7_1-bin.zip
73+
destination: /tmp/xalan-j_2_7_1-bin.zip
74+
- name: Install Xalan-j
75+
run: |
76+
sudo mkdir -p $JAVA_HOME/jre/lib/endorsed ; \
77+
cd /tmp ; unzip /tmp/xalan-j_2_7_1-bin.zip ; \
78+
sudo cp /tmp/xalan-j_2_7_1/xalan.jar $JAVA_HOME/jre/lib/endorsed ; \
79+
sudo cp /tmp/xalan-j_2_7_1/serializer.jar $JAVA_HOME/jre/lib/endorsed
80+
- name: Compile PDF files
81+
run: |
82+
export JAVA_TOOL_OPTIONS="-Djavax.xml.XMLConstants.FEATURE_SECURE_PROCESSING=false" ; \
83+
cd ${{ github.workspace }} ; perl build/build.pl
84+
- name: Add draft watermark to the PDF files
85+
# Runs if it's a push OR if the manual trigger 'add_watermark' is true
86+
if: github.event_name == 'push' || inputs.add_watermark == true
87+
run: |
88+
cd ${{ github.workspace }} ; fdfind -e pdf . 'out' -x watermark grid {} "draft"
89+
- name: Calculate the short commit ID
90+
id: vars
91+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
92+
- name: "Save generated PDF files as build artifact"
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: ONVIF-specs-${{ steps.vars.outputs.sha_short }}
96+
path: |
97+
${{ github.workspace }}/out/*/*.pdf
98+
${{ github.workspace }}/out/*.pdf
99+
compression-level: 9
100+
retention-days: 30
101+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: dotnet-wsdl-check
2+
run-name: "WSDL files syntax check with .Net 9.0"
3+
4+
on:
5+
push:
6+
paths:
7+
- '**.wsdl'
8+
- '**.xsd'
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
dotnet-wsdl-check:
17+
strategy:
18+
fail-fast: true
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Check that remote files are reachable
22+
id: vars
23+
run: |
24+
export MISSING_FILES=0
25+
curl --head http://docs.oasis-open.org/wsn/b-2.xsd || export MISSING_FILES=$((MISSING_FILES+1))
26+
echo "MISSING_FILES=$MISSING_FILES" >> $GITHUB_OUTPUT
27+
echo "MISSING_FILES=$MISSING_FILES"
28+
- name: Install missing software
29+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
30+
run: |
31+
sudo add-apt-repository ppa:dotnet/backports
32+
sudo apt update && sudo apt install dotnet-sdk-9.0
33+
- name: Get branch names.
34+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
35+
id: branch-names
36+
uses: tj-actions/branch-names@v9.0.2
37+
- name: Set target
38+
id: target
39+
run: |
40+
if [ ${{ steps.branch-names.outputs.is_tag }} == 'true' ]; then
41+
echo "TARGET=${{ steps.branch-names.outputs.tag }}" >> $GITHUB_OUTPUT
42+
else
43+
echo "TARGET=${{ steps.branch-names.outputs.current_branch }}" >> $GITHUB_OUTPUT
44+
fi
45+
- name: Run dotnet-svcutil
46+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
47+
run: |
48+
echo "TARGET #${{ steps.target.outputs.TARGET }}#"
49+
dotnet new tool-manifest
50+
dotnet tool install dotnet-svcutil
51+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/accessrules/wsdl/accessrules.wsdl -d . -o AccessRules.cs || /bin/true
52+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl -d . -o Security.cs || /bin/true
53+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl -d . -o AppMgmt.cs || /bin/true
54+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl -d . -o AuthenticationBehavior.cs || /bin/true
55+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/credential/wsdl/credential.wsdl -d . -o Credential.cs || /bin/true
56+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/display/wsdl/index.htm -d . -o Display.cs || /bin/true
57+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/device/wsdl/devicemgmt.wsdl -d . -o Device.cs || /bin/true
58+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/events/wsdl/event.wsdl -d . -o Event.cs || /bin/true
59+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/media/wsdl/media.wsdl -d . -o Media.cs || /bin/true
60+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/pacs/accesscontrol.wsdl -d . -o Accesscontrol.cs || /bin/true
61+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/pacs/doorcontrol.wsdl -d . -o Doorcontrol.cs || /bin/true
62+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/provisioning/wsdl/provisioning.wsdl -d . -o Provisioning.cs || /bin/true
63+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/schedule/wsdl/schedule.wsdl -d . -o Schedule.cs || /bin/true
64+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/thermal/wsdl/thermal.wsdl -d . -o Thermal.cs || /bin/true
65+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver10/uplink/wsdl/uplink.wsdl -d . -o Uplink.cs || /bin/true
66+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver20/analytics/wsdl/analytics.wsdl -d . -o Analytics.cs || /bin/true
67+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver20/imaging/wsdl/imaging.wsdl -d . -o Imaging.cs || /bin/true
68+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver20/media/wsdl/media.wsdl -d . -o Media2.cs || /bin/true
69+
DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.target.outputs.TARGET }}/wsdl/ver20/ptz/wsdl/ptz.wsdl -d . -o PTZ.cs || /bin/true
70+
ls *.cs
71+
count=$(ls -1 *.cs 2>/dev/null | wc -l)
72+
echo "Number of generated files: $count"
73+
if [ "$count" -eq 19 ]; then
74+
/bin/true
75+
else
76+
/bin/false
77+
fi
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: generate-svg-from-mathml
2+
run-name: "Generated SVG images from MathML"
3+
4+
on:
5+
push:
6+
branches-ignore:
7+
- master
8+
- development
9+
paths:
10+
- doc/equations/*.xml
11+
- doc/equations/*.mml
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
env:
19+
DOCBOOK_SOURCE_DIR: ${{ github.workspace }}/doc
20+
DOCBOOK_BUILD_DIR: ${{ github.workspace }}/build
21+
JAVA_VERSION: openjdk-11-jdk
22+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
23+
24+
jobs:
25+
convert-mathml-to-svg:
26+
strategy:
27+
fail-fast: true
28+
runs-on: ubuntu-24.04
29+
steps:
30+
- name: Install missing software
31+
run: |
32+
sudo apt update && sudo apt install $JAVA_VERSION fd-find
33+
- name: Checkout sources
34+
uses: actions/checkout@v3
35+
- name: Download XML Calabash 3.0.32
36+
uses: ethanjli/cached-download-action@v0.1.3
37+
with:
38+
url: https://codeberg.org/xmlcalabash/xmlcalabash3/releases/download/3.0.32/xmlcalabash-3.0.32.zip
39+
destination: /tmp/xmlcalabash-3.0.32.zip
40+
- name: Install XML Calabash 3.0.32
41+
run: |
42+
cd /tmp ; unzip /tmp/xmlcalabash-3.0.32.zip
43+
- name: Test if it works
44+
run: |
45+
cd /tmp/xmlcalabash-3.0.32 ; java -jar xmlcalabash-app-3.0.32.jar helloWorld.xpl ; ls
46+
echo '<?xml version="1.0" encoding="UTF-8"?><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac> </mrow></math>' > /tmp/xmlcalabash-3.0.32/equation.xml
47+
echo '<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:cx="http://xmlcalabash.com/ns/extensions" version="3.0" name="main"><p:import href="https://xmlcalabash.com/ext/library/diagramming.xpl"/><p:input port="source" content-types="xml"/><p:output port="result" content-types="xml"/><cx:mathml-to-svg></cx:mathml-to-svg></p:declare-step>' > /tmp/xmlcalabash-3.0.32/pipeline.xpl
48+
cd /tmp/xmlcalabash-3.0.32 ; java -jar xmlcalabash-app-3.0.32.jar pipeline.xpl --input:source=equation.xml --output:result=image.svg; ls
49+
cat /tmp/xmlcalabash-3.0.32/image.svg
50+
- name: Convert the equations to SVG
51+
run: |
52+
echo "Checksum before updating the images"
53+
cd ${{ github.workspace }} ; fdfind -e svg . 'doc/equations' -x md5sum {}
54+
cd ${{ github.workspace }} ; fdfind -e xml . 'doc/equations' -x java -jar /tmp/xmlcalabash-3.0.32/xmlcalabash-app-3.0.32.jar /tmp/xmlcalabash-3.0.32/pipeline.xpl --input:source={} --output:result={.}.svg
55+
cd ${{ github.workspace }} ; fdfind -e svg . 'doc/equations' -x sed -i 's/<?xml version="1.0" encoding="UTF-8"?>//g' {}
56+
echo "Checksum before updating the images"
57+
cd ${{ github.workspace }} ; fdfind -e svg . 'doc/equations' -x md5sum {}
58+
echo "Directory listing"
59+
ls -alR ${{ github.workspace }}/doc/equations
60+
- name: Add and commit regenerated SVG files
61+
uses: EndBug/add-and-commit@v9
62+
with:
63+
add: '["${{ github.workspace }}/doc/equations/*.svg", "${{ github.workspace }}/doc/equations/*/*.svg"]'
64+
message: 'Automatically generated SVG images'
65+
committer_name: GitHub Actions
66+
committer_email: actions@github.com
67+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: gsoap-wsdl-check
2+
run-name: "WSDL files syntax check with gSoap"
3+
4+
on:
5+
push:
6+
paths:
7+
- '**.wsdl'
8+
- '**.xsd'
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
gsoap-wsdl-check:
17+
strategy:
18+
fail-fast: true
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Check that remote files are reachable
22+
id: vars
23+
run: |
24+
export MISSING_FILES=0
25+
curl --head http://docs.oasis-open.org/wsn/b-2.xsd || export MISSING_FILES=$((MISSING_FILES+1))
26+
echo "MISSING_FILES=$MISSING_FILES" >> $GITHUB_OUTPUT
27+
echo "MISSING_FILES=$MISSING_FILES"
28+
- name: Install missing software
29+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
30+
run: |
31+
sudo apt update && sudo apt install gcc g++ curl autoconf automake cmake bison flex libssl-dev zlib1g-dev make
32+
- name: Checkout tools repo
33+
uses: actions/checkout@v6
34+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
35+
with:
36+
repository: onvif/gsoap-wsdl-checker
37+
path: gsoap-wsdl-checker
38+
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
39+
- name: Get branch names.
40+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
41+
id: branch-names
42+
uses: tj-actions/branch-names@v9.0.2
43+
- name: Install gsoap
44+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
45+
run: |
46+
cd gsoap-wsdl-checker
47+
cmake CMakeLists.txt -DBRANCH=${{ steps.branch-names.outputs.current_branch }}
48+
make gsoap
49+
- name: Compile the WDSL files
50+
if: ${{ steps.vars.outputs.MISSING_FILES == 0 }}
51+
run: |
52+
cd gsoap-wsdl-checker
53+
make
54+

0 commit comments

Comments
 (0)