-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (55 loc) · 1.73 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
# Travis CI build pipeline
# --------------------------------------------
language: c
os: linux
addons:
apt:
packages:
- binutils-avr
- avr-libc
- gcc-avr
- git
install:
- |
git --version
avr-gcc --version
make --version
before_script:
- set -e
- |
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/main.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/adc/adc.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/led/led.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/prom/prom.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/sensor/sensor.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/spi/spi.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/system/system.c
avr-gcc -g -x c -O1 -mmcu=atmega8a -std=gnu99 -c ./firmware/uart/uart.c
script:
- |
avr-gcc -g -mmcu=atmega8a -o firmware.elf main.o adc.o led.o prom.o sensor.o spi.o system.o uart.o
avr-objcopy -j .text -j .data -O ihex firmware.elf firmware.hex
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex firmware.elf firmware.eep
before_deploy:
- |
if [ -n $TRAVIS_TAG ] && [[ $TRAVIS_TAG =~ ^v[0-9].[0-9]-[(F|f)]irmware$ ]]; then
travis_terminate 0
fi
- set -e
- git config --local user.name "0x007E"
- |
zip -r ./Firmware.zip ./firmware.hex ./firmware.eep
tar cfvz ./Firmware.tar.gz ./firmware.hex ./firmware.eep
- export TRAVIS_TAG="${TRAVIS_TAG}-Firmware"
deploy:
provider: releases
overwrite: true
api_key: $GITHUB_TOKEN
name: "Firmware ${TRAVIS_TAG}"
file_glob: true
file:
- "./Firmware.zip"
- "./Firmware.tar.gz"
skip_cleanup: true
on:
tags: true