Skip to content

Commit 3cddcc6

Browse files
Don't modify global git safe.directory config outside of CI (#25857)
Adding CHIP_ROOT as a safe directory is now gated by a --configure flag which is added to all the calls from CI scripts (but not e.g. the Darwin chip_xcode_build_connector). Also avoid adding the directory again if it's already in the list.
1 parent 7c68de4 commit 3cddcc6

36 files changed

+63
-51
lines changed

.github/workflows/build.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
attempt_limit: 3
6161
attempt_delay: 2000
6262
- name: Checkout submodules
63-
run: scripts/checkout_submodules.py --shallow --platform linux
63+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
6464
- name: Try to ensure the directories for core dumping exist and we
6565
can write them.
6666
run: |
@@ -177,7 +177,7 @@ jobs:
177177
# with:
178178
# languages: "cpp"
179179
- name: Checkout submodules
180-
run: scripts/checkout_submodules.py --shallow --platform linux
180+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
181181
- name: Try to ensure the directories for core dumping exist and we
182182
can write them.
183183
run: |
@@ -342,7 +342,7 @@ jobs:
342342
attempt_limit: 3
343343
attempt_delay: 2000
344344
- name: Checkout submodules
345-
run: scripts/checkout_submodules.py --shallow --platform linux
345+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
346346

347347
- name: Bootstrap cache
348348
uses: actions/cache@v3
@@ -398,7 +398,7 @@ jobs:
398398
# with:
399399
# languages: "cpp"
400400
- name: Checkout submodules
401-
run: scripts/checkout_submodules.py --shallow --platform darwin
401+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
402402
- name: Try to ensure the directory for diagnostic log collection exists
403403
run: |
404404
mkdir -p ~/Library/Logs/DiagnosticReports || true
@@ -501,7 +501,7 @@ jobs:
501501
attempt_limit: 3
502502
attempt_delay: 2000
503503
- name: Checkout submodules
504-
run: scripts/checkout_submodules.py --shallow --platform linux
504+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
505505

506506
- name: Bootstrap cache
507507
uses: actions/cache@v3

.github/workflows/chef.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
attempt_limit: 3
4444
attempt_delay: 2000
4545
- name: Checkout submodules
46-
run: scripts/checkout_submodules.py --shallow --platform linux
46+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
4747
- name: Bootstrap cache
4848
uses: actions/cache@v3
4949
timeout-minutes: 10
@@ -79,7 +79,7 @@ jobs:
7979
attempt_limit: 3
8080
attempt_delay: 2000
8181
- name: Checkout submodules
82-
run: scripts/checkout_submodules.py --shallow --platform esp32
82+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32
8383
- name: Bootstrap cache
8484
uses: actions/cache@v3
8585
timeout-minutes: 10
@@ -115,7 +115,7 @@ jobs:
115115
attempt_limit: 3
116116
attempt_delay: 2000
117117
- name: Checkout submodules
118-
run: scripts/checkout_submodules.py --shallow --platform nrfconnect
118+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect
119119
- name: Bootstrap cache
120120
uses: actions/cache@v3
121121
timeout-minutes: 10

.github/workflows/cirque.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
attempt_limit: 3
5959
attempt_delay: 2000
6060
- name: Checkout submodules
61-
run: scripts/checkout_submodules.py --shallow --platform linux
61+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
6262

6363
- name: Bootstrap cache
6464
uses: actions/cache@v3

.github/workflows/darwin-tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
attempt_limit: 3
5555
attempt_delay: 2000
5656
- name: Checkout submodules
57-
run: scripts/checkout_submodules.py --shallow --platform darwin
57+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
5858
- name: Setup Environment
5959
# coreutils for stdbuf
6060
run: brew install coreutils

.github/workflows/darwin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
attempt_limit: 3
4343
attempt_delay: 2000
4444
- name: Checkout submodules
45-
run: scripts/checkout_submodules.py --shallow --platform darwin
45+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
4646
- name: Setup Environment
4747
run: brew install python@3.9
4848

.github/workflows/examples-ameba.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform ameba
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ameba
5353
- name: Bootstrap cache
5454
uses: actions/cache@v3
5555
timeout-minutes: 10

.github/workflows/examples-bouffalolab.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform bouffalolab --recursive
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform bouffalolab --recursive
5353

5454
- name: Set up environment for size reports
5555
if: ${{ !env.ACT }}

.github/workflows/examples-cc13x2x7_26x2x7.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
attempt_limit: 3
5252
attempt_delay: 2000
5353
- name: Checkout submodules
54-
run: scripts/checkout_submodules.py --shallow --platform cc13x2_26x2
54+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13x2_26x2
5555
- name: Set up environment for size reports
5656
if: ${{ !env.ACT }}
5757
env:

.github/workflows/examples-cc32xx.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
attempt_limit: 3
4949
attempt_delay: 2000
5050
- name: Checkout submodules
51-
run: scripts/checkout_submodules.py --shallow --platform cc32xx
51+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc32xx
5252
- name: Set up environment for size reports
5353
if: ${{ !env.ACT }}
5454
env:

.github/workflows/examples-efr32.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
attempt_limit: 3
5353
attempt_delay: 2000
5454
- name: Checkout submodules
55-
run: scripts/checkout_submodules.py --shallow --platform silabs_docker
55+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform silabs_docker
5656

5757
# - name: Out of Tree verification
5858
# run: third_party/silabs/out_of_tree_verification.sh

.github/workflows/examples-esp32.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform esp32
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32
5353

5454
- name: Set up environment for size reports
5555
if: ${{ !env.ACT }}
@@ -172,7 +172,7 @@ jobs:
172172
attempt_limit: 3
173173
attempt_delay: 2000
174174
- name: Checkout submodules
175-
run: scripts/checkout_submodules.py --shallow --platform esp32
175+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32
176176

177177
- name: Bootstrap cache
178178
uses: actions/cache@v3

.github/workflows/examples-infineon.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform infineon
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform infineon
5353

5454
- name: Set up environment for size reports
5555
if: ${{ !env.ACT }}

.github/workflows/examples-k32w.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
attempt_limit: 3
5252
attempt_delay: 2000
5353
- name: Checkout submodules
54-
run: scripts/checkout_submodules.py --shallow --platform k32w0
54+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform k32w0
5555

5656
- name: Set up environment for size reports
5757
if: ${{ !env.ACT }}

.github/workflows/examples-linux-arm.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform linux
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
5353

5454
- name: Set up environment for size reports
5555
if: ${{ !env.ACT }}

.github/workflows/examples-linux-imx.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
attempt_limit: 3
4848
attempt_delay: 2000
4949
- name: Checkout submodules
50-
run: scripts/checkout_submodules.py --shallow --platform linux
50+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
5151

5252
- name: Bootstrap cache
5353
uses: actions/cache@v3

.github/workflows/examples-linux-standalone.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
attempt_limit: 3
5050
attempt_delay: 2000
5151
- name: Checkout submodules
52-
run: scripts/checkout_submodules.py --shallow --platform linux
52+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
5353

5454
- name: Set up environment for size reports
5555
if: ${{ !env.ACT }}

.github/workflows/examples-mbed.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
attempt_limit: 3
5656
attempt_delay: 2000
5757
- name: Checkout submodules
58-
run: scripts/checkout_submodules.py --shallow --platform mbed
58+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mbed
5959

6060
- name: Detect changed paths
6161
uses: dorny/paths-filter@v2

.github/workflows/examples-mw320.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
attempt_limit: 3
5252
attempt_delay: 2000
5353
- name: Checkout submodules
54-
run: scripts/checkout_submodules.py --shallow --platform mw320
54+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mw320
5555

5656
- name: Set up environment for size reports
5757
if: ${{ !env.ACT }}

.github/workflows/examples-nrfconnect.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
attempt_limit: 3
5353
attempt_delay: 2000
5454
- name: Checkout submodules
55-
run: scripts/checkout_submodules.py --shallow --platform nrfconnect
55+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect
5656
- name: Detect changed paths
5757
uses: dorny/paths-filter@v2
5858
id: changed_paths

.github/workflows/examples-openiotsdk.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
attempt_limit: 3
5252
attempt_delay: 2000
5353
- name: Checkout submodules
54-
run: scripts/checkout_submodules.py --shallow --recursive --platform openiotsdk
54+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk
5555

5656
- name: Set up environment for size reports
5757
if: ${{ !env.ACT }}

.github/workflows/examples-qpg.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
attempt_limit: 3
5252
attempt_delay: 2000
5353
- name: Checkout submodules
54-
run: scripts/checkout_submodules.py --shallow --platform qpg
54+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform qpg
5555

5656
- name: Set up environment for size reports
5757
if: ${{ !env.ACT }}

.github/workflows/examples-telink.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
attempt_limit: 3
5151
attempt_delay: 2000
5252
- name: Checkout submodules
53-
run: scripts/checkout_submodules.py --shallow --platform telink
53+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform telink
5454

5555
- name: Set up environment for size reports
5656
if: ${{ !env.ACT }}
@@ -132,7 +132,7 @@ jobs:
132132

133133
- name: Build example Telink Lighting App with Factory Data
134134
run: |
135-
./scripts/checkout_submodules.py --shallow --platform linux
135+
./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
136136
./scripts/build/gn_gen.sh
137137
./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p"
138138
./scripts/run_in_build_env.sh \

.github/workflows/examples-tizen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
attempt_limit: 3
5151
attempt_delay: 2000
5252
- name: Checkout submodules
53-
run: scripts/checkout_submodules.py --shallow --platform tizen
53+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen
5454

5555
- name: Bootstrap cache
5656
uses: actions/cache@v3

.github/workflows/full-android.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
if: ${{ env.ACT }}
6262
name: Checkout (ACT for local build)
6363
- name: Checkout submodules
64-
run: scripts/checkout_submodules.py --shallow --platform android
64+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android
6565

6666
- name: Bootstrap cache
6767
uses: actions/cache@v3

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
# Bootstrap and checkout for internal scripts (like idl_lint)
5555
# to run
5656
- name: Checkout submodules
57-
run: scripts/checkout_submodules.py --shallow --platform linux
57+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
5858
- name: Bootstrap cache
5959
uses: actions/cache@v3
6060
timeout-minutes: 10

.github/workflows/qemu.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
attempt_limit: 3
5454
attempt_delay: 2000
5555
- name: Checkout submodules
56-
run: scripts/checkout_submodules.py --shallow --platform esp32
56+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32
5757

5858
- name: Bootstrap cache
5959
uses: actions/cache@v3
@@ -117,7 +117,7 @@ jobs:
117117
attempt_limit: 3
118118
attempt_delay: 2000
119119
- name: Checkout submodules
120-
run: scripts/checkout_submodules.py --shallow --platform tizen
120+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen
121121

122122
- name: Bootstrap cache
123123
uses: actions/cache@v3

.github/workflows/smoketest-android.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
attempt_limit: 3
5353
attempt_delay: 2000
5454
- name: Checkout submodules
55-
run: scripts/checkout_submodules.py --shallow --platform android
55+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android
5656

5757
- name: Bootstrap cache
5858
uses: actions/cache@v3

.github/workflows/smoketest-darwin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
attempt_limit: 3
4343
attempt_delay: 2000
4444
- name: Checkout submodules
45-
run: scripts/checkout_submodules.py --shallow --platform darwin
45+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
4646
- name: Setup Environment
4747
run: brew install python@3.9
4848

.github/workflows/tests.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
if: ${{ env.ACT }}
7373
name: Checkout (ACT for local build)
7474
- name: Checkout submodules
75-
run: scripts/checkout_submodules.py --shallow --platform linux
75+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
7676
- name: Try to ensure the directories for core dumping exist and we
7777
can write them.
7878
run: |
@@ -324,7 +324,7 @@ jobs:
324324
attempt_limit: 3
325325
attempt_delay: 2000
326326
- name: Checkout submodules
327-
run: scripts/checkout_submodules.py --shallow --platform darwin
327+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
328328
- name: Setup Environment
329329
# coreutils for stdbuf
330330
run: brew install coreutils
@@ -450,7 +450,7 @@ jobs:
450450
- name: Checkout
451451
uses: actions/checkout@v3
452452
- name: Checkout submodules
453-
run: scripts/checkout_submodules.py --shallow --platform linux
453+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
454454
- name: Try to ensure the directories for core dumping exist and we
455455
can write them.
456456
run: |
@@ -536,7 +536,7 @@ jobs:
536536
- name: Checkout
537537
uses: actions/checkout@v3
538538
- name: Checkout submodules
539-
run: scripts/checkout_submodules.py --shallow --platform linux
539+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
540540
- name: Try to ensure the directories for core dumping exist and we
541541
can write them.
542542
run: |
@@ -705,7 +705,7 @@ jobs:
705705
- name: Checkout
706706
uses: actions/checkout@v3
707707
- name: Checkout submodules
708-
run: scripts/checkout_submodules.py --shallow --platform darwin
708+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
709709
- name: Setup Environment
710710
# coreutils for stdbuf
711711
run: brew install coreutils

.github/workflows/unit_integration_test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
attempt_limit: 3
5454
attempt_delay: 2000
5555
- name: Checkout submodules
56-
run: scripts/checkout_submodules.py --shallow --platform linux
56+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
5757
- name: Bootstrap
5858
timeout-minutes: 10
5959
run: |

.github/workflows/zap_regeneration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
attempt_limit: 3
4646
attempt_delay: 2000
4747
- name: Checkout submodules
48-
run: scripts/checkout_submodules.py --shallow --platform linux
48+
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
4949

5050
- name: Bootstrap cache
5151
uses: actions/cache@v3

0 commit comments

Comments
 (0)