forked from Sub-IoT/Sub-IoT-Stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
56 lines (56 loc) · 1.78 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
stages:
- build stack
- flash test boards
- run tests
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
job 1:
tags:
- linux
stage: build stack
script:
- wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
- tar xvf gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
- sudo rm gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
- export PATH="$(pwd)/gcc-arm-none-eabi-8-2018-q4-major/bin/:$PATH"
- mkdir build && cd build
- platform="B_L072Z_LRWAN1"
- cmake ../stack/ -DAPP_GATEWAY=y -DAPP_MODEM=y -DAPP_SENSOR_PUSH=y -DPLATFORM=$platform -DFRAMEWORK_DEBUG_ASSERT_REBOOT=y
- make
artifacts:
name: "$CI_COMMIT_REF_NAME"
when: always
paths:
- build/apps/gateway/*
- build/apps/modem/*
- build/apps/sensor_push/*
job 2:
tags:
- JLink
stage: flash test boards
dependencies:
- job 1
script:
- cd build/apps/modem
- JLinkExe -SelectEmuBySN 770821797 -CommandFile jlink-flash-full.script > flashOutput1.txt
- JLinkExe -SelectEmuBySN 772958091 -CommandFile jlink-flash-full.script > flashOutput2.txt
- cat flashOutput1.txt
- cat flashOutput2.txt
- if grep -q FAILED "flashOutput1.txt"; then exit 1; fi
- if grep -q FAILED "flashOutput2.txt"; then exit 1; fi
job 3:
tags:
- JLink
stage: run tests
script:
- git clone --recurse-submodules https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/aloxy/oss7-testsuite.git
- cd oss7-testsuite
- pip install -r requirements.txt
- cd lib/pyd7a/
- pip install -r requirements.txt
- cd ../..
- python2 run.py --serial-test-device=/dev/ttyUSB0 --serial-dut=/dev/ttyUSB1 -m "not band433 and not band915 and not known_issue" --junitxml report.xml -v
artifacts:
reports:
junit: oss7-testsuite/report.xml