Skip to content

Commit

Permalink
Add docker CI
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Mar 31, 2020
1 parent 3fbad5e commit 9687f43
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: rust
rust: stable
dist: trusty
dist: xenial
sudo: false
notifications:
email: disabled

cache: cargo

Expand Down Expand Up @@ -60,3 +62,10 @@ matrix:
- env: TARGET=x86_64-unknown-netbsd
# Emscripten
- env: TARGET=asmjs-unknown-emscripten

# CGroups in Docker
- name: Docker CGroups
install:
script:
- docker build -f ci/cgroups/Dockerfile -t num-cpus-cgroups .
- docker run -it --cpus="1" -e NUM_CPUS_TEST_GET=33 num-cpus-cgroups
9 changes: 9 additions & 0 deletions ci/cgroups/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM rust:1.40

WORKDIR /usr/num_cpus

COPY . .

RUN cargo build

CMD [ "cargo", "test" ]

0 comments on commit 9687f43

Please sign in to comment.