Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit 5f45767

Browse files
Add GHA workflow to build and test RPMs (#28)
Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
1 parent 7a123c8 commit 5f45767

4 files changed

Lines changed: 128 additions & 2 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: RPM Build and Test
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr-repos:
7+
description: 'Any PR-repos that you want included in this build'
8+
required: false
9+
commit-message:
10+
description: 'Commit message to use rather than the one from git'
11+
required: false
12+
rpm-test-version:
13+
description: 'RPM version to test'
14+
required: false
15+
pull_request:
16+
push:
17+
branches:
18+
- master
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
22+
cancel-in-progress: true
23+
24+
defaults:
25+
run:
26+
shell: bash --noprofile --norc -ueo pipefail {0}
27+
28+
permissions: {}
29+
30+
jobs:
31+
Variables:
32+
# What a dumb jobs this is
33+
# Needed because of https://github.com/orgs/community/discussions/26671
34+
# Ideally want to be able to use:
35+
# with:
36+
# NAME: ${{ env.NAME }}
37+
# in the Call-RPM-Build job but the above issue prevents it
38+
name: Compute outputs
39+
runs-on: [self-hosted, light]
40+
env:
41+
# see https://github.com/organizations/daos-stack/settings/variables/actions for
42+
# the organizational defaults values for these variables
43+
# TODO: we really need to define a list of supported versions (ideally it's no more than 2)
44+
# build is done on the lowest version and test on the highest with a "sanity test"
45+
# stage done on all versions in the list ecept the highest
46+
EL8_BUILD_VERSION: ${{ vars.EL8_BUILD_VERSION_MASTER }}
47+
EL8_VERSION: ${{ vars.EL8_VERSION_MASTER }}
48+
EL9_BUILD_VERSION: ${{ vars.EL9_BUILD_VERSION_MASTER }}
49+
EL9_VERSION: ${{ vars.EL9_VERSION_MASTER }}
50+
LEAP15_VERSION: ${{ vars.LEAP15_VERSION_MASTER }}
51+
# Which distros to build for
52+
DISTROS: ${{ vars.DISTROS_MASTER }}
53+
TEST_TAG: ${{ vars.TEST_TAG }}
54+
PACKAGING_DIR: ${{ vars.PACKAGING_DIR }}
55+
outputs:
56+
NAME: ${{ steps.NAME.outputs.text }}
57+
DISTROS: ${{ env.DISTROS }}
58+
EL8_BUILD_VERSION: ${{ env.EL8_BUILD_VERSION }}
59+
EL9_BUILD_VERSION: ${{ env.EL9_BUILD_VERSION }}
60+
LEAP15_VERSION: ${{ env.LEAP15_VERSION }}
61+
PACKAGING_DIR: ${{ env.PACKAGING_DIR }}
62+
TEST_TAG: ${{ env.TEST_TAG }}
63+
steps:
64+
- name: NAME
65+
id: NAME
66+
run: |
67+
repo="${{ github.repository }}"
68+
echo "text=${repo#*/}" >> $GITHUB_OUTPUT
69+
70+
Call-RPM-Build:
71+
name: Build RPM
72+
needs: Variables
73+
if: inputs.rpm-test-version == ''
74+
permissions:
75+
statuses: write
76+
uses: daos-stack/actions-lib/.github/workflows/rpm-build.yml@v1
77+
secrets: inherit
78+
with:
79+
NAME: ${{ needs.Variables.outputs.NAME }}
80+
DISTROS: ${{ needs.Variables.outputs.DISTROS }}
81+
EL8_BUILD_VERSION: ${{ needs.Variables.outputs.EL8_BUILD_VERSION }}
82+
EL9_BUILD_VERSION: ${{ needs.Variables.outputs.EL9_BUILD_VERSION }}
83+
LEAP15_VERSION: ${{ needs.Variables.outputs.LEAP15_VERSION }}
84+
PACKAGING_DIR: ${{ needs.Variables.outputs.PACKAGING_DIR}}
85+
# RUN_GHA: true
86+
87+
Call-RPM-Test:
88+
# TODO: investigate how cancelling this can cancel the downstream job
89+
name: Test RPMs with DAOS
90+
needs: [Variables, Call-RPM-Build]
91+
uses: daos-stack/actions-lib/.github/workflows/rpm-test.yml@v1
92+
# it would be better if we could do this in rpm-test.yml but we can't because it causes:
93+
# The nested job 'Test-with-DAOS' is requesting 'issues: write', but is only allowed
94+
# 'issues: none'.
95+
permissions:
96+
issues: write
97+
secrets: inherit
98+
with:
99+
NAME: ${{ needs.Variables.outputs.NAME }}
100+
DISTROS: ${{ needs.Variables.outputs.DISTROS }}
101+
TEST_TAG: ${{ needs.Variables.outputs.TEST_TAG }}
102+
RUN_GHA: ${{ needs.Call-RPM-Build.outputs.run-gha == 'true' }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
_topdir/
22
*.tar.gz
3-
*-workspace
3+
*-workspace
4+
mock_result/

.yamllint.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Yamllint configuration file, used by github actions and commit hooks.
2+
#
3+
# The yamllint tool will use .yamllint in preference to this file and it is in .gitignore so users
4+
# can create one locally to overrule these settings for local commit hooks.
5+
6+
extends: default
7+
8+
rules:
9+
line-length:
10+
max: 100
11+
indentation:
12+
spaces: 2
13+
truthy:
14+
allowed-values: ['true', 'false', 'True', 'False']
15+
check-keys: false
16+
document-start:
17+
present: false
18+
document-end:
19+
present: false
20+
21+
ignore: |
22+
/_topdir/
23+
/.git/

packaging/get_base_branch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
set -eux -o pipefail
66
IFS=' ' read -r -a add_bases <<< "${1:-}"
7-
origin=origin
7+
origin="${ORIGIN:-origin}"
88
mapfile -t all_bases < <(echo "master"
99
git branch -r | sed -ne "/^ $origin\\/release\\/[0-9]/s/^ $origin\\///p")
1010
all_bases+=("${add_bases[@]}")

0 commit comments

Comments
 (0)