Skip to content

Merge pull request #5 from dpt/update-ci-to-use-robuild-client #2

Merge pull request #5 from dpt/update-ci-to-use-robuild-client

Merge pull request #5 from dpt/update-ci-to-use-robuild-client #2

Workflow file for this run

---
# RISC OS CI build through build.riscos.online
#
# To reuse this configuration with your own repository:
#
# - Create a .robuild.yaml to describe what should be built on RISC OS.
# - `jobs.build.script` should be a list of commands to run on RISC OS
# - `jobs.build.artifacts.path` should be the directory to zip.
# - Create a VersionNum file if you wish to use the automated versioning
# in the same style as the RISC OS sources. [optional]
# - Update the 3rd step ('give the archive a versioned name') to give a
# suitable name for the archive.
# - Update the 4th step ('upload-artifacts') to include the same names.
#
name: RISC OS
# 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*"]
jobs:
build-riscos:
# The type of runner that the job will run on
runs-on: ubuntu-latest
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
- name: Obtain prerequisite build tool
run: |
# 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
- name: Build through build.riscos.online
run: |
# Zip up the source to send to robuild
zip -q9r /tmp/source-archive.zip * .robuild.yaml
# Send the archive file to build service (timeout of 15 mins)
./riscos-build-online -i /tmp/source-archive.zip -a off -t 900 -o /tmp/built
- name: Give the output a versioned name
id: version
run: |
if [[ -f VersionNum ]] ; then
version=$(sed '/MajorVersion / ! d ; s/.*MajorVersion *"\(.*\)"/\1/' VersionNum)
else
version=$(git rev-parse --short HEAD)
fi
echo "This is version: $version"
leafname="Nettle-$version.zip"
if [ -f /tmp/built,a91 ] ; then
cp /tmp/built,a91 "Nettle-$version.zip"
else
echo "No archive was built?"
exit 1
fi
echo "version=$version" >> $GITHUB_OUTPUT
echo "leafname=$leafname" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: RISCOS-build
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: build-riscos
# runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/v')
# permissions:
# contents: write
# steps:
# - name: Download built RISC OS binary
# uses: actions/download-artifact@v3
# with:
# name: RISCOS-build
#
# - name: Create Release
# id: create_release
# uses: ncipollo/release-action@v1
# with:
# prerelease: false
# draft: true
# artifacts: "${{ needs.build-riscos.outputs.leafname }}"
# artifactContentType: application/zip