Skip to content
Myr

ci: switch build to GitHub Actions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrew Gallant · committed by Andrew Gallant · parent f314b0d · Browse files · 15 files+283 added−100 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

15 files+283 added−100 removed

  • other:+283 added−100 removed

15 files+283 added−100 removed

modified:.github/workflows/ci.yml+187 added-96 removed
added:ci/docker/arm-unknown-linux-gnueabihf/build+5 added
1#!/bin/sh23mkdir -p stage4cp ../../ubuntu-install-packages ./stage/5docker build -t burntsushi/cross:arm-unknown-linux-gnueabihf .
added:ci/docker/arm-unknown-linux-gnueabihf/Dockerfile+4 added
1FROM rustembedded/cross:arm-unknown-linux-gnueabihf23COPY stage/ubuntu-install-packages /4RUN /ubuntu-install-packages
added:ci/docker/i686-unknown-linux-gnu/build+5 added
1#!/bin/sh23mkdir -p stage4cp ../../ubuntu-install-packages ./stage/5docker build -t burntsushi/cross:i686-unknown-linux-gnu .
added:ci/docker/i686-unknown-linux-gnu/Dockerfile+4 added
1FROM rustembedded/cross:i686-unknown-linux-gnu23COPY stage/ubuntu-install-packages /4RUN /ubuntu-install-packages
added:ci/docker/mips64-unknown-linux-gnuabi64/build+5 added
1#!/bin/sh23mkdir -p stage4cp ../../ubuntu-install-packages ./stage/5docker build -t burntsushi/cross:mips64-unknown-linux-gnuabi64 .
added:ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile+4 added
1FROM rustembedded/cross:mips64-unknown-linux-gnuabi6423COPY stage/ubuntu-install-packages /4RUN /ubuntu-install-packages
added:ci/docker/x86_64-unknown-linux-musl/build+5 added
1#!/bin/sh23mkdir -p stage4cp ../../ubuntu-install-packages ./stage/5docker build -t burntsushi/cross:x86_64-unknown-linux-musl .
modified:ci/docker/x86_64-unknown-linux-musl/Dockerfile+2 added-3 removed
1FROM rustembedded/cross:x86_64-unknown-linux-musl23RUN apt-get update \4 && apt-get install -y --no-install-recommends \5 libxslt1-dev asciidoc docbook-xsl xsltproc libxml2-utils3COPY stage/ubuntu-install-packages /4RUN /ubuntu-install-packages
added:ci/docker/README.md+24 added
1These are Docker images used for cross compilation in CI builds (or locally)2via the [Cross](https://github.com/rust-embedded/cross) tool.34The Cross tool actually provides its own Docker images, and all Docker images5in this directory are derived from one of them. We provide our own in order6to customize the environment. For example, we need to install some things like7`asciidoc` in order to generate man pages. We also install compression tools8like `xz` so that tests for the `-z/--search-zip` flag are run.910If you make a change to a Docker image, then you can re-build it. `cd` into the11directory containing the `Dockerfile` and run:1213 $ cd x86_64-unknown-linux-musl14 $ ./build1516At this point, subsequent uses of `cross` will now use your built image since17Docker prefers local images over remote images. In order to make these changes18stick, they need to be pushed to Docker Hub:1920 $ docker push burntsushi/cross:x86_64-unknown-linux-musl2122Of course, only I (BurntSushi) can push to that location. To make `cross` use23a different location, then edit `Cross.toml` in the root of this repo to use24a different image name for the desired target.
added:ci/cargo-out-dir+19 added
1#!/bin/bash23# Finds Cargo's `OUT_DIR` directory from the most recent build.4#5# This requires one parameter corresponding to the target directory6# to search for the build output.78if [ $# != 1 ]; then9 echo "Usage: $(basename "$0") <target-dir>" >&210 exit 211fi1213# This works by finding the most recent stamp file, which is produced by14# every ripgrep build.15target_dir="$1"16find "$target_dir" -name ripgrep-stamp -print0 \17 | xargs -0 ls -t \18 | head -n1 \19 | xargs dirname
added:ci/macos-install-packages+3 added
1#!/bin/sh23brew install asciidoc docbook-xsl
modified:ci/test_complete.sh+1 added-1 removed
16 unmodified lines
17}1819main() {20 local diff21 local rg="${0:a:h}/../target/${TARGET:-}/release/rg"21 local rg="${0:a:h}/../${TARGET_DIR:-target}/release/rg"22 local _rg="${0:a:h}/../complete/_rg"23 local -a help_args comp_args2425 [[ -e $rg ]] || rg=${rg/%\/release\/rg/\/debug\/rg}
72 unmodified lines
added:ci/ubuntu-install-packages+6 added
1#!/bin/sh23sudo apt-get update4sudo apt-get install -y --no-install-recommends \5 libxslt1-dev asciidoc docbook-xsl xsltproc libxml2-utils \6 zsh xz-utils liblz4-tool musl-tools
modified:Cross.toml+9 added
1[target.x86_64-unknown-linux-musl]2image = "burntsushi/cross:x86_64-unknown-linux-musl"34[target.i686-unknown-linux-gnu]5image = "burntsushi/cross:i686-unknown-linux-gnu"67[target.mips64-unknown-linux-gnuabi64]8image = "burntsushi/cross:mips64-unknown-linux-gnuabi64"910[target.arm-unknown-linux-gnueabihf]11image = "burntsushi/cross:arm-unknown-linux-gnueabihf"