Skip to content

Commit b8f0d51

Browse files
committed
Adding raspi example build
1 parent f538749 commit b8f0d51

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.circleci/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ target_steps: &target_steps
2525
- ./target
2626
- /usr/local/cargo/registry
2727

28+
cross_steps: &cross_steps
29+
docker:
30+
- image: circleci/rust:1.41.0
31+
steps:
32+
- checkout
33+
- restore_cache:
34+
key: v2-ssd1306-raspi-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
35+
- run: rustup self update
36+
- run: sudo apt install -qq linkchecker
37+
- run: rustup default ${RUST_VERSION:-stable}
38+
- run: rustup component add rustfmt
39+
- run: cargo update
40+
- run: cargo install cross
41+
- run: |
42+
cd {{ .Environment.EXAMPLE_PATH }}
43+
cross build --release --target {{ .Environment.CIRCLE_JOB }}
44+
- save_cache:
45+
key: v2-ssd1306-raspi-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
46+
paths:
47+
- ./target
48+
- /usr/local/cargo/registry
49+
2850
version: 2
2951
jobs:
3052
target-arm-unknown-linux-eabi:
@@ -73,6 +95,14 @@ jobs:
7395
- TARGET: "thumbv7m-none-eabi"
7496
<<: *target_steps
7597

98+
version: 2
99+
jobs:
100+
example-raspi:
101+
environment:
102+
- TARGET: "armv7-unknown-linux-gnueabihf"
103+
- EXAMPLE_PATH: "examples/raspi"
104+
<<: *cross_steps
105+
76106
build_jobs: &build_jobs
77107
jobs:
78108
# Raspberry Pi 1
@@ -91,10 +121,15 @@ build_jobs: &build_jobs
91121
- target-thumbv7em-none-eabihf
92122
- target-thumbv7m-none-eabi
93123

124+
build_example_jobs: &build_example_jobs
125+
jobs:
126+
- example-raspi
127+
94128
workflows:
95129
version: 2
96130
build_all:
97131
<<: *build_jobs
132+
<<: *build_example_jobs
98133

99134
# Build every day
100135
nightly:

0 commit comments

Comments
 (0)