Add GHA workflow to build and test RPMs #36
Workflow file for this run
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: 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 }} | |
steps: | |
- name: Echo | |
if: false | |
run: echo | |
call-rpm-build: | |
name: Build RPM | |
needs: variables | |
permissions: | |
statuses: write | |
uses: ./.github/workflows/rpm-build.yml | |
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}} | |
Test-with-DAOS: | |
# TODO: investigate how cancelling this can cancel the downstream job | |
name: Test RPMs with DAOS | |
runs-on: [self-hosted, mockbuilder] | |
timeout-minutes: 7200 | |
strategy: | |
fail-fast: false | |
matrix: | |
# no GHA support on this branch: branch: [master, release/2.4] | |
# DO NOT LAND - using PR as master for now | |
# branch: [master] | |
branch: [bmurrell/run-on-dispatch] | |
steps: | |
- name: Test RPMs with DAOS | |
uses: convictional/[email protected] | |
with: | |
owner: daos-stack | |
repo: daos | |
github_token: ${{ secrets.GHA_WORKFLOW_TRIGGER }} | |
comment_downstream_url: ${{ github.event.pull_request.comments_url }} | |
workflow_file_name: 'rpm-build-and-test.yml' | |
# TODO: or rather I suspect it's a TODO, but I suspect we need to create | |
# a temporary branch here so as not to pollute the landing branch | |
# runs with these tests | |
ref: ${{ matrix.branch }} | |
wait_interval: 10 | |
# TODO: rpm-test-version of course needs to either be the latest | |
# version, or better yet, no version and it installs the latest | |
# version | |
client_payload: '{"pr-repos": | |
"${{ env.NAME }}@PR-${{ github.event.pull_request.number }}", | |
"commit-message": | |
"Override commit pragmas", | |
"test-tag": | |
"load_mpi,vm test_core_files,vm ${{ env.TEST_TAG }}", | |
"rpm-test-version": | |
"2.5.101", | |
"functional-test-distros": | |
"${{ env.DISTROS }}" | |
}' | |
propagate_failure: true | |
# TODO: investigate how cancelling this can cancel the downstream job | |
- name: Cleanup downstream jobs | |
if: cancelled() | |
run: echo "Cancelling downstream jobs (but how?)" |