Skip to content

Commit

Permalink
Don't modify global git safe.directory config outside of CI (#25857)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ksperling-apple authored and pull[bot] committed Oct 13, 2023
1 parent 8e2b5d3 commit 9d8b470
Show file tree
Hide file tree
Showing 36 changed files with 63 additions and 51 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
# with:
# languages: "cpp"
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -342,7 +342,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down Expand Up @@ -398,7 +398,7 @@ jobs:
# with:
# languages: "cpp"
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Try to ensure the directory for diagnostic log collection exists
run: |
mkdir -p ~/Library/Logs/DiagnosticReports || true
Expand Down Expand Up @@ -501,7 +501,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform esp32
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32
- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform nrfconnect
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect
- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Setup Environment
# coreutils for stdbuf
run: brew install coreutils
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Setup Environment
run: brew install [email protected]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-ameba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform ameba
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ameba
- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform bouffalolab --recursive
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform bouffalolab --recursive

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform cc13x2_26x2
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13x2_26x2
- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-cc32xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform cc32xx
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc32xx
- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform silabs_docker
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform silabs_docker

# - name: Out of Tree verification
# run: third_party/silabs/out_of_tree_verification.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform esp32
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32

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

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform infineon
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform infineon

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform k32w0
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform k32w0

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-imx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-mbed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform mbed
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mbed

- name: Detect changed paths
uses: dorny/paths-filter@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-mw320.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform mw320
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mw320

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform nrfconnect
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect
- name: Detect changed paths
uses: dorny/paths-filter@v2
id: changed_paths
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --recursive --platform openiotsdk
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-qpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform qpg
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform qpg

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform telink
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform telink

- name: Set up environment for size reports
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:

- name: Build example Telink Lighting App with Factory Data
run: |
./scripts/checkout_submodules.py --shallow --platform linux
./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
./scripts/build/gn_gen.sh
./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p"
./scripts/run_in_build_env.sh \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-tizen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform tizen
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
if: ${{ env.ACT }}
name: Checkout (ACT for local build)
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform android
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# Bootstrap and checkout for internal scripts (like idl_lint)
# to run
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform esp32
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform tizen
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketest-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform android
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketest-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Setup Environment
run: brew install [email protected]

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
if: ${{ env.ACT }}
name: Checkout (ACT for local build)
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Setup Environment
# coreutils for stdbuf
run: brew install coreutils
Expand Down Expand Up @@ -450,7 +450,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -536,7 +536,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -705,7 +705,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
- name: Setup Environment
# coreutils for stdbuf
run: brew install coreutils
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Bootstrap
timeout-minutes: 10
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zap_regeneration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
Expand Down
Loading

0 comments on commit 9d8b470

Please sign in to comment.