forked from karthickshanmugarao/sw-deps-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsLinkedToLibraryCheckModifiedFiles.yml
More file actions
47 lines (39 loc) · 1.69 KB
/
Copy pathIsLinkedToLibraryCheckModifiedFiles.yml
File metadata and controls
47 lines (39 loc) · 1.69 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
name: Check If Modified Files Are Associated with Library
on:
pull_request:
# Only listen for label changes on PRs
types: [labeled]
permissions:
contents: write
jobs:
LibraryCheckModifiedFiles:
# Only run when the added label is exactly 'RunCI'
if: ${{ github.event.label.name == 'RunCI' }}
runs-on: [ci-pc]
# Define the base path environment variable
env:
LV_PYTHON_SCRIPTS_PATH: 'C:\ProgramData\HawkeyeScripts'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Detect LabVIEW
shell: powershell
run: |
python "${{ env.LV_PYTHON_SCRIPTS_PATH }}\scripts\src\scripts\detect_labview.py" "${{ github.workspace }}"
- name: Generate changed files list and changed libraries list
shell: powershell
run: |
cd ${{ env.LV_PYTHON_SCRIPTS_PATH }}\scripts
uv sync
cd ${{ env.LV_PYTHON_SCRIPTS_PATH }}\
scripts\.venv\Scripts\activate
uv run python -u ${{ env.LV_PYTHON_SCRIPTS_PATH }}\scripts\src\scripts\generate_changed_files_list.py --workspace_root "${{ github.workspace }}" --base_branch "origin/${{ github.event.pull_request.base.ref }}" --head_branch "HEAD"
- name: Check If Files are associated with a Library
shell: powershell
# True argument in the gcli command args represents Checking Only Modified Libraries
run: |
$viPath = "$env:LV_PATH\vi.lib\Hawkeye\AutomatedChecks\IsLinkedToLibraryorClass.vi"
g-cli -v --lv-ver $env:LV_VERSION --arch $env:LV_BITNESS "$viPath" -- "${{ github.workspace }}" "True"