diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 118f48a702..8ece30c83b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,11 +16,8 @@ jobs: fail-fast: false matrix: # macos-13 is x86; macos-14 is ARM - os: [ubuntu-latest, macos-13, macos-14, windows-latest] + os: [windows-latest] cargo_flags: [""] - include: - - os: ubuntu-latest - cargo_flags: "--all-features" runs-on: ${{ matrix.os }} # TODO FIXME (aseipp): keep the timeout limit to ~15 minutes. this is long @@ -38,32 +35,6 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - # The default version of gpg installed on the runners is a version baked in with git - # which only contains the components needed by git and doesn't work for our test cases. - # - # This installs the latest gpg4win version, which is a variation of GnuPG built for - # Windows. - # - # There is some issue with windows PATH max length which is what all the PATH wrangling - # below is for. Please see the below link for where this fix was derived from: - # https://github.com/orgs/community/discussions/24933 - - name: Setup GnuPG [windows] - if: ${{ matrix.os == 'windows-latest' }} - run: | - $env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin" - [Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine") - choco install --yes gpg4win - echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH - - # The default version of openssh on windows server is quite old (8.1) and doesn't have - # all the necessary signing/verification commands available (such as -Y find-principals) - - name: Setup ssh-agent [windows] - if: ${{ matrix.os == 'windows-latest' }} - run: | - Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 - Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 - choco install openssh --pre - - name: Install Rust uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 with: @@ -71,7 +42,7 @@ jobs: - name: Build run: cargo build --workspace --all-targets --verbose ${{ matrix.cargo_flags }} - name: Test - run: cargo test --workspace --all-targets --verbose ${{ matrix.cargo_flags }} + run: cargo test working --workspace --all-targets --verbose ${{ matrix.cargo_flags }} --no-fail-fast -- --show-output env: RUST_BACKTRACE: 1 diff --git a/Cargo.lock b/Cargo.lock index 7cba36cdfa..69bd34fef9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1890,6 +1890,7 @@ dependencies = [ "config", "criterion", "digest", + "dunce", "either", "esl01-renderdag", "futures 0.3.31", diff --git a/lib/Cargo.toml b/lib/Cargo.toml index b75e3bf49b..07a6d3c783 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -42,6 +42,7 @@ chrono-english = { workspace = true } clru = { workspace = true } config = { workspace = true } digest = { workspace = true } +dunce = { workspace = true } either = { workspace = true } futures = { workspace = true } git2 = { workspace = true, optional = true } diff --git a/lib/tests/test_local_working_copy.rs b/lib/tests/test_local_working_copy.rs index e00f4eea6d..761a3ec0a8 100644 --- a/lib/tests/test_local_working_copy.rs +++ b/lib/tests/test_local_working_copy.rs @@ -1632,7 +1632,19 @@ fn test_check_out_reserved_file_path_vfat(file_path_str: &str) { let repo = &test_workspace.repo; let workspace_root = test_workspace.workspace.workspace_root().to_owned(); std::fs::create_dir(workspace_root.join(".git")).unwrap(); + assert!(workspace_root.join(".jj").exists()); let is_vfat = check_vfat(&workspace_root); + for i in 0..=9 { + for name in ["GIT", "JJ"] { + let path = workspace_root.join(format!("{name}~{i}")); + eprintln!("XXX {} {}", path.display(), path.exists()); + } + } + std::process::Command::new("cmd") + .args(["/c", "dir /x"]) + .current_dir(dunce::simplified(&workspace_root)) + .status() + .unwrap(); let file_path = RepoPath::from_internal_string(file_path_str); let disk_path = file_path.to_fs_path_unchecked(&workspace_root);