diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index a41542064..b14c2125a 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -42,19 +42,14 @@ jobs: - name: "Checking out repository" env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BRANCH_NAME: ${{ github.ref }} REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} run: | - # TODO : investigate warning: --depth is ignored in local clones; use file:// instead - git \ - -c submodule."third_party/torch-mlir".update=none \ - -c submodule."third_party/stablehlo".update=none \ - -c submodule."src/runtime_src/core/common/aiebu".update=none \ - clone \ - --recursive \ - --shallow-submodules \ - --depth 1 \ - -b $BRANCH_NAME $REPO_ADDRESS . + git init + git remote add origin $REPO_ADDRESS + git -c protocol.version=2 fetch --depth 1 origin $BRANCH_NAME + git reset --hard FETCH_HEAD + git -c submodule."third_party/torch-mlir".update=none -c submodule."third_party/stablehlo".update=none -c submodule."src/runtime_src/core/common/aiebu".update=none submodule update --init --recursive --depth 1 --single-branch -j 10 - name: Install deps run: | diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 3d7b53843..92f435643 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -46,18 +46,14 @@ jobs: - name: "Checking out repository" env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BRANCH_NAME: ${{ github.ref }} REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} run: | - git \ - -c submodule."third_party/torch-mlir".update=none \ - -c submodule."third_party/stablehlo".update=none \ - -c submodule."src/runtime_src/core/common/aiebu".update=none \ - clone \ - --recursive \ - --shallow-submodules \ - --depth 1 \ - -b $BRANCH_NAME $REPO_ADDRESS . + git init + git remote add origin $REPO_ADDRESS + git -c protocol.version=2 fetch --depth 1 origin $BRANCH_NAME + git reset --hard FETCH_HEAD + git -c submodule."third_party/torch-mlir".update=none -c submodule."third_party/stablehlo".update=none -c submodule."src/runtime_src/core/common/aiebu".update=none submodule update --init --recursive --depth 1 --single-branch -j 10 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index c65ff97b4..98c61adc4 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -49,18 +49,14 @@ jobs: - name: "Checking out repository" env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BRANCH_NAME: ${{ github.ref }} REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} run: | - git \ - -c submodule."third_party/torch-mlir".update=none \ - -c submodule."third_party/stablehlo".update=none \ - -c submodule."src/runtime_src/core/common/aiebu".update=none \ - clone \ - --recursive \ - --shallow-submodules \ - --depth 1 \ - -b $BRANCH_NAME $REPO_ADDRESS . + git init + git remote add origin $REPO_ADDRESS + git -c protocol.version=2 fetch --depth 1 origin $BRANCH_NAME + git reset --hard FETCH_HEAD + git -c submodule."third_party/torch-mlir".update=none -c submodule."third_party/stablehlo".update=none -c submodule."src/runtime_src/core/common/aiebu".update=none submodule update --init --recursive --depth 1 --single-branch -j 10 - name: Setup Cpp uses: aminya/setup-cpp@v1