Skip to content

Commit

Permalink
Merge branch 'add-linux-mint-testing' into html5-css
Browse files Browse the repository at this point in the history
  • Loading branch information
gerph committed May 10, 2022
2 parents c333834 + 009323a commit ee59595
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
os: ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:21.04", "centos:7", "centos:8", "debian:10"]
os: ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:21.04", "centos:7", "centos:8", "debian:10", "linuxmintd/mint18-amd64", "linuxmintd/mint20-amd64"]
#os: ["ubuntu:18.04"]
container: ${{ matrix.os }}
needs: test-examples # always run after the baseline tests
Expand Down
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,24 @@ p:debian-10:
tags:
- linux

p:mint-18:
image: linuxmintd/mint18-amd64
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux

p:mint-20:
image: linuxmintd/mint20-amd64
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux

# Test by running this on build.riscos.online
# Note: This only runs some simple tests - it doesn't build the examples.
p:riscos:
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ Individual tags within the documentation format can be described with a command:

riscos-prminxml --help-tag chapter

## Tested platforms

The PRM-in-XML tool is tested and known to work on a number of platforms:

* RISC OS
* Ubuntu (18.04, 20.04, 21.04)
* CentOS (7 and 8)
* Debian (10)
* Linux Mint (18 and 20)

Other platforms may work, but are not tested as part of the standard testing process.
Although not part of the automated testing, the tool also works and is developed on
macOS.

## Documentation

The PRM-in-XML format is documented within the text files in the [`catalog/docs`](catalog/docs)
Expand Down
5 changes: 3 additions & 2 deletions catalog/gerph/103/prmindex-makefile.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ indices: ${INDEX_XML}
<xsl:apply-templates select="/" mode="docgroup-part"/>
<xsl:apply-templates mode="edgeindex-number" select="/"/>
<xsl:apply-templates mode="edgeindex-max" select="/"/>
<xsl:text> -stringparam base-dir "$$(pwd)" -o "${OUTPUT_DIR}/index.html" http://gerph.org/dtd/${CATALOG_VERSION}/prmindex-${PAGE_FORMAT}.xsl "${INDEX_XML}"
<!-- Note that we need to be careful with the base directory here - if it contains spaces or any other special characters they will need to be escaped -->
<xsl:text> -stringparam base-dir "$$(pwd | sed 's/ /%20/g')" -o "${OUTPUT_DIR}/index.html" http://gerph.org/dtd/${CATALOG_VERSION}/prmindex-${PAGE_FORMAT}.xsl "${INDEX_XML}"

&indexdir;&dirsep;index-data.xml: ${INDEX_XML}
&indent;xsltproc -stringparam base-dir "$$(pwd)" -o "${INDEX_DIR}/index-data.xml" http://gerph.org/dtd/${CATALOG_VERSION}/prmindex-data.xsl "${INDEX_XML}"
&indent;xsltproc -stringparam base-dir "$$(pwd | sed 's/ /%20/g')" -o "${INDEX_DIR}/index-data.xml" http://gerph.org/dtd/${CATALOG_VERSION}/prmindex-data.xsl "${INDEX_XML}"

</xsl:text>

Expand Down
20 changes: 13 additions & 7 deletions crosscompile/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
# Supported operating systems:
#
# macOS
# Ubuntu Linux (18.04-21.04)
# Ubuntu Linux (18.04, 20.04, 21.04)
# Centos (7 and 8)
# Debian (10)
# Linux Mint (18 and 20)
#

set -e
Expand Down Expand Up @@ -174,21 +175,26 @@ if ! type -p prince >/dev/null 2>&1 && [[ "$PRINCEXML_I_HAVE_A_LICENSE" = 1 ]] ;
elif [[ "$SYSTEM" = 'Linux' ]] ; then
# I'm assuming this is amd64.
PRINCE_DISTRO_RELEASE=${DISTRO_RELEASE}
if [[ "$DISTRO" = 'ubuntu' ]] ; then
PRINCE_DISTRO=${DISTRO}
if [[ "${PRINCE_DISTRO}" = 'linuxmint' ]] ; then
PRINCE_DISTRO=linux-generic
PRINCE_DISTRO_RELEASE=""
PRINCE_ARCH='x86_64'
elif [[ "${PRINCE_DISTRO}" = 'ubuntu' ]] ; then
if [[ "$DISTRO_RELEASE" =~ 20.10|21.04|21.10 ]] ; then
PRINCE_DISTRO_RELEASE=20.04
elif [[ "$DISTRO_RELEASE" =~ 18.10|19.04|19.10 ]] ; then
PRINCE_DISTRO_RELEASE=18.04
fi
# FIXME: Determine the actual architecture
PRINCE_ARCH='amd64'
elif [[ "$DISTRO" = 'debian' ]] ; then
elif [[ "$PRINCE_DISTRO" = 'debian' ]] ; then
PRINCE_ARCH='amd64'
elif [[ "$DISTRO" = 'centos' ]] ; then
elif [[ "$PRINCE_DISTRO" = 'centos' ]] ; then
PRINCE_ARCH='x86_64'
fi
url="https://www.princexml.com/download/prince-$PRINCE_VERSION-${DISTRO}${PRINCE_DISTRO_RELEASE}-${PRINCE_ARCH}.tar.gz"
extract_dir="prince-${PRINCE_VERSION}-${DISTRO}${PRINCE_DISTRO_RELEASE}-${PRINCE_ARCH}"
url="https://www.princexml.com/download/prince-$PRINCE_VERSION-${PRINCE_DISTRO}${PRINCE_DISTRO_RELEASE}-${PRINCE_ARCH}.tar.gz"
extract_dir="prince-${PRINCE_VERSION}-${PRINCE_DISTRO}${PRINCE_DISTRO_RELEASE}-${PRINCE_ARCH}"
ext="tar.gz"
else
echo "Unrecognised OS" >&2
Expand Down Expand Up @@ -267,7 +273,7 @@ function generate_documents() {
echo "- Building documents in ${OUTPUTDIR}/$name"
sed -e "s!artifacts/output/!${OUTPUTDIR}/$name/!g ; s!css-variant='!css-variant='$css !g ; s!page-format='.*'!page-format='$html'!" "$srcindex" > "${TMPINDEX}"
mkdir -p "${OUTPUTDIR}/logs-$name"
riscos-prminxml --catalog $catalog -f index -L "${OUTPUTDIR}/logs-$name" "${TMPINDEX}"
riscos-prminxml --catalog "$catalog" -f index -L "${OUTPUTDIR}/logs-$name" "${TMPINDEX}"
if [[ "$PRINCEXML_I_HAVE_A_LICENSE" = 1 && -f "${OUTPUTDIR}/$name/html/filelist.txt" ]] ; then
( cd "${OUTPUTDIR}/$name/html" &&
prince --verbose -o "..//examples.pdf" -l filelist.txt )
Expand Down

0 comments on commit ee59595

Please sign in to comment.