File: diff.yml

package info (click to toggle)
libvpl 1%3A2.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,580 kB
  • sloc: cpp: 92,604; ansic: 6,176; python: 4,312; sh: 323; makefile: 7
file content (83 lines) | stat: -rw-r--r-- 2,237 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
name: Diff report

permissions: read-all

on:
  workflow_call:
    inputs:
      report_name:
        description: 'name of artifact to store the diff'
        required: true
        type: string
      left:
        description: 'name of artifact for left side of compare'
        required: true
        type: string
      right:
        description: 'name of artifact for right side of compare'
        required: true
        type: string

jobs:
  report:
    runs-on: [self-hosted, linux]
    steps:

      - name: Cleanup workspace
        run: sudo rm -rf ..?* .[!.]* *

      - name: Download left artifact
        uses: actions/download-artifact@v4
        with:
          name: ${{ inputs.left }}
          path: left

      - name: Extract package
        run: unzip left/*.zip -d ${{ inputs.left }}

      - name: Download right artifact
        uses: actions/download-artifact@v4
        with:
          name: ${{ inputs.right }}
          path: right

      - name: Extract package
        run: unzip right/*.zip -d ${{ inputs.right }}

      - name: Checkout PR branch
        uses: actions/checkout@v4
        with:
          path: source

      - name: Run Diff
        run: |
          mkdir report
          python3 source/.github/workflows/diff/bom_diff.py \
            "${{ inputs.left }}" \
            "${{ inputs.right }}" \
            --mode All \
            --title "Bom Report (Full)" \
            --output report/FULL_BOM.html
          python3 source/.github/workflows/diff/bom_diff.py \
            "${{ inputs.left }}" \
            "${{ inputs.right }}" \
            --mode Diff \
            --title "Bom Report (Diff)" \
            --output report/DIFF_BOM.html
          python3 source/.github/workflows/diff/bom_diff.py \
            "${{ inputs.left }}" \
            "${{ inputs.right }}" \
            --mode Orphan \
            --title "Bom Report (Orphan)" \
            --output report/ORPHAN_BOM.html

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        if: (success() || failure()) && inputs.report_name
        with:
          name: ${{ inputs.report_name }}
          path: ./report/

      - name: Cleanup workspace
        run: sudo rm -rf ..?* .[!.]* *