|
| 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 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + dotnet-wsdl-check: |
| 16 | + strategy: |
| 17 | + fail-fast: true |
| 18 | + runs-on: ubuntu-24.04 |
| 19 | + steps: |
| 20 | + - name: Install missing software |
| 21 | + run: | |
| 22 | + sudo add-apt-repository ppa:dotnet/backports |
| 23 | + sudo apt update && sudo apt install dotnet-sdk-9.0 |
| 24 | + - name: Get branch names. |
| 25 | + id: branch-names |
| 26 | + uses: tj-actions/branch-names@5250492686b253f06fa55861556d1027b067aeb5 |
| 27 | + - name: Run dotnet-svcutil |
| 28 | + run: | |
| 29 | + dotnet new tool-manifest |
| 30 | + dotnet tool install dotnet-svcutil |
| 31 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/accessrules/wsdl/accessrules.wsdl -d . -o AccessRules.cs || /bin/true |
| 32 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl -d . -o Security.cs || /bin/true |
| 33 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl -d . -o AppMgmt.cs || /bin/true |
| 34 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl -d . -o AuthenticationBehavior.cs || /bin/true |
| 35 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/credential/wsdl/credential.wsdl -d . -o Credential.cs || /bin/true |
| 36 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/display/wsdl/index.htm -d . -o Display.cs || /bin/true |
| 37 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/device/wsdl/devicemgmt.wsdl -d . -o Device.cs || /bin/true |
| 38 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/events/wsdl/event.wsdl -d . -o Event.cs || /bin/true |
| 39 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/media/wsdl/media.wsdl -d . -o Media.cs || /bin/true |
| 40 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/pacs/accesscontrol.wsdl -d . -o Accesscontrol.cs || /bin/true |
| 41 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/pacs/doorcontrol.wsdl -d . -o Doorcontrol.cs || /bin/true |
| 42 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/provisioning/wsdl/provisioning.wsdl -d . -o Provisioning.cs || /bin/true |
| 43 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/schedule/wsdl/schedule.wsdl -d . -o Schedule.cs || /bin/true |
| 44 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/thermal/wsdl/thermal.wsdl -d . -o Thermal.cs || /bin/true |
| 45 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver10/uplink/wsdl/uplink.wsdl -d . -o Uplink.cs || /bin/true |
| 46 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver20/analytics/wsdl/analytics.wsdl -d . -o Analytics.cs || /bin/true |
| 47 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver20/imaging/wsdl/imaging.wsdl -d . -o Imaging.cs || /bin/true |
| 48 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver20/media/wsdl/media.wsdl -d . -o Media2.cs || /bin/true |
| 49 | + DOTNET_SVCUTIL_TELEMETRY_OPTOUT=1 dotnet tool run dotnet-svcutil https://raw.githubusercontent.com/onvif/specs/refs/heads/${{ steps.branch-names.outputs.current_branch }}/wsdl/ver20/ptz/wsdl/ptz.wsdl -d . -o PTZ.cs || /bin/true |
| 50 | + ls *.cs |
| 51 | + count=$(ls -1 *.cs 2>/dev/null | wc -l) |
| 52 | + echo "Number of generated files: $count" |
| 53 | + if [ "$count" -eq 19 ]; then |
| 54 | + /bin/true |
| 55 | + else |
| 56 | + /bin/false |
| 57 | + fi |
0 commit comments