Merge pull request #17 from pjz/travis

Add travis-ci support and better test build
This commit is contained in:
nickray 2018-10-20 03:54:14 +02:00 committed by GitHub
commit 19610ea159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 12 deletions

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
dist: trusty
language: c
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
script:
- export CC=gcc-7
- make test

View File

@ -30,6 +30,11 @@ name = main
.PHONY: all .PHONY: all
all: python-fido2 main all: python-fido2 main
.PHONY: test
test:
$(MAKE) -C . main
$(MAKE) -C . testgcm
./testgcm
tinycbor/Makefile crypto/tiny-AES-c/aes.c: tinycbor/Makefile crypto/tiny-AES-c/aes.c:
git submodule update --init git submodule update --init
@ -40,27 +45,20 @@ cbor: $(LIBCBOR)
$(LIBCBOR): tinycbor/Makefile $(LIBCBOR): tinycbor/Makefile
cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8 cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8
.PHONY: test .PHONY: efm8prog
test: testgcm
efm8prog: efm8prog:
cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all
flashefm8.exe -part EFM8UB10F8G -sn 440105518 -erase flashefm8.exe -part EFM8UB10F8G -sn 440105518 -erase
flashefm8.exe -part EFM8UB10F8G -sn 440105518 -upload './targets/efm8/Keil 8051 v9.53 - Debug/efm8.hex' flashefm8.exe -part EFM8UB10F8G -sn 440105518 -upload './targets/efm8/Keil 8051 v9.53 - Debug/efm8.hex'
.PHONY: efm32com efm32prog efm32read efm32bootprog
efm32com: efm32com:
cd './targets/efm32/GNU ARM v7.2.1 - Debug' && $(MAKE) all cd './targets/efm32/GNU ARM v7.2.1 - Debug' && $(MAKE) all
efm32prog: efm32prog: efm32com
cd './targets/efm32/GNU ARM v7.2.1 - Debug' && $(MAKE) all
commander flash './targets/efm32/GNU ARM v7.2.1 - Debug/EFM32.hex' $(EFM32_DEBUGGER) -p "0x1E7FC:0x00000000:4" commander flash './targets/efm32/GNU ARM v7.2.1 - Debug/EFM32.hex' $(EFM32_DEBUGGER) -p "0x1E7FC:0x00000000:4"
efm32read: efm32read: efm32com
cd './targets/efm32/GNU ARM v7.2.1 - Debug' && $(MAKE) all
commander swo read $(EFM32_DEBUGGER) commander swo read $(EFM32_DEBUGGER)
efm32bootprog: efm32com
efm32bootprog:
cd './targets/efm32boot/GNU ARM v7.2.1 - Debug' && $(MAKE) all
commander flash './efm32boot/GNU ARM v7.2.1 - Debug/efm32boot.hex' $(EFM32_DEBUGGER) --masserase commander flash './efm32boot/GNU ARM v7.2.1 - Debug/efm32boot.hex' $(EFM32_DEBUGGER) --masserase
$(name): $(obj) $(LIBCBOR) $(name): $(obj) $(LIBCBOR)