Skip to content

Build Perl CPAN modules for Lyrion Music Server #11

Build Perl CPAN modules for Lyrion Music Server

Build Perl CPAN modules for Lyrion Music Server #11

Workflow file for this run

name: Build Perl CPAN modules for Lyrion Music Server
on:
workflow_dispatch:
inputs:
flavour:
description: The Linux flavour we're building for. Currently 'debian' or 'fedora' only.
type: choice
options:
- debian
- fedora
required: true
default: debian
tag:
description: The Docker tag to use to build. Defaults to "testing" for Debian, "latest" for Fedora if left blank.
type: string
required: false
platform:
description: The hardware platform for which to build.
type: choice
options:
- amd64
# not supported by Github yet, but would succees using ACT on Apple Silicon
# - arm64
# - arm/v7
required: true
default: amd64
module:
description: A specific module you'd like to build. Defaults to all modules if none is specified.
type: string
required: false
jobs:
buildCPAN:
name: Build Perl CPAN modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set requested Docker image tag
if: ${{ inputs.tag }}
shell: bash
run: |
DOCKERFILE="CPAN/Docker/Dockerfile.${{ inputs.flavour }}"
sed -Ei 's/:(latest|testing)/:${{ inputs.tag }}/g' $DOCKERFILE
- name: Run Build Script
shell: bash
run: |
cd CPAN
docker build --rm --platform=linux/${{ inputs.platform }} -f "Docker/Dockerfile.${{ inputs.flavour }}" -t slimservervendor:${{ inputs.flavour }} .
docker run --rm --platform=linux/${{ inputs.platform }} -v `pwd`:/cpan slimservervendor:${{ inputs.flavour }} ./buildme.sh ${{ inputs.module }}
# TODO - run LMS smoke test
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ !env.ACT }}
with:
# TODO - find a way to remove the colons from the module name, and slash from platform
# name: ${{ inputs.module && inputs.module || 'CPAN'}}-${{ inputs.flavour }}${{ inputs.tag && format('-{0}', inputs.tag) || ''}}-${{ inputs.platform }}
name: CPAN-${{ inputs.flavour }}${{ inputs.tag && format('-{0}', inputs.tag) || ''}}
path: CPAN/build/arch/5.*/*/auto/