Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Always install target when cross compiling #17

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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