Skip to content

Commit

Permalink
add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Oct 24, 2018
1 parent 34c6d19 commit f31e9b6
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
delete_merged_branches = true
status = ["continuous-integration/travis-ci/push"]
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: rust

matrix:
include:
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7m-none-eabi
rust: nightly
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

before_install: set -e

install:
- bash ci/install.sh
- export PATH="$PATH:$PWD/gcc/bin:$PWD/qemu"

script:
- bash ci/script.sh

after_script: set +e

cache: cache

before_cache:
- chmod -R a+r $HOME/.cargo;

branches:
only:
- master
- staging
- trying

notifications:
email:
on_success: never
9 changes: 9 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -euxo pipefail

main() {
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
rustup target add $TARGET
fi
}

main
7 changes: 7 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -euxo pipefail

main() {
cargo check --target $TARGET
}

main

0 comments on commit f31e9b6

Please sign in to comment.