Skip to content

Commit

Permalink
Merge pull request #2 from stsquad/virtio-msg-automation-base
Browse files Browse the repository at this point in the history
Virtio msg automation base
  • Loading branch information
stsquad authored Nov 13, 2024
2 parents 4a5df40 + 61c244f commit d5d31e1
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 17 deletions.
14 changes: 6 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Thanks for proposing a change to the Virtual I/O Device (VIRTIO) specification!
The VIRTIO TC is not yet accepting pull requests at this time as they are not
integrated with our voting system.
# Thanks for proposing a change to the virtio-msg specification

Instead, please
- [] Propose the spec change (preferably as a patch) on the [mailing list](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback).
- [] Open an [issue](https://github.com/oasis-tcs/virtio-spec/issues),
including the link to the proposal in the [mailing list archives](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback).
This is not the same as proposing a change to the VirtIO spec. This
repository is intended for preparing the virtio-msg transport
specification before it's submission to the VIRTIO TC.

The TC will vote and apply the change.
If your intention was to suggestion to change to the upstream please
propose the change as a patch to the [mailing list](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback).
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy current state

on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Tools
run: |
sudo apt install texlive-full
- name: Build Docs
run: |
make local-all
echo ${{ github.sha }} > Release.txt
- name: Create a Draft Release
uses: softprops/action-gh-release@v2
with:
draft: true
name: working-draft
files: |
Release.txt
virtio-v1.4-wd01.pdf
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Tools
run: |
sudo apt install texlive-full
- name: Build HTML
run: |
make local-html
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- Mode: makefile -*-
#
# Basic Makefile to aid automation of document building
#

.PHONY: all local
all:
./makeall.sh

local-all:
./makeall.sh local

.PHONY: html local-html

html:
./makehtml.sh

local-html:
./makehtml.sh local

.PHONY: clean
clean:
git clean -fd

.PHONY: help
help:
@echo "Build the VIRTIO specification documents."
@echo ""
@echo "Possible operations are:"
@echo
@echo " $(MAKE) Build everything"
@echo " $(MAKE) html Build local html"
@echo " $(MAKE) clean Remove all intermediate files"
2 changes: 1 addition & 1 deletion REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
virtio-v1.3-csd01
virtio-v1.4-wd01
31 changes: 27 additions & 4 deletions make-setup-generated.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
#! /bin/sh
#
# Generate version and metadata preamble for the document
#

DATESTR=${DATESTR:-`cat REVISION-DATE 2>/dev/null`}
if [ x"$DATESTR" = x ]; then
ISODATE=`git show --format=format:'%cd' --date=iso | head -n 1`
DATESTR=`date -d "$DATE" +'%d %B %Y'`

# If a second argument is passed we extract what we can from git
# metadata (closest lightweight tag) and local tree status. This
# allows locally generated copies to be tagged appropriately.
#
# The formal build process skips this.
if ! test -z "$2"; then
TAG=$(git describe --dirty --tags)
# base date on now
DATESTR=$(date +'%d %B %Y')
COMMIT=$(git rev-parse --short HEAD)

# Finally check if we have un-committed changes in the tree
if ! git diff-index --quiet HEAD -- ; then
COMMIT="$COMMIT with local changes"
fi
fi

case "$1" in
*-wd*)
STAGE=wd
STAGENAME="Working Draft"
WORKINGDRAFT=`basename "$1" | sed 's/.*-wd//'`
;;
*-os*)
STAGE=os
Expand Down Expand Up @@ -41,6 +56,14 @@ esac

VERSION=`echo "$1"| sed -e 's/virtio-v//' -e 's/-.*//'`

#
# Finally if we are building a local draft copy append the commit
# details to the end of the working draft
#
if ! test -z "$COMMIT" ; then
STAGEEXTRATITLE="$STAGEEXTRATITLE (@ git $COMMIT)"
fi

#Prepend OASIS unless already there
case "$STAGENAME" in
OASIS*)
Expand Down
4 changes: 2 additions & 2 deletions makeall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
export SPECDOC=${SPECDOC:-`cat REVISION`}
export DATESTR=${DATESTR:-`cat REVISION-DATE`}
./makezip.sh
./makehtml.sh
./makepdf.sh
./makehtml.sh $1
./makepdf.sh $1
zip $SPECDOC.zip $SPECDOC.pdf
echo Generated file $SPECDOC.zip
echo To change output file name, set SPECDOC environment variable
Expand Down
2 changes: 1 addition & 1 deletion makehtml.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

SPECDOC=${SPECDOC:-`cat REVISION`}
./make-setup-generated.sh "$SPECDOC"
./make-setup-generated.sh "$SPECDOC" $1

cp virtio-html.tex $SPECDOC.tex

Expand Down
2 changes: 1 addition & 1 deletion makepdf.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

SPECDOC=${SPECDOC:-`cat REVISION`}
./make-setup-generated.sh "$SPECDOC"
./make-setup-generated.sh "$SPECDOC" $1

rm $SPECDOC.aux $SPECDOC.pdf $SPECDOC.out
xelatex --jobname $SPECDOC virtio.tex
Expand Down

0 comments on commit d5d31e1

Please sign in to comment.