Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Added coverage support for master branch #70

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 34 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
before_install:
- yes | sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
- sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/terry_guo-gcc-arm-embedded-precise.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
- yes | sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
- sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/terry_guo-gcc-arm-embedded-precise.list"
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
install:
- sudo apt-get install gcc-arm-none-eabi
- curl http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz | tar xz
- mkdir thirdparty
- cd thirdparty
- curl http://static.rust-lang.org/dist/rust-nightly.tar.gz | tar xz
- mv rust-nightly rust
- cd ..
- wget http://vfp.in/kcov.gz && gunzip kcov.gz && chmod 755 kcov
- sudo apt-get install gcc-arm-none-eabi
- curl http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz
| tar xz
- mkdir thirdparty
- cd thirdparty
- curl http://static.rust-lang.org/dist/rust-nightly.tar.gz | tar xz
- mv rust-nightly rust
- cd ..
before_script:
- export RUNTIME_LIB="/usr/lib/gcc/arm-none-eabi/4.8.4/<%= @platform.arch.arch %>/libgcc.a"
- export RUSTC="`pwd`/rust-nightly-x86_64-unknown-linux-gnu/bin/rustc"
- $RUSTC --version
- export RUNTIME_LIB="/usr/lib/gcc/arm-none-eabi/4.8.4/<%= @platform.arch.arch %>/libgcc.a"
- export RUSTC="`pwd`/rust-nightly-x86_64-unknown-linux-gnu/bin/rustc"
- "$RUSTC --version"
script:
- rake build_all test
- rake build_all test
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./support/record_stats.sh
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./support/record_stats.sh
env:
global:
- STATS_REPO="[email protected]:bharr/zinc-stats"
- secure: "NPM3mliwtjsO/W6ywlL36WvjgtMLKI5ZOR5Pd1OJNFVYTTJXE6sKfKDYhVVyn9kp+6eieXal/ntBaXpABTY5W1UrgnG4uFKoz5Bi06oQAZDxnwK1bH3EowGbiXtEkI50tD5SfhnLig2cNjabgu8eg/u/UrXyZovLz1oOgCpaUWc="
- STATS_REPO="[email protected]:bharr/zinc-stats"
- secure: NPM3mliwtjsO/W6ywlL36WvjgtMLKI5ZOR5Pd1OJNFVYTTJXE6sKfKDYhVVyn9kp+6eieXal/ntBaXpABTY5W1UrgnG4uFKoz5Bi06oQAZDxnwK1bH3EowGbiXtEkI50tD5SfhnLig2cNjabgu8eg/u/UrXyZovLz1oOgCpaUWc=
matrix:
- PLATFORM=lpc17xx
- PLATFORM=stm32f4
- PLATFORM=lpc17xx
- PLATFORM=stm32f4
matrix:
allow_failures:
- env: PLATFORM=stm32f4
- env: PLATFORM=stm32f4
deploy:
provider: s3
access_key_id: AKIAIXCRAWKV367B373A
secret_access_key:
secure: "DyKmiVjiehWB76WjTYiDqbnYL97L7s/udXL6iUe4kQz7qvjZ6ZTqwhhR/OQEPmVOXE+JWyW4ZRblegBGrrXLpt1RpL7i5fve5ds541pPvskwJtgBqHjNj/X4icZU0MsW5aVY9V+0NcRiPxyuG1o7FFTOtMBoMAfktIHPcBpraYs="
bucket: cov.zinc.rs
local-dir: build/coverage
skip_cleanup: true
endpoint: cov.zinc.rs.s3-website-us-east-1.amazonaws.com
region: us-east-1
on:
branch: master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/hackndev/zinc.svg)](https://travis-ci.org/hackndev/zinc) [![Stories in Ready](https://badge.waffle.io/hackndev/zinc.png?label=ready&title=Ready)](https://waffle.io/hackndev/zinc)
[![Build Status](https://travis-ci.org/hackndev/zinc.svg)](https://travis-ci.org/hackndev/zinc) [![Stories in Ready](https://badge.waffle.io/hackndev/zinc.png?label=ready&title=Ready)](https://waffle.io/hackndev/zinc) [![Coverage](http://img.shields.io/badge/coverage-passing-brightgreen.svg)](http://cov.zinc.rs/platformtree_test/)
Zinc, the bare metal stack for rust
===================================

Expand Down
1 change: 1 addition & 0 deletions support/build/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def initialize_environment!
@env[:rustcflags] = [
'--opt-level 2',
'-Z no-landing-pads',
'-g',
] + @config_flags

@env[:ldflags] = [resolve_runtime_lib]
Expand Down
7 changes: 6 additions & 1 deletion support/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ def rust_tests(n, h)
h[:test] = true
compile_rust n, h
run_task = Rake::Task.define_task("run_#{n}".to_sym => h[:produce]) do |t|
sh t.prerequisites.first
if File.exists?('kcov')
path = "build/coverage/#{n}"
sh "mkdir -p #{path} && ./kcov #{path} #{t.prerequisites.first}"
else
sh t.prerequisites.first
end
end

Rake::Task[:test].enhance([run_task])
Expand Down