Skip to content

Commit 4f8b2da

Browse files
nicu1989carlescufi
authored andcommitted
scripts: Fixed windows requirements for scancode
Uppercase AMD64 instead of amd64. Signed-off-by: Nicolae Dicu <[email protected]>
1 parent ef2e87b commit 4f8b2da

File tree

3 files changed

+44
-92
lines changed

3 files changed

+44
-92
lines changed

.github/workflows/west-commands.yml

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -57,77 +57,29 @@ jobs:
5757
with:
5858
git-fetch-depth: 0
5959
path: nrf
60-
- name: Install requirements(bash)
60+
- name: Install requirements
6161
shell: bash
6262
run: |
6363
pip3 install -r nrf/scripts/requirements-fixed.txt
6464
pip3 install -r nrf/scripts/requirements-west-ncs-sbom.txt
6565
pip3 install -r nrf/scripts/requirements-extra.txt
66-
- name: Install requirements (Windows)
67-
if: ${{ matrix.os == 'windows-latest' }}
68-
shell: pwsh
69-
run: |
70-
python -m pip install --upgrade pip
71-
python -m pip install -r nrf/scripts/requirements-fixed.txt
72-
python -m pip install -r nrf/scripts/requirements-west-ncs-sbom.txt
73-
python -m pip install -r nrf/scripts/requirements-extra.txt
7466
- name: Smoke test ncs-loot & ncs-compare
7567
shell: bash
7668
run: |
7769
west ncs-loot -h
7870
west ncs-compare -h
79-
- name: Smoke test ncs-sbom (Ubuntu)
71+
- name: Smoke test ncs-sbom
8072
# macOS is not supported by scancode-toolkit(used in ncs-sbom)
81-
if: ${{ matrix.os == 'ubuntu-24.04' }}
73+
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'windows-latest' }}
8274
shell: bash
8375
run: |
8476
west ncs-sbom -h
8577
86-
# show what scancode-toolkit is default
87-
if [[ "$RUNNER_OS" == "Linux" ]]; then
88-
scancode --version
89-
fi
90-
9178
# create a dummy file
9279
echo "/* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */" > test_file.c
93-
80+
scancode --version
9481
# run ncs-sbom with scancode-toolkit
9582
west ncs-sbom \
9683
--input-files test_file.c \
9784
--license-detectors scancode-toolkit \
9885
--output-html scancode_report.html
99-
- name: Smoke test ncs-sbom (Windows)
100-
if: ${{ matrix.os == 'windows-latest' }}
101-
shell: pwsh
102-
run: |
103-
# --- show environment trees (Windows style) ---
104-
$envs = @(
105-
"pythonLocation",
106-
"PKG_CONFIG_PATH",
107-
"Python_ROOT_DIR",
108-
"Python2_ROOT_DIR",
109-
"Python3_ROOT_DIR"
110-
)
111-
112-
foreach ($e in $envs) {
113-
$path = (Get-Item "Env:$e").Value
114-
Write-Host "`n=== $e ==="
115-
Write-Host $path
116-
if (Test-Path $path) {
117-
Write-Host "`n--- Directory tree for $e ---"
118-
tree $path /F | Out-String | Write-Host
119-
} else {
120-
Write-Host "Path not found: $path"
121-
}
122-
}
123-
124-
west ncs-sbom -h
125-
126-
# create a dummy file
127-
Set-Content -Path test_file.c -Value '/* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */'
128-
129-
# run ncs-sbom with scancode-toolkit
130-
west ncs-sbom `
131-
--input-files test_file.c `
132-
--license-detectors scancode-toolkit `
133-
--output-html scancode_report.html

0 commit comments

Comments
 (0)