Skip to content

Commit

Permalink
ci: fix Windows OS CI due to path length (#500)
Browse files Browse the repository at this point in the history
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: #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).
* __->__ #500

Reviewed By: bolinfest

Differential Revision: D42727420

Pulled By: sggutier

fbshipit-source-id: 3cf908f8e9537f20d796dcaa97292512f1172919
  • Loading branch information
sggutier authored and facebook-github-bot committed Jan 25, 2023
1 parent 9d42ccb commit f8cd450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/sapling-cli-windows-amd64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ci/gen_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f8cd450

Please sign in to comment.