Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Arm64 build process for ci #1887

Merged
merged 46 commits into from Mar 8, 2019

Conversation

3 participants
@afinch7
Copy link
Contributor

commented Mar 5, 2019

Work in progress build process for arm64 builds in CI.

afinch7 added some commits Mar 5, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch from 9b248d0 to adbf4f8 Mar 5, 2019

afinch7 added some commits Mar 5, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch from 40e4dc8 to eb861f5 Mar 5, 2019

afinch7 added some commits Mar 5, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch 4 times, most recently from 053c66e to 7e550fa Mar 6, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch 2 times, most recently from e59e282 to b40ba3b Mar 6, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch from b40ba3b to 6f3d673 Mar 6, 2019

@afinch7 afinch7 referenced this pull request Mar 6, 2019

Closed

Building for arm64 #1846

@afinch7

This comment has been minimized.

Copy link
Contributor Author

commented Mar 6, 2019

This should work given that it doesn't time out. From testing the cargo build could easily take 30 minutes.

afinch7 added some commits Mar 7, 2019

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch from ec13600 to cf7388a Mar 7, 2019

afinch7 added some commits Mar 7, 2019

fmt
@afinch7

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

Ready for review. I will be unavailable this weekend, so I would recommend holding off merging until monday.

@ry
Copy link
Collaborator

left a comment

LGTM modulo long lines.

I will wait for @piscisaureus's approval before merging.

Show resolved Hide resolved .travis.yml Outdated
Show resolved Hide resolved .travis.yml

@afinch7 afinch7 changed the title [WIP]: Arm64 build process for ci Arm64 build process for ci Mar 8, 2019

Show resolved Hide resolved build.rs Outdated
build.rs Outdated
@@ -20,8 +20,22 @@ fn main() {
env::var("PROFILE").unwrap()
};

// Equivilent to target arch != host arch
let is_cross_compile = env::var("CARGO_CFG_TARGET_ARCH").unwrap().as_str()

This comment has been minimized.

Copy link
@piscisaureus

piscisaureus Mar 8, 2019

Collaborator

I would suggest let is_cross_compile = env::var("TARGET") != env::var("HOST");

This comment has been minimized.

Copy link
@afinch7

afinch7 Mar 8, 2019

Author Contributor

This might not have the intended effect. Some targets might vary from host, but will still be compatible with the host. I.E. x86_64-unknown-linux-musl

This comment has been minimized.

Copy link
@afinch7

afinch7 Mar 8, 2019

Author Contributor

is_cross_compile might be a bad name for this one.

Show resolved Hide resolved tools/ts_library_builder/build_library.ts Outdated
Show resolved Hide resolved tools/ts_library_builder/build_library.ts Outdated
Show resolved Hide resolved tools/ts_library_builder/ast_util.ts Outdated
@afinch7
Copy link
Contributor Author

left a comment

Did a full merge from master, fixed the formatting on .travis.yml, and made some changes to build.rs.

Show resolved Hide resolved tools/ts_library_builder/build_library.ts Outdated
Show resolved Hide resolved .travis.yml
Show resolved Hide resolved .travis.yml Outdated
Show resolved Hide resolved .travis.yml Outdated

@afinch7 afinch7 force-pushed the afinch7:arm-builds-ci branch from c0afaab to 136040d Mar 8, 2019

afinch7 added some commits Mar 8, 2019

build.rs Outdated
.collect::<Vec<&str>>()[0];

// If we are not using a standard target
let is_nonstandard_target =

This comment has been minimized.

Copy link
@ry

ry Mar 8, 2019

Collaborator

Can you list some example strings here that we might see for "HOST" and "TARGET" ? What is an example of a non-standard target? it's not immediately clear to me.

This comment has been minimized.

Copy link
@afinch7

afinch7 Mar 8, 2019

Author Contributor

HOST, TARGET, and CARGO_CFG_TARGET_ARCH are standard variables provided by cargo and documented here https://doc.rust-lang.org/cargo/reference/environment-variables.html
I might rename this is_not_default_target. The output of rustup target list will tell you what is default for your install of cargo/rustup.

This comment has been minimized.

Copy link
@afinch7

afinch7 Mar 8, 2019

Author Contributor

Actually I like is_default_target better.

This comment has been minimized.

Copy link
@ry

ry Mar 8, 2019

Collaborator

Sure - but some concrete examples are always very valuable when debugging these things - I guess host is "linux-x64" ? or is it "linux-misc-x64"? No one remembers and if it's not listed it will require me to println it later.

This comment has been minimized.

Copy link
@afinch7

afinch7 Mar 8, 2019

Author Contributor

I added some more detailed comments
Including how to check your default target: rustup target list

This comment has been minimized.

Copy link
@ry

ry Mar 8, 2019

Collaborator

It would just be nice to know what these values are concretely on your machine (since this will be their values in 90% of cross-compile cases)

@@ -20,8 +20,27 @@ fn main() {
env::var("PROFILE").unwrap()
};

// Equivalent to target arch != host arch
let is_different_target_arch =

This comment has been minimized.

Copy link
@ry

ry Mar 8, 2019

Collaborator

Would be useful to list some examples of what CARGO_CFG_TARGET_ARCH and HOST looks like.

@ry

ry approved these changes Mar 8, 2019

Copy link
Collaborator

left a comment

LGTM - thank you so much for doing this. I know how annoying it can be waiting for CI over and over. This is a huge contribution : )

@ry ry merged commit 8c7a12d into denoland:master Mar 8, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.