Skip to content

Add GHA workflow to build and test RPMs #85

Add GHA workflow to build and test RPMs

Add GHA workflow to build and test RPMs #85

name: RPM Build and Test
env:
# TODO: we really need to define a list of supported versions (ideally it's no more than 2)
# build is done on the lowest version and test on the highest with a "sanity test"
# stage done on all versions in the list ecept the highest
EL8_BUILD_VERSION: 8.6
EL8_VERSION: 8.8
EL9_BUILD_VERSION: 9
EL9_VERSION: 9
LEAP15_VERSION: 15.5
# Which distros to build for
DISTROS: el8 el9 leap15
# DO NOT LAND -- just to speed up testing
# TEST_TAG: pr
TEST_TAG: always_passes,vm
PACKAGING_DIR: .
NAME: argobots
on:
workflow_dispatch:
inputs:
pr-repos:
description: 'Any PR-repos that you want included in this build'
required: false
commit-message:
description: 'Commit message to use rather than the one from git'
required: false
rpm-test-version:
description: 'RPM version to test'
required: false
pull_request:
concurrency:
group: rpm-build-and-test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash --noprofile --norc -ueo pipefail {0}
permissions: {}
jobs:
Variables:
name: Compute outputs
runs-on: [self-hosted, light]
outputs:
NAME: ${{ env.NAME }}
DISTROS: ${{ env.DISTROS }}
EL8_BUILD_VERSION: ${{ env.EL8_BUILD_VERSION }}
EL9_BUILD_VERSION: ${{ env.EL9_BUILD_VERSION }}
LEAP15_VERSION: ${{ env.LEAP15_VERSION }}
PACKAGING_DIR: ${{ env.PACKAGING_DIR }}
TEST_TAG: ${{ env.TEST_TAG }}
steps:
- name: Echo
if: false
run: echo
Call-RPM-Build:
name: Build RPM
needs: Variables
if: inputs.rpm-test-version == ''
permissions:
statuses: write
uses: ./.github/workflows/rpm-build.yml
secrets: inherit
with:
NAME: ${{ needs.Variables.outputs.NAME }}
DISTROS: ${{ needs.Variables.outputs.DISTROS }}
EL8_BUILD_VERSION: ${{ needs.Variables.outputs.EL8_BUILD_VERSION }}
EL9_BUILD_VERSION: ${{ needs.Variables.outputs.EL9_BUILD_VERSION }}
LEAP15_VERSION: ${{ needs.Variables.outputs.LEAP15_VERSION }}
PACKAGING_DIR: ${{ needs.Variables.outputs.PACKAGING_DIR}}
Call-RPM-Test:
# TODO: investigate how cancelling this can cancel the downstream job
name: Test RPMs with DAOS
needs: [Variables, Call-RPM-Build]
uses: ./.github/workflows/rpm-test.yml
secrets: inherit
with:
NAME: ${{ needs.Variables.outputs.NAME }}
DISTROS: ${{ needs.Variables.outputs.DISTROS }}
TEST_TAG: ${{ needs.Variables.outputs.TEST_TAG }}