-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
128 lines (104 loc) · 3.17 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
cargo-fmt:
image: rust
script:
- rustup component add rustfmt
- cargo fmt --check
beamdriver:
image: rust
script:
# Install and build elf2uf2-rs
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- cargo install elf2uf2-rs --locked
# Now build firmware
- cd firmware/beamdriver
- rustup target install thumbv6m-none-eabi
- cargo install flip-link
- cargo build --release
# Convert to .uf2 and copy to filename with our commit hash
- elf2uf2-rs target/thumbv6m-none-eabi/release/beamdriver
- cp target/thumbv6m-none-eabi/release/beamdriver.uf2 ${CI_PROJECT_DIR}/beamdriver-${CI_COMMIT_SHA}.uf2
artifacts:
paths:
- beamdriver-${CI_COMMIT_SHA}.uf2
name: "beamdriver-${CI_COMMIT_SHA}"
rpipico-pantilt-firmware:
image: rust
script:
# Install and build elf2uf2-rs
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- cargo install elf2uf2-rs --locked
# Now build firmware
- cd firmware/rpipico-pantilt
- rustup target install thumbv6m-none-eabi
- cargo install flip-link
- cargo build --release
# Convert to .uf2 and copy to filename with our commit hash
- elf2uf2-rs target/thumbv6m-none-eabi/release/rpipico-pantilt
- cp target/thumbv6m-none-eabi/release/rpipico-pantilt.uf2 ${CI_PROJECT_DIR}/rpipico-pantilt-${CI_COMMIT_SHA}.uf2
artifacts:
paths:
- rpipico-pantilt-${CI_COMMIT_SHA}.uf2
name: "rpipico-pantilt-${CI_COMMIT_SHA}"
flo-tilta-dongle:
image: rust
script:
# Build firmware
- cd firmware/flo-tilta-dongle
- rustup target install thumbv7em-none-eabihf
- cargo build --release
pwm-motor-types:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- rustup target install thumbv6m-none-eabi
- cd crates/pwm-motor-types
# Ensure that it builds without std
- cargo build --target thumbv6m-none-eabi
- cargo test
flo:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev libclang-dev librust-alsa-sys-dev
- export RUSTFLAGS="-D warnings"
- cargo install grass
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- cd crates/flo-bui
- ./build.sh
- cd ${CI_PROJECT_DIR}
- cargo test
- cargo run -- --config config-byo.yaml show-config
- cargo run -- --config config-drone.yaml show-config
- cargo run -- --config config-mini.yaml show-config
# Also run flo-mavlink tests
- cd ${CI_PROJECT_DIR}/crates/flo-mavlink
- cargo test
# And mavlink-dump tests
- cd ${CI_PROJECT_DIR}/crates/flo-mavlink/mavlink-dump
- cargo test
test-crates:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- cd crates/flo-core
- cargo test
- cd ../..
- cd crates/osd-utils
- cargo test
- cd ../..
simplebgc:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- cd crates/simplebgc
- cargo test
trinamic:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- export RUSTFLAGS="-D warnings"
- cd crates/trinamic
- cargo test