Skip to content

Commit

Permalink
fix: Workaround for long paths in MSBuild (#83)
Browse files Browse the repository at this point in the history
* fix: Clone repo into cwd in build-crates-standalone

* fix: Remove enforce-linking-issues workflow
  • Loading branch information
fuzzypixelz authored Apr 9, 2024
1 parent 9ef50b5 commit fa1adef
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 15 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/enforce-linking-issues.yml

This file was deleted.

10 changes: 9 additions & 1 deletion dist/build-crates-standalone-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128497,7 +128497,15 @@ async function main(input) {
try {
await installBinaryCached("cross");
const repo = input.repo.split("/")[1];
cloneFromGitHub(input.repo, { branch: input.branch, token: input.githubToken });
cloneFromGitHub(input.repo, {
branch: input.branch,
token: input.githubToken,
// NOTE(fuzzypixelz): We clone the repository into the current directory
// to avoid long paths on Windows, where MSBuild fails on the windows-2019
// GitHub-hosted runner because it doesn't support paths longer than 260
// characters.
path: process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : undefined,
});
input.version ??= describe(repo);
input.target ??= hostTarget();
await build(repo, input.target);
Expand Down
10 changes: 9 additions & 1 deletion dist/publish-crates-eclipse-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128517,7 +128517,15 @@ async function main(input) {
try {
await cargo.installBinaryCached("cross");
const repo = input.repo.split("/")[1];
git.cloneFromGitHub(input.repo, { branch: input.branch, token: input.githubToken });
git.cloneFromGitHub(input.repo, {
branch: input.branch,
token: input.githubToken,
// NOTE(fuzzypixelz): We clone the repository into the current directory
// to avoid long paths on Windows, where MSBuild fails on the windows-2019
// GitHub-hosted runner because it doesn't support paths longer than 260
// characters.
path: process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : undefined,
});
input.version ??= git.describe(repo);
input.target ??= cargo.hostTarget();
await cargo.build(repo, input.target);
Expand Down
10 changes: 9 additions & 1 deletion dist/publish-crates-github-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128574,7 +128574,15 @@ async function build_crates_standalone_main(input) {
try {
await cargo.installBinaryCached("cross");
const repo = input.repo.split("/")[1];
git.cloneFromGitHub(input.repo, { branch: input.branch, token: input.githubToken });
git.cloneFromGitHub(input.repo, {
branch: input.branch,
token: input.githubToken,
// NOTE(fuzzypixelz): We clone the repository into the current directory
// to avoid long paths on Windows, where MSBuild fails on the windows-2019
// GitHub-hosted runner because it doesn't support paths longer than 260
// characters.
path: process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : undefined,
});
input.version ??= git.describe(repo);
input.target ??= cargo.hostTarget();
await cargo.build(repo, input.target);
Expand Down
10 changes: 9 additions & 1 deletion dist/publish-crates-homebrew-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128519,7 +128519,15 @@ async function main(input) {
try {
await cargo.installBinaryCached("cross");
const repo = input.repo.split("/")[1];
git.cloneFromGitHub(input.repo, { branch: input.branch, token: input.githubToken });
git.cloneFromGitHub(input.repo, {
branch: input.branch,
token: input.githubToken,
// NOTE(fuzzypixelz): We clone the repository into the current directory
// to avoid long paths on Windows, where MSBuild fails on the windows-2019
// GitHub-hosted runner because it doesn't support paths longer than 260
// characters.
path: process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : undefined,
});
input.version ??= git.describe(repo);
input.target ??= cargo.hostTarget();
await cargo.build(repo, input.target);
Expand Down
10 changes: 9 additions & 1 deletion src/build-crates-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ export async function main(input: Input) {

const repo = input.repo.split("/")[1];

git.cloneFromGitHub(input.repo, { branch: input.branch, token: input.githubToken });
git.cloneFromGitHub(input.repo, {
branch: input.branch,
token: input.githubToken,
// NOTE(fuzzypixelz): We clone the repository into the current directory
// to avoid long paths on Windows, where MSBuild fails on the windows-2019
// GitHub-hosted runner because it doesn't support paths longer than 260
// characters.
path: process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : undefined,
});

input.version ??= git.describe(repo);
input.target ??= cargo.hostTarget();
Expand Down

0 comments on commit fa1adef

Please sign in to comment.