-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
130 lines (98 loc) · 4.62 KB
/
.travis.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
129
130
sudo: false
language: rust
# cache: cargo
# trigger on pushes to master branch
branches:
only:
- master
#Specify multiple parallel jobs.
#This could be done by a matrix expands rust x BOARD
rust:
- stable
# - nightly
##jobs:
matrix:
#allow_failures:
# - rust: nightly
#fast_finish: true
include:
- name: "none-stm32f030"
env: HAL="stm32f0xx" MCU="stm32f030xc" TARGET="thumbv6m-none-eabi" BOARD="none-stm32f030"
- name: "bluepill"
env: HAL="stm32f1xx" MCU="stm32f103" TARGET="thumbv7m-none-eabi" BOARD="bluepill" RELEASE="--release"
#- name: "none-stm32f100"
# env: HAL="stm32f1xx" MCU="stm32f100" TARGET="thumbv7m-none-eabi" BOARD="none-stm32f100"
#- name: "none-stm32f101"
# env: HAL="stm32f1xx" MCU="stm32f101" TARGET="thumbv7m-none-eabi" BOARD="none-stm32f101"
- name: "discovery-stm32f303"
env: HAL="stm32f3xx" MCU="stm32f303xc" TARGET="thumbv7em-none-eabihf" BOARD="discovery-stm32f303"
- name: "nucleo-64"
env: HAL="stm32f4xx" MCU="stm32f411" TARGET="thumbv7em-none-eabihf" BOARD="nucleo-64"
- name: "blackpill-stm32f411"
env: HAL="stm32f4xx" MCU="stm32f411" TARGET="thumbv7em-none-eabihf" BOARD="blackpill-stm32f411"
- name: "blackpill-stm32f401"
env: HAL="stm32f4xx" MCU="stm32f401" TARGET="thumbv7em-none-eabihf" BOARD="blackpill-stm32f401"
- name: "none-stm32f722"
env: HAL="stm32f7xx" MCU="stm32f722" TARGET="thumbv7em-none-eabihf" BOARD="none-stm32f722"
- name: "none-stm32h742"
env: HAL="stm32h7xx" MCU="stm32h742" TARGET="thumbv7em-none-eabihf" BOARD="none-stm32h742"
- name: "none-stm32l0x2"
env: HAL="stm32l0xx" MCU="stm32l0x2" TARGET="thumbv6m-none-eabi" BOARD="none-stm32l0x2" RELEASE="--release"
- name: "discovery-stm32l100"
env: HAL="stm32l1xx" MCU="stm32l100" TARGET="thumbv7m-none-eabi" BOARD="discovery-stm32l100"
- name: "heltec-lora-node151"
env: HAL="stm32l1xx" MCU="stm32l151" TARGET="thumbv7m-none-eabi" BOARD="heltec-lora-node151"
- name: "none-stm32l4x1"
env: HAL="stm32l4xx" MCU="stm32l4x2" TARGET="thumbv7em-none-eabi" BOARD="none-stm32l4x2"
before_install:
- rustup target add ${TARGET}
install:
- export PATH="${PWD}/utils:$PATH" # for checkExample script
- export UTILS="${PWD}/utils" # for png files copied in checkExample script
- cd boards/${BOARD}
- cargo update
- cargo build --target ${TARGET} --features ${HAL},${MCU}
script:
# verify this is already in boards/${BOARD} from install
- echo PWD= ${PWD}
- echo BOARD= ${BOARD} TARGET= ${TARGET} HAL= ${HAL} MCU= ${MCU}
#- cargo build --target ${TARGET} --features ${HAL},${MCU} --example blink
- checkExample blink
- checkExample blink3
- checkExample echo_by_char
- checkExample echo_string
- checkExample serial_char
- checkExample serial_string
- checkExample gps_rw
- checkExample temperature
- checkExample dht
- checkExample text_i2c
- checkExample oled_gps
#- checkExample ads1015-display
- checkExample lora_spi_send
- checkExample lora_spi_receive
- checkExample lora_spi_gps
- echo PWD= ${PWD}
# next also ensure there is something new to commit, so commit does not fail
# but causes more push rejects because of updates caused by other threads.
#- date >examplesNewStatus/DATE.STAMP
#- echo ${TRAVIS_COMMIT} > examplesNewStatus/COMMIT
- cd ../../../
- mv eg_stm_hal eg_stm_hal_master
# The travis start up only cloned master, now gh-pages is needed.
# Note this is a separate clone, not a branch of the original clone.
# Travis must enable token use for master since this build is started by a master commit,
# even though the token is only needed to allow the gh-pages push.
- git clone --depth=50 --branch=gh-pages https://${GITHUB_TOKEN}@github.com/pdgilbert/eg_stm_hal.git
- mkdir -p eg_stm_hal/examplesStatus/${BOARD}
- mv eg_stm_hal_master/boards/${BOARD}/examplesNewStatus/* eg_stm_hal/examplesStatus/${BOARD}
- cd eg_stm_hal
- git add examplesStatus/${BOARD}
- ls ../
- ls ../eg_stm_hal_master/utils
# last command in next is to get 0 return code for travis
- git commit -m "commiting new examplesStatus/${BOARD}." ; RC=$? ; echo x >/dev/null
# in next try to narrow chance of conflict (expected head...) with parallel jobs
- if [ ${RC} -eq 0 ]; then git pull ; git push ; fi ; RC=$? ; echo x >/dev/null
- sleep 10
- if [ ${RC} -eq 0 ]; then git pull ; git push ; fi ; RC=$? ; echo x >/dev/null