Test package building for specific distributions #1107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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: | |
build: | |
name: build.sh | |
if: ${{ vars.SCHEDULED_JOBS_BUILDER }} | |
runs-on: ${{ matrix.runner-os }} | |
strategy: | |
matrix: | |
product: ['authoritative', 'recursor', 'dnsdist'] | |
os: | |
- el-7 | |
- el-8 | |
- centos-9-stream | |
- ubuntu-lunar | |
- ubuntu-mantic | |
- ubuntu-noble | |
- debian-bookworm | |
- debian-trixie | |
- amazon-2023 | |
runner-os: | |
- ubuntu-22.04 | |
- ubicloud-standard-2-arm | |
exclude: | |
- os: el-7 | |
runner-os: ubicloud-standard-2-arm | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # for correct version numbers | |
submodules: recursive | |
ref: ${{ inputs.branch-name }} | |
# 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@v4 | |
with: | |
name: ${{ matrix.product }}-${{ matrix.os }}-${{ steps.getversion.outputs.version }}-${{ steps.getarch.outputs.target-arch }} | |
path: built_pkgs/ | |
retention-days: 7 |