Skip to content

Commit

Permalink
fix: Always install target when cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Mar 6, 2024
1 parent 4498067 commit 4bba1e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions dist/build-crates-artifacts-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128433,6 +128433,7 @@ async function main(input) {
command_sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`);
const crossContents = await promises_.readFile(external_path_.join(repo, "Cross.toml"), "utf-8");
const crossManifest = parse(crossContents);
command_sh(`rustup target add ${input.target}`);
if (input.target in crossManifest.target) {
command_sh(`cross build --release --bins --lib --target ${input.target}`, {
cwd: repo,
Expand Down
1 change: 1 addition & 0 deletions dist/build-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128430,6 +128430,7 @@ async function main(input) {
const repo = input.repo.split("/")[1];
const remote = `https://${input.githubToken}@github.com/${input.repo}.git`;
sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`);
sh(`rustup target add ${input.target}`);
sh(`cross build --release --bins --lib --target ${input.target}`, {
cwd: repo,
});
Expand Down
2 changes: 2 additions & 0 deletions src/build-crates-artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export async function main(input: Input) {
const crossContents = await fs.readFile(path.join(repo, "Cross.toml"), "utf-8");
const crossManifest = toml.parse(crossContents) as CrossManifest;

sh(`rustup target add ${input.target}`);

if (input.target in crossManifest.target) {
sh(`cross build --release --bins --lib --target ${input.target}`, {
cwd: repo,
Expand Down
2 changes: 2 additions & 0 deletions src/build-crates-debian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export async function main(input: Input) {
const remote = `https://${input.githubToken}@github.com/${input.repo}.git`;
sh(`git clone --recursive --branch ${input.branch} --single-branch ${remote}`);

sh(`rustup target add ${input.target}`);

sh(`cross build --release --bins --lib --target ${input.target}`, {
cwd: repo,
});
Expand Down

0 comments on commit 4bba1e6

Please sign in to comment.