Skip to content

Commit 191d9cc

Browse files
authored
clangpdb-ci.yml: Fix string replacement (#552)
String replacement did not occur as expected with nunjucks. The yaml/json formatted strings were not treated as raw strings as expected, resulting in unexpected formatting of inputs. ## Example of Incorrect formatting: ### Example 1: In this example, both the python version and package config inputs need to be wrapped in quotes <img width="561" height="328" alt="image" src="https://github.com/user-attachments/assets/ba5c4688-c554-4165-ac8f-5a0037a640dc" /> ### Example 2: In this example, package config value replacement value needed to be treated as a raw string, so the `|` was used <img width="393" height="561" alt="image" src="https://github.com/user-attachments/assets/6e1b6160-a6c0-4849-997a-302a6bd3f6ad" />
1 parent bcfc853 commit 191d9cc

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

.sync/Files.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ group:
611611
dest: .github/workflows/clangpdb-ci.yml
612612
template:
613613
setup_cmd: ci-setup
614-
package_config: "[]"
615614
repos: |
616615
microsoft/mu_common_intel_min_platform
617616
@@ -654,7 +653,6 @@ group:
654653
template:
655654
branch: main
656655
setup_cmd: both
657-
package_config: "[]"
658656
repos: |
659657
microsoft/mu_feature_config
660658
microsoft/mu_feature_debugger
@@ -667,7 +665,6 @@ group:
667665
dest: .github/workflows/clangpdb-ci.yml
668666
template:
669667
setup_cmd: ci-setup
670-
package_config: "[]"
671668
repos: |
672669
microsoft/mu_oem_sample
673670
microsoft/mu_plus
@@ -679,7 +676,6 @@ group:
679676
template:
680677
branch: main
681678
setup_cmd: ci-setup
682-
package_config: "[]"
683679
repos: |
684680
microsoft/mu_tiano_platforms
685681

.sync/workflows/leaf/clangpdb-ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,48 +33,49 @@ jobs:
3333
uses: microsoft/mu_devops/.github/workflows/PackageMatrix.yml@{{ sync_version.mu_devops }}
3434
with:
3535
ci-config: '.pytool/CISettings.py'
36+
python-version: "{{ sync_version.python_version }}"
3637
# Default config applied to any undeclared packages in the repo
3738
default-config: |
3839
targets: ["DEBUG,RELEASE"]
3940
toolchain: ["CLANGPDB"]
40-
package-config: {{ package_config }}
41-
python-version: {{ sync_version.python_version }}
41+
{% if package_config is defined %}
42+
package-config: |
43+
{{ package_config | indent(8, true) }}
44+
{% endif %}
4245

4346
windows-ci:
4447
name: Windows CLANGPDB CI
4548

4649
{% raw %}
4750
if: ${{ needs.package-matrix.outputs.matrix != '' }}
4851
{% endraw %}
49-
5052
needs: package-matrix
5153

5254
uses: microsoft/mu_devops/.github/workflows/PackageCi.yml@{{ sync_version.mu_devops }}
5355

5456
with:
57+
runner: windows-latest
58+
setup-cmd: {{ setup_cmd }}
59+
python-version: "{{ sync_version.python_version }}"
5560
{% raw %}
5661
package-config: ${{ needs.package-matrix.outputs.matrix }}
5762
{% endraw %}
58-
runner: windows-latest
59-
setup-cmd: {{ package_config }}
60-
python-version: {{ sync_version.python_version }}
6163

6264
ubuntu-ci:
6365
name: Ubuntu CLANGPDB CI
6466

6567
{% raw %}
6668
if: ${{ needs.package-matrix.outputs.matrix != '' }}
6769
{% endraw %}
68-
6970
needs: package-matrix
7071

7172
uses: microsoft/mu_devops/.github/workflows/PackageCi.yml@{{ sync_version.mu_devops }}
7273

7374
with:
75+
runner: ubuntu-latest
76+
setup-cmd: {{ setup_cmd }}
77+
container: {{ sync_version.linux_build_container }}
78+
python-version: "{{ sync_version.python_version }}"
7479
{% raw %}
7580
package-config: ${{ needs.package-matrix.outputs.matrix }}
7681
{% endraw %}
77-
runner: ubuntu-latest
78-
setup-cmd: {{ package_config }}
79-
container: {{ sync_version.linux_build_container }}
80-
python-version: {{ sync_version.python_version }}

0 commit comments

Comments
 (0)