Skip to content

Commit

Permalink
updates to coverage and workspace ci tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiegurari committed Jul 18, 2017
1 parent a18d74b commit bd60a3e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-make"
version = "0.3.28"
version = "0.3.29"
authors = ["Sagie Gur-Ari <sagiegurari@gmail.com>"]
description = "Rust task runner and build tool."
license = "Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ See [contributing guide](.github/CONTRIBUTING.md)

| Date | Version | Description |
| ----------- | ------- | ----------- |
| 2017-07-18 | v0.3.29 | updates to coverage and workspace ci tasks |
| 2017-07-17 | v0.3.28 | workspace level ci flow |
| 2017-07-16 | v0.3.27 | cargo make ci-flow on travis now automatically runs code coverage and uploads to codecov |
| 2017-07-16 | v0.3.25 | New --no-workspace cli arg |
Expand Down
1 change: 1 addition & 0 deletions docs/_includes/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ See [contributing guide](https://github.com/sagiegurari/cargo-make/blob/master/.

| Date | Version | Description |
| ----------- | ------- | ----------- |
| 2017-07-18 | v0.3.29 | updates to coverage and workspace ci tasks |
| 2017-07-17 | v0.3.28 | workspace level ci flow |
| 2017-07-16 | v0.3.27 | cargo make ci-flow on travis now automatically runs code coverage and uploads to codecov |
| 2017-07-16 | v0.3.25 | New --no-workspace cli arg |
Expand Down
60 changes: 22 additions & 38 deletions src/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies = [
# CI task will run CI flow for each member and merge coverage reports
dependencies = [
"pre-workspace-ci-flow",
"prepare-workspace-coverage",
"workspace-members-ci",
"workspace-coverage",
"post-workspace-ci-flow"
Expand Down Expand Up @@ -278,9 +277,6 @@ args = ["push"]

[tasks.post-workspace-ci-flow]

[tasks.prepare-workspace-coverage]
linux_alias = "kcov-install-debian"

[tasks.workspace-members-ci]
script = [
"export CARGO_MAKE_SKIP_CODECOV=\"true\"", #prevent codecov publish in member builds
Expand All @@ -299,6 +295,26 @@ linux_alias = "codecov"

[tasks.coverage]
windows_alias = "empty"
install_script = [
"command -v kcov >/dev/null 2>&1 || {",
"if [ -n \"$KCOV_VERSION\" ]; then",
"if [ \"$(grep -Ei 'debian|buntu|mint' /etc/*release)\" ]; then",
"sudo apt-get update || true",
"sudo apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev",
"wget https://github.com/SimonKagstrom/kcov/archive/v$KCOV_VERSION.zip",
"unzip v$KCOV_VERSION.zip",
"cd kcov-$KCOV_VERSION",
"mkdir build",
"cd ./build",
"cmake ..",
"make",
"sudo make install",
"cd ../..",
"rm -rf kcov-$KCOV_VERSION",
"fi",
"fi",
"}"
]
script = [
"echo \"Working Directory: ${CARGO_MAKE_WORKING_DIRECTORY}\"",
"TARGET_DIRECTORY=\"target/coverage\"",
Expand Down Expand Up @@ -357,43 +373,11 @@ dependencies = [
]

[tasks.ci-coverage-flow]
linux_alias = "travis-coverage-flow"

[tasks.travis-coverage-flow]
windows_alias = "empty"
script = [
"if [ \"$TRAVIS\" = \"true\" ]; then",
"if [ \"$CARGO_MAKE_RUN_CODECOV\" = \"true\" ]; then",
"cargo make travis-codecov-flow",
"cargo make codecov-flow",
"fi",
"fi"
]

[tasks.travis-codecov-flow]
dependencies = [
"kcov-install-debian",
"codecov-flow"
]

[tasks.kcov-install-debian]

[tasks.kcov-install-debian.linux]
script = [
"command -v kcov >/dev/null 2>&1 || {",
"if [ -n \"$KCOV_VERSION\" ]; then",
"if [ \"$(grep -Ei 'debian|buntu|mint' /etc/*release)\" ]; then",
"sudo apt-get update || true",
"sudo apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev",
"wget https://github.com/SimonKagstrom/kcov/archive/v$KCOV_VERSION.zip",
"unzip v$KCOV_VERSION.zip",
"cd kcov-$KCOV_VERSION",
"mkdir build",
"cd ./build",
"cmake ..",
"make",
"sudo make install",
"cd ../..",
"rm -rf kcov-$KCOV_VERSION",
"fi",
"fi",
"}"
]

0 comments on commit bd60a3e

Please sign in to comment.