mirror of https://github.com/Y2Z/monolith
add Dockerfile
parent
1c1f2c7128
commit
c16e80f507
@ -1,30 +1,37 @@
|
|||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
cache: cargo
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
- windows
|
- windows
|
||||||
|
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cargo build --all --locked --verbose
|
- cargo build --all --locked --verbose
|
||||||
- cargo test --all --locked --verbose
|
- cargo test --all --locked --verbose
|
||||||
- |
|
- |
|
||||||
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
|
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
after_success: |
|
||||||
|
if [ "${TRAVIS_OS_NAME}" == linux ] && [ "${TRAVIS_RUST_VERSION}" == stable ]; then
|
||||||
|
docker build -t monolith .
|
||||||
|
docker run monolith monolith -V
|
||||||
|
fi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
FROM rust
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src/
|
||||||
|
RUN curl -s https://api.github.com/repos/y2z/monolith/releases/latest \
|
||||||
|
| grep "tarball_url.*\"," \
|
||||||
|
| cut -d '"' -f 4 \
|
||||||
|
| wget -qi - -O monolith.tar.gz
|
||||||
|
|
||||||
|
RUN tar xfz monolith.tar.gz \
|
||||||
|
&& mv Y2Z-monolith-* monolith \
|
||||||
|
&& rm monolith.tar.gz
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src/monolith
|
||||||
|
RUN ls -a
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
CMD ["/usr/local/cargo/bin/monolith"]
|
Loading…
Reference in New Issue