Skip to content

Commit

Permalink
Merge pull request #64 from Dash-Industry-Forum/63-new-publishing-wor…
Browse files Browse the repository at this point in the history
…kflow

New publishing workflow
  • Loading branch information
thasso authored Oct 24, 2024
2 parents d878a5e + 5db791f commit 21d4f58
Show file tree
Hide file tree
Showing 12 changed files with 191 additions and 56 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Pull Request

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/dash-industry-forum/dashif-specs:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}

steps:
- uses: actions/checkout@v4
- name: Build
env:
# Reset OPTS to empty to make sure we are not using
# interactive mode in CI
OPTS:
run: make -f /tools/Makefile spec SRC=Guidelines-TimingModel.bs.md NAME=Timing-Model

- name: Archive
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
56 changes: 56 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish

on:
push:
branches:
- master

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
packages: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/dash-industry-forum/dashif-specs:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}

steps:
- uses: actions/checkout@v4
- name: Build
env:
# Reset OPTS to empty to make sure we are not using
# interactive mode in CI
OPTS:
run: make -f /tools/Makefile spec SRC=Guidelines-TimingModel.bs.md NAME=Timing-Model

- name: Archive
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

package:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: actions/upload-pages-artifact@v3
with:
path: dist

publish:
runs-on: ubuntu-latest
needs: package
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Output
Output
dist/
4 changes: 2 additions & 2 deletions 01-Intro.inc.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This document is based on the 4th edition DASH [[!DASH]] and 2nd edition CMAF [[
DASH together with related standards and specifications is the foundation for an ecosystem of services and clients that work together to enable audio/video/text and related content to be presented to end-users.

<figure>
<img src="Images/RoleOfIop.png" />
<img src="Images/RoleOfIop.png" >
<figcaption>This document connects DASH with international standards and industry specifications.</figcaption>
</figure>

Expand All @@ -81,7 +81,7 @@ This document was generated in close coordination with [[DVB-DASH]]. The feature
1. Data containers that clients will download during playback of a [=presentation=] in order to obtain media samples.

<figure>
<img src="Diagrams/DashStructure.png" />
<img src="Diagrams/DashStructure.png" >
<figcaption>Relationships of primary DASH data structures and the standards they are defined in.</figcaption>
</figure>

Expand Down
54 changes: 27 additions & 27 deletions 21-Timing.inc.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions 22-Addressing.inc.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Clauses in section only apply to [=representations=] that use [=indexed addressi
Note: [[!DASH]] makes a distinction between "segment" (HTTP-addressable entity) and "subsegment" (byte range of an HTTP-addressable entity). This document does not make such a distinction and has no concept of subsegments. Usage of "segment" here matches the definition of CMAF segment [[!CMAF]].

<figure>
<img src="Images/Timing/IndexedAddressing.png" />
<img src="Images/Timing/IndexedAddressing.png" >
<figcaption>[=Indexed addressing=] is based on an index segment that references all [=media segments=].</figcaption>
</figure>

Expand Down Expand Up @@ -165,7 +165,7 @@ Note: This addressing mode is sometimes called "SegmentTemplate with SegmentTime
Clauses in section only apply to [=representations=] that use [=explicit addressing=].

<figure>
<img src="Images/Timing/ExplicitAddressing.png" />
<img src="Images/Timing/ExplicitAddressing.png" >
<figcaption>[=Explicit addressing=] uses a segment template that is combined with explicitly defined time spans for each [=media segment=] in order to reference [=media segments=], either by start time or by sequence number.</figcaption>
</figure>

Expand Down Expand Up @@ -279,7 +279,7 @@ Note: This addressing mode is sometimes called "SegmentTemplate without SegmentT
Clauses in section only apply to [=representations=] that use [=simple addressing=].

<figure>
<img src="Images/Timing/SimpleAddressing.png" />
<img src="Images/Timing/SimpleAddressing.png" >
<figcaption>[=Simple addressing=] uses a segment template that is combined with approximate first [=media segment=] timing information and an average [=media segment=] duration in order to reference [=media segments=], either by start time or by sequence number. Note that `@eptDelta` does not affect the generated paths!</figcaption>
</figure>

Expand Down Expand Up @@ -327,7 +327,7 @@ Parts of the [=MPD=] structure that are not relevant for this chapter have been
When using [=simple addressing=], the samples contained in a [=media segment=] MAY cover a different time span on the [=sample timeline=] than what is indicated by the nominal timing in the [=MPD=], as long as no constraints defined in this document are violated by this deviation.

<figure>
<img src="Images/Timing/InaccurateAddressing.png" />
<img src="Images/Timing/InaccurateAddressing.png" >
<figcaption>[=Simple addressing=] relaxes the requirement on [=media segment=] contents matching the [=sample timeline=]. Red boxes indicate samples.</figcaption>
</figure>

Expand Down
34 changes: 12 additions & 22 deletions Guidelines-TimingModel.bs.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
#include "01-Intro.inc.md"

#include "21-Timing.inc.md"
#include "22-Addressing.inc.md"
#include "29-Misc.inc.md"

<!-- Document metadata follows. The below sections are used by the document compiler and are not directly visible. -->

<pre class="metadata">
Revision: 5.0

Title: DASH-IF implementation guidelines: restricted timing model
Status: LS-COMMIT
Shortname: dash-timing
URL: https://dashif-documents.azurewebsites.net/Guidelines-TimingModel/master/Guidelines-TimingModel.html
URL: https://dashif.org/Guidelines-TimingModel/
Group: dashif
Issue Tracking: GitHub https://github.com/Dash-Industry-Forum/Guidelines-TimingModel/issues
Repository: https://github.com/Dash-Industry-Forum/Guidelines-TimingModel GitHub
Editor: DASH Industry Forum

Default Highlight: text
<!-- Enabling line numbers breaks code blocks in PDF! (2018-10-02) -->
Line Numbers: off
Markup Shorthands: markdown yes
Boilerplate: copyright off, abstract off
Abstract: None
</pre>

<!-- Custom bibliography entries go in References.json. Prefer adding your document to SpecRef over maintaining a custom definition. -->
<pre class="biblio">
#include "References.json"
<pre class=include>
path: 01-Intro.inc.md
</pre>

<pre boilerplate="logo">
<a href="https://dashif.org/"><img src="Images/DASH-IF.png" /></a>
<pre class=include>
path: 21-Timing.inc.md
</pre>
<pre class=include>
path: 22-Addressing.inc.md
</pre>
<pre class=include>
path: 29-Misc.inc.md
</pre>
File renamed without changes.
22 changes: 22 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@echo off
set IMG=dashif/specs-builder:latest

rem Check if OPTS is defined, if not, set default value
if "%OPTS%"=="" (
set OPTS=-ti
)

rem Collect command-line arguments
set TARGETS=%*

rem If no arguments are provided, use "spec"
if "%TARGETS%"=="" (
set TARGETS=spec
)

rem Add parameters to TARGETS
set TARGETS=%TARGETS% SRC=Guidelines-TimingModel.bs.md NAME=Timing-Model

echo Running with targets: '%TARGETS%'
docker run --rm %OPTS% -v "%cd%:/data" -p 8000:8000 %IMG% %TARGETS%

29 changes: 29 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Here is the command that can be used to debug or develop with the
# local resources.
#
# docker run --rm -ti -v `pwd`:/data -v `pwd`/build-tools/tools:/tools -v `pwd`/data/boilerplate/dashif:/usr/local/lib/python3.12/dist-packages/bikeshed/spec-data/boilerplate/dashif dashif-specs:latest
#

# Run the docker container and pass all the arguments
IMG=dashif/specs-builder:latest

# Allow to overwrite additional options from the outside.
# We use tty and interactive by default since this makes it easier
# to deal with watch mode and Ctrl-C etc but we can not use this
# for instance in CI mode
if [ -z ${OPTS+x} ]; then
OPTS=-ti
fi

TARGETS="${@}"
if [ -z "${TARGETS}" ]; then
TARGETS="spec"
fi
# Add parameters
TARGETS="${TARGETS} SRC=Guidelines-TimingModel.bs.md NAME=Timing-Model"

echo "Run with targets: '${TARGETS}'"
docker run --rm ${OPTS} -v `pwd`:/data -p 8000:8000 \
${IMG} ${TARGETS}
2 changes: 2 additions & 0 deletions setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
docker pull dashif/specs-builder:latest
5 changes: 5 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Pull the latest build image
IMG=dashif/specs-builder:latest
docker pull ${IMG}

0 comments on commit 21d4f58

Please sign in to comment.