From a694b68519c3d187080d758a0e61c661882a0357 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Fri, 3 Feb 2023 18:45:49 +0100 Subject: [PATCH] .github: fix git directory permissions --- .github/workflows/test_chibios.yml | 1 + .github/workflows/test_coverage.yml | 1 + .github/workflows/test_environment.yml | 2 ++ .github/workflows/test_linux_sbc.yml | 1 + .github/workflows/test_replay.yml | 1 + .github/workflows/test_scripting_docs.yml | 1 + .github/workflows/test_sitl_copter.yml | 4 ++++ .github/workflows/test_sitl_periph.yml | 2 ++ .github/workflows/test_sitl_plane.yml | 2 ++ .github/workflows/test_sitl_rover.yml | 2 ++ .github/workflows/test_sitl_sub.yml | 2 ++ .github/workflows/test_sitl_tracker.yml | 2 ++ .github/workflows/test_size.yml | 2 ++ .github/workflows/test_unit_tests.yml | 1 + 14 files changed, 24 insertions(+) diff --git a/.github/workflows/test_chibios.yml b/.github/workflows/test_chibios.yml index ad99090afa18a..bf0a4f78dc952 100644 --- a/.github/workflows/test_chibios.yml +++ b/.github/workflows/test_chibios.yml @@ -85,6 +85,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "chibios-clang" ]]; then export CC=clang export CXX=clang++ diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index a54544a973e69..49186818b0eab 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -70,6 +70,7 @@ jobs: TERM: xterm shell: 'script -q -e -c "bash {0}"' run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" python -m pip install --progress-bar off --user mavproxy python -m pip uninstall -y pymavlink diff --git a/.github/workflows/test_environment.yml b/.github/workflows/test_environment.yml index 8d7ba5c87df40..3d029782a6fb7 100644 --- a/.github/workflows/test_environment.yml +++ b/.github/workflows/test_environment.yml @@ -102,6 +102,7 @@ jobs: TZ: Europe/Paris shell: 'script -q -e -c "bash {0}"' run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} source ~/.bashrc git config --global --add safe.directory /__w/ardupilot/ardupilot ./waf configure @@ -114,6 +115,7 @@ jobs: TZ: Europe/Paris shell: 'script -q -e -c "bash {0}"' run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} source ~/.bashrc case ${{matrix.os}} in *"archlinux"*) diff --git a/.github/workflows/test_linux_sbc.yml b/.github/workflows/test_linux_sbc.yml index f65e4a1690121..0cd0ea30fb402 100644 --- a/.github/workflows/test_linux_sbc.yml +++ b/.github/workflows/test_linux_sbc.yml @@ -66,6 +66,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ diff --git a/.github/workflows/test_replay.yml b/.github/workflows/test_replay.yml index ec8c2b07d8e5d..fb3d3b2d761e2 100644 --- a/.github/workflows/test_replay.yml +++ b/.github/workflows/test_replay.yml @@ -65,6 +65,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ diff --git a/.github/workflows/test_scripting_docs.yml b/.github/workflows/test_scripting_docs.yml index a281bc459ed4a..4877aaa4db19d 100644 --- a/.github/workflows/test_scripting_docs.yml +++ b/.github/workflows/test_scripting_docs.yml @@ -35,6 +35,7 @@ jobs: - name: build sitl # we don't really need to build the full code, just trigger docs re-gen with --scripting-docs, timeout after 10 seconds shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" ./waf configure --board sitl timeout 10 ./waf antennatracker --scripting-docs || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi diff --git a/.github/workflows/test_sitl_copter.yml b/.github/workflows/test_sitl_copter.yml index 840955507d257..fe84a43855c30 100644 --- a/.github/workflows/test_sitl_copter.yml +++ b/.github/workflows/test_sitl_copter.yml @@ -57,6 +57,7 @@ jobs: - name: build copter ${{ matrix.toolchain }} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ @@ -111,6 +112,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh @@ -163,6 +165,7 @@ jobs: - name: build heli shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" ./waf configure --board sitl ./waf build --target bin/arducopter-heli @@ -205,6 +208,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_periph.yml b/.github/workflows/test_sitl_periph.yml index 3b50f13ac9e15..247fa4489b456 100644 --- a/.github/workflows/test_sitl_periph.yml +++ b/.github/workflows/test_sitl_periph.yml @@ -63,6 +63,7 @@ jobs: - name: build sitl_periph_gps shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" ./waf configure --board sitl_periph_gps ./waf build --target bin/AP_Periph @@ -121,6 +122,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} kernel_ver=`uname -r` if [ "$kernel_ver" = "5.4.0-1032-azure" ] || [ "$kernel_ver" = "5.11.4-051104-generic" ]; then echo "Unsupported Kernel $kernel_ver" && exit 0; fi; PATH="/github/home/.local/bin:$PATH" diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml index 53162281ba265..aa544ffabfa61 100644 --- a/.github/workflows/test_sitl_plane.yml +++ b/.github/workflows/test_sitl_plane.yml @@ -57,6 +57,7 @@ jobs: - name: build plane ${{ matrix.toolchain }} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ @@ -106,6 +107,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_rover.yml b/.github/workflows/test_sitl_rover.yml index 9bfe4ac5565d0..1385944fda470 100644 --- a/.github/workflows/test_sitl_rover.yml +++ b/.github/workflows/test_sitl_rover.yml @@ -57,6 +57,7 @@ jobs: - name: build rover ${{ matrix.toolchain }} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ @@ -107,6 +108,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_sub.yml b/.github/workflows/test_sitl_sub.yml index 99fafc1dc1593..397c51f5b7b4a 100644 --- a/.github/workflows/test_sitl_sub.yml +++ b/.github/workflows/test_sitl_sub.yml @@ -57,6 +57,7 @@ jobs: - name: build sub ${{ matrix.toolchain }} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ @@ -105,6 +106,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_tracker.yml b/.github/workflows/test_sitl_tracker.yml index 3956bf5058bb4..3fe2cfa1b904a 100644 --- a/.github/workflows/test_sitl_tracker.yml +++ b/.github/workflows/test_sitl_tracker.yml @@ -57,6 +57,7 @@ jobs: - name: build tracker ${{ matrix.toolchain }} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++ @@ -105,6 +106,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_size.yml b/.github/workflows/test_size.yml index cbff6bf27f178..70f6d4b94b5fd 100644 --- a/.github/workflows/test_size.yml +++ b/.github/workflows/test_size.yml @@ -57,6 +57,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" cd base_branch ./waf configure --board ${{matrix.config}} @@ -102,6 +103,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: bash run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} PATH="/github/home/.local/bin:$PATH" cd pr/ git config user.email "ardupilot-ci@ardupilot.org" diff --git a/.github/workflows/test_unit_tests.yml b/.github/workflows/test_unit_tests.yml index 6a6ce4efd4245..b6aee7cf1a675 100644 --- a/.github/workflows/test_unit_tests.yml +++ b/.github/workflows/test_unit_tests.yml @@ -52,6 +52,7 @@ jobs: CI_BUILD_TARGET: ${{matrix.config}} shell: 'script -q -e -c "bash {0}"' run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ ${{ matrix.toolchain }} == "clang" ]]; then export CC=clang export CXX=clang++