Skip to content

Remove 'alternates' attribute from 'alternates' element. #228

Remove 'alternates' attribute from 'alternates' element.

Remove 'alternates' attribute from 'alternates' element. #228

Workflow file for this run

---
# Building the tools for RISC OS (and other platforms)
#
name: PRM-in-XML
# Controls when the action will run. Triggers the workflow on:
# * push on any branch.
# * tag creation for tags beginning with a 'v'
on:
push:
branches: ["*"]
tags: ["v*"]
# Pull request events happen on pull request state transitions, so we probably don't want this here.
#pull_request:
# branches: ["*"]
jobs:
test-examples:
runs-on: ubuntu-20.04
container: ubuntu:20.04
steps:
- uses: actions/checkout@v3
- name: Build examples
run: |
# For the purposes for which we are using this - publicly available and with the
# watermark icon and explicitly stating that we're using PrinceXML to generate the
# output - we are licensed under the terms of the Non-commercial license.
# These documents are generated by tools from http://www.princexml.com/
export PRINCEXML_I_HAVE_A_LICENSE=1
crosscompile/build-examples.sh
- uses: actions/upload-artifact@v3
with:
name: Test-Output
path: test-output
# Tests for different platforms
test-platforms:
runs-on: ubuntu-20.04
strategy:
matrix:
os: ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.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
steps:
- uses: actions/checkout@v3
- name: Prerequisites for CentOS 8
if: matrix.os == 'centos:8'
run: |
echo "Fixing up centos 8 being EOL'd"
for i in /etc/yum.repos.d/* ; do sed -i 's/mirrorlist/#mirrorlist/' $i ; done
for i in /etc/yum.repos.d/* ; do sed -i 's!#baseurl=http://mirror.!baseurl=http://vault.!' $i ; done
- name: Build examples
run: |
crosscompile/build-examples.sh
test-riscos:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
needs: test-examples # always run after the baseline tests
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install required packages
run: |
sudo apt-get install -y python2 virtualenv
- name: Test through build.riscos.online
run: |
# Ensure we have the RISC OS bits downloaded and usable
crosscompile/setup-riscos-tests.sh
# Zip up the source to send to robuild
echo Zip up our sources
zip -q9r /tmp/source-archive.zip riscos-bits ROTest,feb .robuild.yaml
# Fetch the build client
echo Fetch the build client
curl -s -L -o riscos-build-online https://github.com/gerph/robuild-client/releases/download/v0.05/riscos-build-online && chmod +x riscos-build-online
# Send the archive file to build service (with explicit timeout)
echo Run the build
timeout 660 ./riscos-build-online -i /tmp/source-archive.zip -a off -t 600 -o /tmp/built
# If it didn't report an error, the test was successful.
export-posix:
runs-on: ubuntu-20.04
needs: ["test-riscos", "test-platforms"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prerequisites
run: |
sudo apt-get update && sudo apt-get install -y git make
- name: Build release
run: |
set -e
eval "$(crosscompile/ci-vars)"
cd crosscompile
make cross_install ROTOOL_DIR=../artifacts
../artifacts/riscos-prminxml --version
- uses: actions/upload-artifact@v3
with:
name: Tool-POSIX
path: artifacts
export-riscos:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
needs: ["test-riscos", "test-platforms"]
outputs:
version: ${{ steps.version.outputs.version }}
leafname: ${{ steps.version.outputs.leafname }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install required packages
run: |
sudo apt-get install -y python2 virtualenv
- name: Give the output a versioned name
id: version
run: |
eval "$(crosscompile/ci-vars)"
version="${CI_BRANCH_VERSION}"
echo "This is version: $version"
leafname="PRMinXML-$version.zip"
echo "version=$version" >> $GITHUB_OUTPUT
echo "leafname=$leafname" >> $GITHUB_OUTPUT
- name: Build through build.riscos.online
run: |
mkdir -p artifacts
eval "$(crosscompile/ci-vars)"
crosscompile/build-riscos-archive.sh ${{ steps.version.outputs.leafname }}
- uses: actions/upload-artifact@v3
with:
name: Tool-RISCOS
path: ${{ steps.version.outputs.leafname }}
# The artifact that is downloadable from the Actions is actually a zip of the artifacts
# that we supply. So it will be a regular Zip file containing a RISC OS Zip file.
# The release only triggers when the thing that was pushed was a tag starting with 'v'
release:
needs: ['export-riscos', 'export-posix']
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download built binary (RISC OS)
uses: actions/download-artifact@v1
with:
name: Tool-RISCOS
- name: Download built binary (POSIX)
uses: actions/download-artifact@v1
with:
name: Tool-POSIX
- name: Download built binary (tests)
uses: actions/download-artifact@v1
with:
name: Test-Output
# RISC OS version is already archived in a RISC OS archive format.
- name: Rename the RISC OS archive
run: |
mv "Tool-RISCOS/${{ needs.export-riscos.outputs.leafname }}" RISCOS-"${{ needs.export-riscos.outputs.leafname }}"
- name: Archive the contents of the POSIX version
run: |
cd Tool-POSIX
# For some reason, the executable flag has been lost on the tool.
chmod +x riscos-prminxml
tar zcvf ../POSIX-PRMinXML-${{ needs.export-riscos.outputs.version }}.tar.gz *
- name: Archive the contents of the Test output
run: |
cd Test-Output
# We use zip here because most people using these tools will be RISC OS users
# and zip is more friendly to them.
zip -9r ../Example-Output-${{ needs.export-riscos.outputs.version }}.zip *
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
prerelease: false
draft: true
name: Release ${{ needs.export-riscos.outputs.version }}
artifacts: "RISCOS-${{ needs.export-riscos.outputs.leafname }},POSIX-PRMinXML-${{ needs.export-riscos.outputs.version }}.tar.gz,Example-Output-${{ needs.export-riscos.outputs.version }}.zip"
artifactContentType: application/zip