Skip to content

Test package building for specific distributions #1354

Test package building for specific distributions

Test package building for specific distributions #1354

Workflow file for this run

---
name: 'Test package building for specific distributions'
on:
workflow_call:
inputs:
branch-name:
description: 'Checkout to a specific branch'
required: true
default: ''
type: string
schedule:
- cron: '0 1 * * *'
permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
contents: read
jobs:
prepare:
name: generate runner list
runs-on: ubuntu-24.04
outputs:
runnerlist: ${{ steps.get-runnerlist.outputs.runnerlist }}
steps:
- run: sudo apt-get update && sudo apt-get -y install jo
- id: get-runnerlist
run: echo "runnerlist=$(jo -a ubuntu-24.04 ${{ vars.ARM64_USE_UBICLOUD == '1' && 'ubicloud-standard-2-arm' || 'ubuntu-24.04-arm' }})" >> "$GITHUB_OUTPUT"
build:
name: build.sh
if: ${{ vars.SCHEDULED_JOBS_BUILDER || github.event_name != 'schedule' }}
needs: prepare
runs-on: ${{ matrix.runner-os }}
strategy:
matrix:
product: ['authoritative', 'recursor', 'dnsdist']
os:
- centos-9-stream
- centos-10-stream
- amazon-2023
runner-os: ${{ fromJson(needs.prepare.outputs.runnerlist )}}
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # for correct version numbers
submodules: recursive
ref: ${{ inputs.branch-name }}
persist-credentials: false
# this builds packages and runs our unit test (make check)
- run: builder/build.sh -v -m ${{ matrix.product }} ${{ matrix.os }}
- name: Get version number
run: |
echo "version=$(readlink builder/tmp/latest)" >> $GITHUB_OUTPUT
id: getversion
- name: Get target architecture
run: |
echo "target-arch=$(uname -m)" >> $GITHUB_OUTPUT
id: getarch
- name: Upload packages
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.product }}-${{ matrix.os }}-${{ steps.getversion.outputs.version }}-${{ steps.getarch.outputs.target-arch }}
path: built_pkgs/
retention-days: 7