-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f314b0d
commit da3431b
Showing
15 changed files
with
283 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
[target.x86_64-unknown-linux-musl] | ||
image = "burntsushi/cross:x86_64-unknown-linux-musl" | ||
|
||
[target.i686-unknown-linux-gnu] | ||
image = "burntsushi/cross:i686-unknown-linux-gnu" | ||
|
||
[target.mips64-unknown-linux-gnuabi64] | ||
image = "burntsushi/cross:mips64-unknown-linux-gnuabi64" | ||
|
||
[target.arm-unknown-linux-gnueabihf] | ||
image = "burntsushi/cross:arm-unknown-linux-gnueabihf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Finds Cargo's `OUT_DIR` directory from the most recent build. | ||
# | ||
# This requires one parameter corresponding to the target directory | ||
# to search for the build output. | ||
|
||
if [ $# != 1 ]; then | ||
echo "Usage: $(basename "$0") <target-dir>" >&2 | ||
exit 2 | ||
fi | ||
|
||
# This works by finding the most recent stamp file, which is produced by | ||
# every ripgrep build. | ||
target_dir="$1" | ||
find "$target_dir" -name ripgrep-stamp -print0 \ | ||
| xargs -0 ls -t \ | ||
| head -n1 \ | ||
| xargs dirname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
These are Docker images used for cross compilation in CI builds (or locally) | ||
via the [Cross](https://github.com/rust-embedded/cross) tool. | ||
|
||
The Cross tool actually provides its own Docker images, and all Docker images | ||
in this directory are derived from one of them. We provide our own in order | ||
to customize the environment. For example, we need to install some things like | ||
`asciidoc` in order to generate man pages. We also install compression tools | ||
like `xz` so that tests for the `-z/--search-zip` flag are run. | ||
|
||
If you make a change to a Docker image, then you can re-build it. `cd` into the | ||
directory containing the `Dockerfile` and run: | ||
|
||
$ cd x86_64-unknown-linux-musl | ||
$ ./build | ||
|
||
At this point, subsequent uses of `cross` will now use your built image since | ||
Docker prefers local images over remote images. In order to make these changes | ||
stick, they need to be pushed to Docker Hub: | ||
|
||
$ docker push burntsushi/cross:x86_64-unknown-linux-musl | ||
|
||
Of course, only I (BurntSushi) can push to that location. To make `cross` use | ||
a different location, then edit `Cross.toml` in the root of this repo to use | ||
a different image name for the desired target. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM rustembedded/cross:arm-unknown-linux-gnueabihf | ||
|
||
COPY stage/ubuntu-install-packages / | ||
RUN /ubuntu-install-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p stage | ||
cp ../../ubuntu-install-packages ./stage/ | ||
docker build -t burntsushi/cross:arm-unknown-linux-gnueabihf . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM rustembedded/cross:i686-unknown-linux-gnu | ||
|
||
COPY stage/ubuntu-install-packages / | ||
RUN /ubuntu-install-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p stage | ||
cp ../../ubuntu-install-packages ./stage/ | ||
docker build -t burntsushi/cross:i686-unknown-linux-gnu . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM rustembedded/cross:mips64-unknown-linux-gnuabi64 | ||
|
||
COPY stage/ubuntu-install-packages / | ||
RUN /ubuntu-install-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p stage | ||
cp ../../ubuntu-install-packages ./stage/ | ||
docker build -t burntsushi/cross:mips64-unknown-linux-gnuabi64 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM rustembedded/cross:x86_64-unknown-linux-musl | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libxslt1-dev asciidoc docbook-xsl xsltproc libxml2-utils | ||
COPY stage/ubuntu-install-packages / | ||
RUN /ubuntu-install-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p stage | ||
cp ../../ubuntu-install-packages ./stage/ | ||
docker build -t burntsushi/cross:x86_64-unknown-linux-musl . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
brew install asciidoc docbook-xsl |
Oops, something went wrong.