Skip to content

Commit 2e870ae

Browse files
authored
Upgrade to embedded-graphics 0.6.0 (#18)
* Upgrade to e-g 0.6.0 * Fix examples * Run nightly rustfmt * Use Rust 2018 style imports in examples * Prepare for cargo_release usage * Changelog entry * Migrate from Travis to CircleCI * Bump readme example and badges * Fix docs.rs build
1 parent 34bbb1c commit 2e870ae

25 files changed

+444
-378
lines changed

.circleci/config.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
target_steps: &target_steps
2+
docker:
3+
- image: circleci/rust:1.42.0
4+
steps:
5+
- checkout
6+
- restore_cache:
7+
key: v1-sh1106-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
8+
- run: sudo apt install -qq linkchecker
9+
- run: rustup default ${RUST_VERSION:-stable}
10+
- run: rustup component add rustfmt
11+
- run: |
12+
SYSROOT=$(rustc --print sysroot)
13+
14+
if [[ ! "$SYSROOT" =~ "$TARGET" ]]; then
15+
rustup target add $TARGET
16+
else
17+
echo "Target $TARGET is already installed"
18+
fi
19+
- run: ./build.sh
20+
- save_cache:
21+
key: v1-sh1106-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
22+
paths:
23+
- ./target
24+
- /home/ubuntu/.cargo
25+
26+
version: 2
27+
jobs:
28+
target-arm-unknown-linux-eabi:
29+
environment:
30+
- TARGET: 'arm-unknown-linux-gnueabi'
31+
- DISABLE_EXAMPLES: 1
32+
<<: *target_steps
33+
34+
target-armv7-unknown-linux-gnueabihf:
35+
environment:
36+
- TARGET: 'armv7-unknown-linux-gnueabihf'
37+
- DISABLE_EXAMPLES: 1
38+
<<: *target_steps
39+
40+
target-x86_64-unknown-linux-gnu:
41+
environment:
42+
- TARGET: 'x86_64-unknown-linux-gnu'
43+
- DISABLE_EXAMPLES: 1
44+
<<: *target_steps
45+
46+
target-x86_64-unknown-linux-musl:
47+
environment:
48+
- TARGET: 'x86_64-unknown-linux-musl'
49+
- DISABLE_EXAMPLES: 1
50+
<<: *target_steps
51+
52+
target-thumbv6m-none-eabi:
53+
environment:
54+
- TARGET: 'thumbv6m-none-eabi'
55+
# Disable example builds as they target thumbv7 and up
56+
- DISABLE_EXAMPLES: 1
57+
<<: *target_steps
58+
59+
target-thumbv7em-none-eabi:
60+
environment:
61+
- TARGET: 'thumbv7em-none-eabi'
62+
<<: *target_steps
63+
64+
target-thumbv7em-none-eabihf:
65+
environment:
66+
- TARGET: 'thumbv7em-none-eabihf'
67+
<<: *target_steps
68+
69+
target-thumbv7m-none-eabi:
70+
environment:
71+
- TARGET: 'thumbv7m-none-eabi'
72+
<<: *target_steps
73+
74+
build_jobs: &build_jobs
75+
jobs:
76+
# Raspberry Pi 1
77+
- target-arm-unknown-linux-eabi
78+
79+
# Raspberry Pi 2, 3, etc
80+
- target-armv7-unknown-linux-gnueabihf
81+
82+
# Linux
83+
- target-x86_64-unknown-linux-gnu
84+
- target-x86_64-unknown-linux-musl
85+
86+
# Bare metal
87+
- target-thumbv6m-none-eabi
88+
- target-thumbv7em-none-eabi
89+
- target-thumbv7em-none-eabihf
90+
- target-thumbv7m-none-eabi
91+
92+
workflows:
93+
version: 2
94+
build_all:
95+
<<: *build_jobs
96+
97+
# Build every day
98+
nightly:
99+
<<: *build_jobs
100+
triggers:
101+
- schedule:
102+
cron: '0 0 * * *'
103+
filters:
104+
branches:
105+
only:
106+
- master

.travis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# Changelog
22

3-
`sh1106` is a Rust driver for the SH1106 OLED display. It supports
3+
[`sh1106`](https://crates.io/crates/sh1106) is a Rust driver for the SH1106 OLED display. It supports
44
[embedded-graphics](https://crates.io/crates/embedded-graphics) or raw pixel drawing modes and works
55
with the [embedded-hal](crates.io/crates/embedded-hal) traits for maximum portability.
66

7-
## 0.3.0-alpha.4
7+
<!-- next-header -->
8+
9+
## [Unreleased] - ReleaseDate
10+
11+
### Added
12+
13+
- Migrate from Travis to CircleCI
14+
15+
### Changed
16+
17+
- **(breaking)** [#18](https://github.com/jamwaffles/sh1106/pull/18) Upgrade to embedded-graphics 0.6.0
18+
19+
## [0.3.0-alpha.4]
820

921
### Fixed
1022

@@ -30,54 +42,20 @@ let mut disp: GraphicsMode<_> = sh1106::Builder::new()
3042

3143
Upgrade to new embedded-graphics `0.6.0-alpha.2` release. Please see the [embedded-graphics changelog](https://github.com/jamwaffles/embedded-graphics/blob/c0ed1700635f307a4c5114fec1769147878fd584/CHANGELOG.md) for more information.
3244

33-
### Added
34-
35-
- None
36-
3745
### Changed
3846

3947
- **(breaking)** #11 Upgraded to [embedded-graphics](https://crates.io/crates/embedded-graphics) 0.6.0-alpha.2
4048

41-
### Deprecated
42-
43-
- None
44-
45-
### Removed
46-
47-
- None
48-
49-
### Fixed
50-
51-
- None
52-
53-
### Security
54-
55-
- None
56-
5749
## 0.3.0-alpha.1
5850

5951
Upgrade to new embedded-graphics `0.6.0-alpha.1` release. Please see the [embedded-graphics changelog](https://github.com/jamwaffles/embedded-graphics/blob/embedded-graphics-v0.6.0-alpha.1/CHANGELOG.md) for more information.
6052

61-
### Added
62-
63-
- None
64-
6553
### Changed
6654

6755
- **(breaking)** #9 Upgraded to [embedded-graphics](https://crates.io/crates/embedded-graphics) 0.6.0-alpha.1
6856

69-
### Deprecated
70-
71-
- None
72-
73-
### Removed
74-
75-
- None
76-
77-
### Fixed
78-
79-
- None
80-
81-
### Security
57+
<!-- next-url -->
8258

83-
- None
59+
[unreleased]: https://github.com/jamwaffles/sh1106/compare/v0.3.0-alpha.4...HEAD
60+
[0.3.0-alpha.4]: https://github.com/jamwaffles/sh1106/compare/v0.3.0-alpha.3...v0.3.0-alpha.4
61+
[0.3.0-alpha.3]: https://github.com/jamwaffles/sh1106/compare/v0.3.0-alpha.2...v0.3.0-alpha.3

Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ readme = "README.md"
1111
repository = "https://github.com/jamwaffles/sh1106"
1212
version = "0.3.0-alpha.4"
1313
edition = "2018"
14-
[badges.travis-ci]
15-
branch = "master"
16-
repository = "jamwaffles/sh1106"
14+
15+
[package.metadata.docs.rs]
16+
default-target = "x86_64-unknown-linux-gnu"
17+
18+
[badges]
19+
circle-ci = { repository = "jamwaffles/sh1106", branch = "master" }
1720

1821
[dependencies]
1922
embedded-hal = "0.2.3"
2023

2124
[dependencies.embedded-graphics]
2225
optional = true
23-
version = "=0.6.0-alpha.2"
26+
version = "0.6.0"
2427

2528
[dev-dependencies]
2629
cortex-m = "0.6.0"

0 commit comments

Comments
 (0)