Debian Codegraph @

.github/workflows/pkgbuild.yml

raw symbols SCIP
1 #
2 # Verify on CI/GHA that RPM package building works.
3 #
4 name: RPM Packaging
5
6 on:
7 push:
8 branches: [main, master, 'release/**']
9 pull_request:
10 branches: [main, master]
11 workflow_dispatch:
12
13 jobs:
14
15 build:
16 name: Build RPMs (${{ matrix.dist }})
17 runs-on: ubuntu-latest
18
19 strategy:
20 fail-fast: false
21 matrix:
22 dist: [el9, el10]
23
24 container:
25 image: ghcr.io/caronc/apprise-rpmbuild:${{ matrix.dist }}
26 options: --user root
27
28 steps:
29 - name: Checkout source
30 uses: actions/checkout@v7
31
32 - name: Build RPMs
33 run: ./bin/build-rpm.sh
34 env:
35 APPRISE_DIR: ${{ github.workspace }}
36 # Drop RPMs into dist/<dist> inside the workspace
37 DIST_DIR: ${{ github.workspace }}/dist/${{ matrix.dist }}
38
39 - name: Show RPMs found for upload
40 run: |
41 echo "Listing dist/${{ matrix.dist }}/**/*.rpm:"
42 find dist/${{ matrix.dist }} -type f -name '*.rpm'
43
44 - name: Upload RPM Artifacts
45 uses: actions/upload-artifact@v7
46 with:
47 name: built-rpms-${{ matrix.dist }}
48 path: ./dist/${{ matrix.dist }}
49 if-no-files-found: error
50 retention-days: 5
51
52 - name: Upload rpmlint config files
53 uses: actions/upload-artifact@v7
54 with:
55 # Upload the specific files needed for verification
56 name: rpmlint-config-${{ matrix.dist }}
57 path: ./packaging/redhat/python-apprise.rpmlintrc.${{ matrix.dist }}
58 retention-days: 5
59
60 verify:
61 name: Verify RPMs (${{ matrix.dist }})
62 needs: build
63 runs-on: ubuntu-latest
64
65 strategy:
66 fail-fast: false
67 matrix:
68 dist: [el9, el10]
69
70 container:
71 image: ghcr.io/caronc/apprise-rpmbuild:${{ matrix.dist }}
72 options: --user root
73
74 steps:
75 - name: Download built RPMs
76 uses: actions/download-artifact@v8
77 with:
78 name: built-rpms-${{ matrix.dist }}
79 path: ./dist
80
81 - name: Download rpmlint config files
82 uses: actions/download-artifact@v8
83 with:
84 name: rpmlint-config-${{ matrix.dist }}
85 # Download files directly into the correct directory
86 path: ./packaging/redhat
87
88 - name: Lint RPMs
89 run: |
90 set -e
91 RC_FILE="./packaging/redhat/python-apprise.rpmlintrc.${{ matrix.dist }}"
92
93 if rpmlint --help 2>&1 | grep -q -- '--rpmlintrc'; then
94 echo "Using rpmlint --rpmlintrc with $RC_FILE"
95 rpmlint --rpmlintrc "$RC_FILE" ./dist/**/*.rpm
96 else
97 echo "Using rpmlint v1.x on older distribution"
98 rpmlint -f "$RC_FILE" ./dist/**/*.rpm
99 fi
100
101 - name: Install and verify RPMs
102 run: |
103 echo "Installing RPMs from: ./dist/"
104 find ./dist -name '*.rpm'
105 dnf install -y ./dist/**/*.rpm
106 apprise --version
107
108 - name: Check Installed Files
109 run: rpm -qlp ./dist/**/*.rpm