Skip to content

Link to crates-build-env instead of asking people to make an issue #504

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

Closed
jyn514 opened this issue Dec 2, 2019 · 6 comments
Closed

Link to crates-build-env instead of asking people to make an issue #504

jyn514 opened this issue Dec 2, 2019 · 6 comments

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 2, 2019

From Discord:

re build failures due to dependencies: I think I'm going to write up a wiki page showing how to make a PR to https://github.com/rust-lang/crates-build-env. Hopefully we can then link to that instead of telling people to make an issue and it will be less work for everyone

Going to start with #483 just so I know how to make a PR, then I'll add it to the wiki

@jyn514
Copy link
Member Author

jyn514 commented Dec 2, 2019

Hmm ... for this to work there needs to be a way to test changes to the rustops/crates-build-env container locally. Maybe add a flag to cratesfyi build crate that specifies a custom docker container? That would also help with #443 for enterprise use.

@jyn514
Copy link
Member Author

jyn514 commented Dec 2, 2019

Maybe we don't even have to go that far ... it's running a docker command, we could have people run that docker command locally. Here's the one for arpack-ng-sys (on multiple lines for clarity):

"docker" "create" \
    "-v" "/home/cratesfyi/workspace/builds/arpack-ng-sys-0.1.0/target:/opt/rustwide/target:rw,Z" \
    "-v" "/home/cratesfyi/workspace/builds/arpack-ng-sys-0.1.0/source:/opt/rustwide/workdir:ro,Z" \
    "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" \
    "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" \
    "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=1001" \
    "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "RUSTFLAGS=" \
    "-e" 'RUSTDOCFLAGS=-Z unstable-options 
        --resource-suffix -20191116-1.41.0-nightly-5c5b8afd8 
        --static-root-path / --disable-per-crate-search 
        --extern-html-root-url bindgen=https://docs.rs/bindgen/0.52.0 
       --extern-html-root-url cmake=https://docs.rs/cmake/0.1.42' \
    "-e" "CARGO_HOME=/opt/rustwide/cargo-home" \
    "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" \
    "-w" "/opt/rustwide/workdir" "-m" "3221225472" "--network" "none" \
    "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" \
        "+nightly-2019-11-17" "doc" "--lib" "--no-deps" "--target" "x86_64-unknown-linux-gnu"

The only bits that need to change are the mounted directories:

  • /home/cratesfyi/workspace/builds/arpack-ng-sys-0.1.0/target
  • /home/cratesfyi/workspace/builds/arpack-ng-sys-0.1.0/source
  • /home/cratesfyi/workspace/cargo-home
  • /home/cratesfyi/workspace/rustup-home
    and the container name: rustops/crates-build-env

@jyn514
Copy link
Member Author

jyn514 commented Dec 2, 2019

Ok cool I have a demo of this working locally: https://gist.github.com/jyn514/1feecb76d8267718c8b3437244cc5627

@jyn514 jyn514 changed the title Link to crates-build-env instead of asking people to make a PR Link to crates-build-env instead of asking people to make an issue Dec 2, 2019
@jyn514
Copy link
Member Author

jyn514 commented Dec 3, 2019

@jyn514
Copy link
Member Author

jyn514 commented Dec 3, 2019

@jyn514
Copy link
Member Author

jyn514 commented Dec 10, 2019

Added in #507

@jyn514 jyn514 closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant