From f8cd450ac125b802c4383034e98206791dbdd275 Mon Sep 17 00:00:00 2001 From: Saul Gutierrez Date: Tue, 24 Jan 2023 18:07:50 -0800 Subject: [PATCH] ci: fix Windows OS CI due to path length (#500) Summary: [sl] ci: fix Windows OS CI due to path length Currently our OSS CI on Windows is failing due to some paths being too long (e.g., `C:/Users/runneradmin/.cargo/git/checkouts/fbthrift-abf000ee5c7fcc50/c757ec4/thrift/website/src/json/ref/cpp/f/struct/special/structapache_1_1thrift_1_1op_1_1detail_1_1AnyOp_3_01type_1_1cpp__type_3_01T_00_01type_1_1map_3_01KTag_00_01VTag_01_4_01_4_01_4/assign.json`) Since the length of that path is just above the Windows max length (263 vs. 260). This diff tries to alleviate that by setting the `core.longpaths` option for the git system config. Pull Request resolved: https://github.com/facebook/sapling/pull/500 Test Plan: Ran GitHub actions on a personal fork of the repo. --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/500). * __->__ https://github.com/facebook/sapling/issues/500 Reviewed By: bolinfest Differential Revision: D42727420 Pulled By: sggutier fbshipit-source-id: 3cf908f8e9537f20d796dcaa97292512f1172919 --- .github/workflows/sapling-cli-windows-amd64-release.yml | 2 ++ ci/gen_workflows.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/sapling-cli-windows-amd64-release.yml b/.github/workflows/sapling-cli-windows-amd64-release.yml index 4934203f8e0da..9dcc8571d1a85 100644 --- a/.github/workflows/sapling-cli-windows-amd64-release.yml +++ b/.github/workflows/sapling-cli-windows-amd64-release.yml @@ -15,6 +15,8 @@ jobs: run: git config --global --add safe.directory "$PWD" - name: rustup run: rustup default stable + - name: Support longpaths + run: git config --system core.longpaths true - name: openssl run: vcpkg install openssl:x64-windows-static-md - name: integrate vcpkg diff --git a/ci/gen_workflows.py b/ci/gen_workflows.py index 7724715ce958c..fa686dcbc69b1 100755 --- a/ci/gen_workflows.py +++ b/ci/gen_workflows.py @@ -297,6 +297,10 @@ def gen_windows_release(self) -> str: {"name": "Checkout Code", "uses": "actions/checkout@v3"}, grant_repo_access(), {"name": "rustup", "run": "rustup default stable"}, + { + "name": "Support longpaths", + "run": "git config --system core.longpaths true", + }, # The "x64-windows-static-md" triple is what the Rust openssl # crate expects on Windows when it goes looking for the vcpkg # install.