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

travis: Fuchsia builder #39918

Merged
merged 1 commit into from
Mar 11, 2017
Merged

travis: Fuchsia builder #39918

merged 1 commit into from
Mar 11, 2017

Conversation

petrhosek
Copy link
Contributor

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@petrhosek petrhosek force-pushed the fuchsia-ci branch 2 times, most recently from bcf6476 to 2dc7528 Compare February 18, 2017 00:13

# Download sources
host=https://fuchsia.googlesource.com
git clone --depth 1 $host/magenta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tend to prefer to pin to specific commits where possible to avoid an upstream commit accidentally breaking our build, could these clones all be followed with a cd $dir && git reset --hard $rev?

It should be fine to do a full clone, the Docker container is cached so we won't pay that build time on each build.

#!/bin/sh
${tool} --target=${arch}-unknown-fuchsia --sysroot=/usr/local/${arch}-unknown-fuchsia "\$@"
EOF
chmod +x /usr/local/bin/${arch}-unknown-fuchsia-${tool}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this but if you'd prefer to just export AR_$target=llvm-ar that's also fine by me

.travis.yml Outdated
@@ -19,6 +19,7 @@ matrix:
- env: IMAGE=dist-arm-linux DEPLOY=1
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
- env: IMAGE=dist-freebsd DEPLOY=1
- env: IMAGE=dist-fuchsia DEPLOY=1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we've actually got another similar container, cross above, which just builds a couple of targets that we release. Could you fold this container into that one and just add the targets there?

That container doesn't take too long to build so we should definitely be able to get a full build in under three hours, and that way we don't have to burn an extra slot on a new travis builder :)

@alexcrichton
Copy link
Member

Looks great, thanks for the PR!

As one final piece, if you'd like, you can edit TARGETS in build-manifest with these Fuchsia targets. That way as soon as this merges and a new nightly happens everyone will be able to rustup target add Fuchsia

@alexcrichton
Copy link
Member

Oh and one final thing. Travis limits our logs to 4MB maximum and it looks like 2 builds of clang and one build of LLVM may push us over that limit. We have a script floating around though to deal with this.

When folding this into the cross container, could you take a similar approach as the dist-x86-linux container with a shared.sh that contains this function which is copied in early and sourced at the start of scripts. Should be at least a little deduplication.

We'll worry later about deduplication across containers :)

@petrhosek
Copy link
Contributor Author

petrhosek commented Feb 18, 2017

All done, please take a look. It takes about 38 minutes to build on my machine, so hopefully it'll be under three hours on the Travis builder.

libedit-dev \
libncurses5-dev

RUN curl -L https://cmake.org/files/v3.8/cmake-3.8.0-rc1-Linux-x86_64.tar.gz | \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you throw in a small comment to why a newer version of CMake is needed?

Also if switching to ubuntu 16.10 pulls in a new enough version it'd be ok to update to that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake 3.8.0 is (going to) be the first version with Fuchsia support, RC1 was only released two weeks ago so I don't think it's available in any Linux distribution just yet. Do you want me to add the comment in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure yeah, that'd be great (just ping me and I'll re-r+)

fetch() {
mkdir -p $2
pushd $2 > /dev/null
curl -sL $1/+archive/$3.tar.gz | tar xzf -
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alexcrichton
Copy link
Member

@bors: r+

Looks great! We can always throw in the comments later :)

@bors
Copy link
Contributor

bors commented Feb 21, 2017

📌 Commit decebdc has been approved by alexcrichton

@petrhosek
Copy link
Contributor Author

Commend added.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 21, 2017

📌 Commit 18b0f88 has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
travis: Fuchsia builder

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
bors added a commit that referenced this pull request Feb 23, 2017
Rollup of 11 pull requests

- Successful merges: #39859, #39886, #39892, #39903, #39914, #39918, #39988, #40010, #40027, #40030, #40035
- Failed merges:
eddyb added a commit to eddyb/rust that referenced this pull request Feb 25, 2017
travis: Fuchsia builder

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
@bors
Copy link
Contributor

bors commented Feb 25, 2017

⌛ Testing commit 18b0f88 with merge 7ae0561...

@bors
Copy link
Contributor

bors commented Feb 25, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@petrhosek is that maybe a typo'd rev for compiler-rt?

@petrhosek petrhosek force-pushed the fuchsia-ci branch 2 times, most recently from 67f934e to a5eea01 Compare March 5, 2017 01:29
@petrhosek
Copy link
Contributor Author

I split the Fuchsia toolchain into a separate builder again, can you take a look again and retry if it looks fine to you?

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 6, 2017

📌 Commit a5eea01 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Mar 9, 2017

🔒 Merge conflict

@frewsxcv
Copy link
Member

frewsxcv commented Mar 9, 2017

@bors retry

@bors
Copy link
Contributor

bors commented Mar 9, 2017

🔒 Merge conflict

@eddyb
Copy link
Member

eddyb commented Mar 9, 2017

@frewsxcv We're waiting for @alexcrichton to wake up and unbreak @bors, retrying won't help 😞.

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 9, 2017

🔒 Merge conflict

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 9, 2017

☔ The latest upstream changes (presumably #40382) made this pull request unmergeable. Please resolve the merge conflicts.

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 10, 2017

📌 Commit 9a84611 has been approved by alexcrichton

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2017
travis: Fuchsia builder

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2017
travis: Fuchsia builder

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
@bors bors merged commit 9a84611 into rust-lang:master Mar 11, 2017
@workingjubilee workingjubilee added the O-fuchsia Operating system: Fuchsia label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-fuchsia Operating system: Fuchsia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants