forked from microsoft/azurelinux
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.65 KB
/
check-srpm-duplicates.yml
File metadata and controls
51 lines (41 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# This action checks that the specs in this repo
# generate SRPMs with unique names.
name: SRPMs duplicates check
on:
push:
branches: [main, 2.0*, 3.0*, fasttrack/*]
pull_request:
branches: [main, 2.0*, 3.0*, fasttrack/*]
jobs:
check:
name: SRPMs duplicates check
runs-on: ubuntu-latest
strategy:
matrix:
# Each group is published to a different repo, thus we only need to check
# for SRPM duplicates within the group.
specs-dirs-groups: ["SPECS SPECS-SIGNED", "SPECS-EXTENDED"]
steps:
# Checkout the branch of our repo that triggered this action
- name: Workflow trigger checkout
uses: actions/checkout@v4
# For consistency, we use the same major/minor version of Python that Azure Linux ships
- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Switch to stable toolkit
run: git fetch --all && git checkout 2.0-stable -- toolkit
# Generate the specs.json files. They are the input for the duplicates check script.
- name: Generate specs.json
run: |
set -euo pipefail
for spec_folder in ${{ matrix.specs-dirs-groups }}; do
echo "Generating specs.json for spec folder '$spec_folder'."
sudo make -C toolkit -j$(nproc) parse-specs REBUILD_TOOLS=y SPECS_DIR=../$spec_folder
cp -v build/pkg_artifacts/specs.json ${spec_folder}_specs.json
done
- name: Check for duplicate SRPMs
run: python3 toolkit/scripts/check_srpm_duplicates.py *_specs.json