Skip to content

Commit

Permalink
Bikeshed builds (#425)
Browse files Browse the repository at this point in the history
This squashed commit bring along a new build pipeline to automate the bikeshed builds from a docker container and quite a bit of cleanup around the overall structure of the repository. There is still some work to do, especially around the documentation how to use bikeshed as well as the container. We also need some easy to use build scripts for windows and a few other details, but this should be a reasonable start.

What happened in this commit was that I
 - cleaned the bikeshed source files and updated the repo structure to use sub-folder pear feature spec
 - adopted the documents to be compatible with the latest bikeshed
 - created the build container and included some dashif specific boilerplate 
 - moved the references to `biblio.json` since this will be automatically picked up when we run bikeshed
 - use a remote link for the logo and moved the snippet to the boilerplate
 - added vscode and editor config for easier integration with VSCode and other editors
 - cleaned Live-2-Vod: Note that there are no changes to the text. What I did in this commit was a general cleanup to
    remove any bikeshed warnings and errors.
 - more cleanup for general formatting
 - added a GH Actions based pipeline for the container, the master branch as well as PR builds. This publishes to GH Pages

I also aligned formatting of the file with a hard wrap at 80 characters. The 80 characters is just a start, and we can adjust this, but enforcing hard wraps is very helpful to get better git diffs on changes since git diffs in full lines.
  • Loading branch information
thasso authored Jul 9, 2024
1 parent daa641d commit 9bd82a2
Show file tree
Hide file tree
Showing 29 changed files with 1,373 additions and 319 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
43 changes: 43 additions & 0 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Container

on:
push:
branches:
- master
paths:
- 'build-tools/**'
- '.github/workflows/build-container.yml'

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
file: build-tools/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/dash-industry-forum/dashif-specs:latest
29 changes: 29 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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
- name: Archive
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
61 changes: 41 additions & 20 deletions .github/workflows/publish-bikeshed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,53 @@ name: Publish Bikeshed Document
on:
push:
branches:
- main
- 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@v2

- name: Set up Python
uses: actions/setup-python@v2
- 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
- name: Archive
uses: actions/upload-artifact@v4
with:
python-version: '3.x'
name: dist
path: dist/

- name: Install Bikeshed
run: |
pip install bikeshed
bikeshed update
- name: Generate Bikeshed Document
run: bikeshed spec
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

- name: Publish to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
commit_message: 'Deploy Bikeshed document'
publish:
runs-on: ubuntu-latest
needs: package
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.idea
.python-version
*.html
dist/
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
120
],
"spellright.language": [
"en"
],
"spellright.documentTypes": [
"bikeshed",
"markdown",
"latex",
"plaintext"
],
"files.associations": {
"*.bs.md": "bikeshed",
"*.inc.md": "markdown"
},
"cSpell.enabled": false,
}
5 changes: 5 additions & 0 deletions .vscode/spellright.dict
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
live2vod
Inband
Dash.js
rfc
Bikeshed
195 changes: 0 additions & 195 deletions 01-live2vod.inc.md

This file was deleted.

Loading

0 comments on commit 9bd82a2

Please sign in to comment.