Skip to content

Build perl version 5.14.4 via build.sh #1448

Build perl version 5.14.4 via build.sh

Build perl version 5.14.4 via build.sh #1448

name: Custom compiler build
run-name: Build ${{ inputs.image }} version ${{ inputs.version }} via ${{ inputs.command }}
on:
workflow_dispatch:
inputs:
image:
type: choice
description: Which docker image to use
default: gcc
required: true
options:
# main ones
- gcc
- gcc-cross
- clang
- misc
# rest in alphabetical order
- archiesdk
- bloaty
- clad
- clang-18.04
- clang-16.04
- cobol
- d8
- dotnet
- go
- heaptrack
- ispc
- iwyu
- jakt
- lfortran
- mads
- micropython
- nasm
- nix
- ocaml
- perl
- python
- pythran
- rocm
- ruby
- rust-cg-gcc
- rust-linux
- vala
version:
description: The version to build (or architecture and version for cross)
required: true
command:
description: Build command
default: build.sh
required: true
size:
description: 'Runner size'
required: false
type: choice
default: 'large'
options:
- small
- medium
- large
jobs:
bespoke-build:
runs-on: ${{ inputs.size == 'large' && fromJSON('["self-hosted", "ce", "linux", "x64"]') || fromJSON(format('["self-hosted", "ce", "linux", "x64", "{0}"]', inputs.size)) }}
steps:
- name: Clean workspace
run: find "$GITHUB_WORKSPACE" -mindepth 1 -delete
- uses: actions/checkout@v5
- name: Build ${{ github.event.inputs.image }} ${{ github.event.inputs.version }} using ${{ github.event.inputs.command }}
shell: bash
id: build
run: |
mkdir dist
chmod og+w dist # some builds don't run as root, so let anyone write here
echo ::group::Docker build
docker run -v$(pwd)/dist:/dist --rm compilerexplorer/${{ github.event.inputs.image }}-builder \
bash ${{ github.event.inputs.command }} ${{ github.event.inputs.version }} \
/dist | tee output.log
echo ::endgroup::
echo ::group::Translate docker output into GH variables
gawk -e 'match($0, /^ce-build-(\w+):(.*)/, m) { print m[1] "=" m[2]; }' output.log >> "${GITHUB_OUTPUT}"
echo ::endgroup::
- name: Get output filename and s3 dest
shell: bash
if: ${{ steps.build.outputs.status == 'OK' }}
id: filenames
run: |
echo source=$(pwd)/dist/$(basename ${{ steps.build.outputs.output }}) >> "${GITHUB_OUTPUT}"
echo s3dest=s3://compiler-explorer/opt/$(basename ${{ steps.build.outputs.output }}) >> "${GITHUB_OUTPUT}"
- name: Copy output to S3
if: ${{ steps.build.outputs.status == 'OK' }}
run: aws s3 cp "${{ steps.filenames.outputs.source }}" "${{ steps.filenames.outputs.s3dest }}" --no-progress
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}