-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transitioning to CircleCI and running latest clippy and rustfmt #107
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
build: &build | ||
docker: | ||
- image: majorz/rust-$CIRCLE_JOB:rust-1.23.0 | ||
steps: | ||
- checkout | ||
- run: cargo build | ||
|
||
version: 2 | ||
|
||
jobs: | ||
aarch64: | ||
<<: *build | ||
rpi: | ||
<<: *build | ||
armv7hf: | ||
<<: *build | ||
i386: | ||
<<: *build | ||
amd64: | ||
<<: *build | ||
test: | ||
docker: | ||
- image: majorz/rust-test-deploy:rust-nightly-2018-01-08 | ||
steps: | ||
- checkout | ||
- run: cargo fmt -- --write-mode=diff | ||
- run: cargo clippy -- -D warnings | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- test | ||
build: | ||
jobs: | ||
- aarch64 | ||
- rpi | ||
- armv7hf | ||
- i386 | ||
- amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ indent_size = 4 | |
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
dist: trusty | ||
sudo: required | ||
language: rust | ||
cache: cargo | ||
rust: | ||
- nightly | ||
- beta | ||
- stable | ||
before_install: | ||
- sudo apt-get -qq update | ||
- sudo apt-get install -yq --no-install-recommends libdbus-1-dev | ||
install: | ||
- type -p cargo-install-update || cargo install cargo-update | ||
- cargo install-update -i cargo-update | ||
- cargo install-update -i rustfmt | ||
- if [ $TRAVIS_RUST_VERSION == nightly ]; then | ||
cargo install-update -i clippy; | ||
fi | ||
script: | ||
- cargo fmt -- --write-mode=diff | ||
- if [ $TRAVIS_RUST_VERSION == nightly ]; then | ||
cargo clippy -- -D warnings; | ||
fi | ||
- cargo build | ||
language: generic | ||
script: printf 'empty' | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
network-manager | ||
============== | ||
=============== | ||
|
||
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/resin-io-modules/NetworkManager/blob/master/LICENSE) | ||
[![Build Status](https://travis-ci.org/resin-io-modules/network-manager.svg?branch=master)](https://travis-ci.org/resin-io-modules/network-manager) | ||
> Rust NetworkManager bindings | ||
|
||
[![Current Release](https://img.shields.io/github/release/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/releases/latest) | ||
[![CircleCI status](https://img.shields.io/circleci/project/github/resin-io-modules/network-manager.svg?style=flat-square)](https://circleci.com/gh/resin-io-modules/network-manager) | ||
[![License](https://img.shields.io/github/license/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/blob/master/LICENSE) | ||
[![Issues](https://img.shields.io/github/issues/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/issues) | ||
|
||
<div align="center"> | ||
<sub>an open source :satellite: project by <a href="https://resin.io">resin.io</a></sub> | ||
</div> | ||
|
||
*** | ||
|
||
Support | ||
------- | ||
|
||
If you're having any problem, please [raise an issue](https://github.com/resin-io-modules/network-manager/issues/new) on GitHub or [contact us](https://resin.io/community/), and the resin.io team will be happy to help. | ||
|
||
*** | ||
|
||
License | ||
------- | ||
|
||
network-manager is free software, and may be redistributed under the terms specified in | ||
the [license](https://github.com/resin-io-modules/network-manager/blob/master/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
array_layout = "Block" | ||
chain_indent = "Block" | ||
control_style = "Rfc" | ||
fn_args_layout = "Block" | ||
fn_args_paren_newline = false | ||
fn_call_style = "Block" | ||
fn_call_width = 80 | ||
match_block_trailing_comma = true | ||
struct_lit_multiline_style = "ForceMulti" | ||
struct_lit_style = "Block" | ||
use_try_shorthand = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to pin this to a single nightly version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea is to bump the nightly version in this place once new image version is published. The commit will go hand in hand with the needed clippy and rustfmt updates. This will solve the problem we often have where a new PR is created and it gets blocked by the fact that clippy has a new version and the build does not pass because of it. So a second PR has to be created, then a rebase is needed, etc. I think it is better to manually bump it up once in a while on Rust stable releases and important clippy versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, one important note is that the Rust nightly version is the one that the clippy version from the image targets, e.g.:
https://github.com/rust-lang-nursery/rust-clippy/blob/master/CHANGELOG.md#00178
https://github.com/resin-io-projects/rust-cross-toolchains/blob/d1b0c745b8762d3bc0b42d116510cabc80a02693/.circleci/config.yml#L47
Sometimes with the current approach of using latest nightly + latest clippy, latest clippy does not compile with latest nightly, so the PR gets blocked awaiting for a new clippy release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha.