Skip to content

Build package

Build package #32

Workflow file for this run

name: Build package
on:
workflow_dispatch:
inputs:
package:
description: "Package to build"
required: true
type: string
jobs:
pkg:
name: Build {{ inputs.package }}-${{ inputs.version }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: ubuntu-18.04
# To ensure binaries built are compatible with Block's Kochiku worker environment
container: centos:centos7
- os: macos-12
steps:
- name: Install required dependencies on CentOS
if: startsWith(matrix.container, 'centos')
# 1. Endpoint repo is required to get recent version of git so checkout action will checkout code
# as a local git repo instead of falling back to downloading the repo's files using the GitHub REST API
# 2. enable "software collections" (scl) repositories for extra packages
# 3. install newer gcc, etc in order to support newer C++ standards
# 4. python 3 is required by nodejs build
run: |
yum install --assumeyes https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y centos-release-scl
yum install --assumeyes git gcc python3 devtoolset-11-gcc*
# Work-around for https://github.com/actions/runner-images/issues/6775
- name: Change Owner of Container Working Directory
if: matrix.container
run: chown root:root .
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
run: ./bin/hermit env --raw >> $GITHUB_ENV
- name: Build
run: |
if [ -f /opt/rh/devtoolset-11/enable ]; then . /opt/rh/devtoolset-11/enable; fi
make VERSION=${{ inputs.version }} -C pkgs/${{ inputs.package }}
- name: Upload Release
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.package }}-${{ inputs.version }}
allowUpdates: true
artifacts: "pkgs/${{ inputs.package }}/${{ inputs.package }}-${{ inputs.version }}-*.tar.xz"
token: ${{ secrets.GITHUB_TOKEN }}