From f73ddcad1b37b489a4f32f571deefc1ec933673b Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 23 May 2022 18:02:13 +0900 Subject: [PATCH] fix missing .git directory c.f https://github.com/actions/checkout/issues/335#issuecomment-931764246 --- .github/workflows/ci.yml | 12 +++++++++++- .travis.sh | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d93fd2c7..e12cc80a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,18 @@ jobs: - TEST : debian-unstable DOCKER_IMAGE : debian:unstable steps: + - name: Setup OS + run: | + sudo apt-get update -y + sudo apt-get upgrade -y + - name: Setup Git + run: | + sudo apt-get install -y git - name: Chcekout uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: recursive # python3_check - name: python3_check if: matrix.CHECK_PYTHON3_COMPILE == true @@ -62,4 +72,4 @@ jobs: - name: script if: matrix.DOCKER_IMAGE run: | - docker run --rm -i -v $PWD:$PWD -e "CI_SOURCE_PATH=$PWD" -e "HOME=$HOME" -e "ROS_DISTRO=${{ matrix.ROS_DISTRO }}" -e "OPENCV_VERSION=${{ matrix.OPENCV_VERSION }}" -e "TEST=${{ matrix.TEST }}" ${{ matrix.DOCKER_IMAGE }} sh -c "cd $PWD; /bin/bash .travis.sh" + docker run --rm -u $(id -u $USER) -i -v $PWD:$PWD -e "CI_SOURCE_PATH=$PWD" -e "HOME=$HOME" -e "ROS_DISTRO=${{ matrix.ROS_DISTRO }}" -e "OPENCV_VERSION=${{ matrix.OPENCV_VERSION }}" -e "TEST=${{ matrix.TEST }}" ${{ matrix.DOCKER_IMAGE }} sh -c "cd $PWD; /bin/bash .travis.sh" diff --git a/.travis.sh b/.travis.sh index 514464cf..c0f563c9 100644 --- a/.travis.sh +++ b/.travis.sh @@ -163,6 +163,11 @@ elif [ "$TEST" == "clang-tidy" ]; then run-clang-tidy -fix -p $(dirname $file) done travis_time_end + ls -al ~/catkin_ws + ls -al $CI_SOURCE_PATH/ + ls -al $CI_SOURCE_PATH/.git/ + cat $CI_SOURCE_PATH/.git/config + git -C $CI_SOURCE_PATH remote -v git -C $CI_SOURCE_PATH --no-pager diff git -C $CI_SOURCE_PATH diff-index --quiet HEAD -- .