|
1 | | -version: 2 |
| 1 | +version: 2.1 |
| 2 | +commands: |
| 3 | + check_inspection: |
| 4 | + steps: |
| 5 | + - run: |
| 6 | + name: Check inspection commands |
| 7 | + working_directory: integration_tests/supported-tests |
| 8 | + command: | |
| 9 | + mbed compile --supported |
| 10 | + mbed compile --config --prefix mbed |
| 11 | + mbed toolchain --supported |
| 12 | + mbed target --supported |
| 13 | + mbed export --supported |
| 14 | + mbed test --compile-list |
| 15 | + change_mbed_os_version: |
| 16 | + parameters: |
| 17 | + version: |
| 18 | + type: string |
| 19 | + steps: |
| 20 | + - run: |
| 21 | + name: Change version to Mbed OS << parameters.version >> |
| 22 | + working_directory: integration_tests/supported-tests/mbed-os |
| 23 | + command: mbed update --clean --clean-files "mbed-os-<< parameters.version >>" |
| 24 | + run_tests: |
| 25 | + steps: |
| 26 | + - run: |
| 27 | + name: Install GCC ARM Embedded |
| 28 | + working_directory: /opt |
| 29 | + command: | |
| 30 | + dpkg --add-architecture i386 |
| 31 | + apt-get -y update |
| 32 | + apt-get -y install libc6:i386 libncurses5:i386 libstdc++6:i386 |
| 33 | + wget -O gcc_arm_embedded.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/5_3-2016q1/gccarmnoneeabi532016q120160330linuxtar.bz2?revision=417e2623-c259-4a12-aacc-c87200b569c7?product=GNU%20Arm%20Embedded%20Toolchain,32-bit,,Linux,5-2016-q1-update" |
| 34 | + tar -jxf gcc_arm_embedded.tar.bz2 |
| 35 | + echo 'export PATH="/opt/gcc-arm-none-eabi-5_3-2016q1/bin:$PATH"' >> $BASH_ENV |
| 36 | + - run: |
| 37 | + name: Configure Git and Mercurial |
| 38 | + command: | |
| 39 | + git config --global user.email "test@mbed.org" |
| 40 | + git config --global user.name "mbed Test" |
| 41 | + echo -e "[ui]\nusername = mbed Test <test@mbed.org>\n" > ~/.hgrc |
| 42 | + - checkout |
| 43 | + - run: |
| 44 | + name: Install Mbed CLI |
| 45 | + command: | |
| 46 | + pip install -U pytest setuptools |
| 47 | + pip install -e . |
| 48 | + mbed --version |
| 49 | + - run: |
| 50 | + name: Run unit tests |
| 51 | + command: py.test test |
| 52 | + - run: |
| 53 | + name: Configure Mbed CLI for integration tests |
| 54 | + command: | |
| 55 | + mbed toolchain -G GCC_ARM |
| 56 | + mbed target -G K64F |
| 57 | + mbed config -G protocol https |
| 58 | + mkdir integration_tests |
| 59 | + - run: |
| 60 | + name: Create a new project |
| 61 | + working_directory: integration_tests |
| 62 | + command: mbed new new-test |
| 63 | + - run: |
| 64 | + name: Test project inspection |
| 65 | + working_directory: integration_tests/new-test |
| 66 | + command: | |
| 67 | + mbed ls |
| 68 | + mbed releases -r |
| 69 | + - run: |
| 70 | + name: Build through "compile" and "test" |
| 71 | + working_directory: integration_tests/new-test |
| 72 | + command: | |
| 73 | + echo $PATH |
| 74 | + ls -l /opt/gcc-arm-none-eabi-5_3-2016q1/bin |
| 75 | + mbed compile --source=. --source=mbed-os/TESTS/integration/basic -j 0 |
| 76 | + mbed test --compile -n mbed-os-tests-integration-basic -j 0 |
| 77 | + run_old_support_tests: |
| 78 | + steps: |
| 79 | + - run: |
| 80 | + name: Ensure importing through mercurial works |
| 81 | + working_directory: integration_tests |
| 82 | + command: mbed import https://os.mbed.com/teams/Morpheus/code/mbed-Client-Morpheus-hg hg-test |
| 83 | + - run: |
| 84 | + name: Test project inspection, updates, and compiling |
| 85 | + working_directory: integration_tests/hg-test |
| 86 | + command: | |
| 87 | + mbed ls |
| 88 | + mbed releases -r |
| 89 | + mbed update b02527cafcde8612ff051fea57e9975aca598807 --clean |
| 90 | + mbed update --clean |
| 91 | + mbed compile -j 0 |
| 92 | + - run: |
| 93 | + name: Import Mbed 2 project |
| 94 | + working_directory: integration_tests |
| 95 | + command: mbed import https://os.mbed.com/users/samux/code/USBSerial_HelloWorld bld-test |
| 96 | + - run: |
| 97 | + name: Test project inspection for Mbed 2 project |
| 98 | + working_directory: integration_tests/bld-test |
| 99 | + command: | |
| 100 | + mbed ls |
| 101 | + mbed releases -r |
| 102 | + - run: |
| 103 | + name: Update Mbed library |
| 104 | + working_directory: integration_tests/bld-test/mbed |
| 105 | + command: mbed update 85 --clean |
| 106 | + - run: |
| 107 | + name: Update Mbed 2 project |
| 108 | + working_directory: integration_tests/bld-test |
| 109 | + command: mbed update --clean |
| 110 | + - run: |
| 111 | + name: Compile Mbed 2 project |
| 112 | + working_directory: integration_tests/bld-test |
| 113 | + command: mbed compile -m LPC1768 -j 0 |
| 114 | + - run: |
| 115 | + name: Create new project for old Mbed OS support |
| 116 | + working_directory: integration_tests |
| 117 | + command: mbed new supported-tests |
| 118 | + - change_mbed_os_version: |
| 119 | + version: "5.8.5" |
| 120 | + - check_inspection |
| 121 | + - change_mbed_os_version: |
| 122 | + version: "5.7.6" |
| 123 | + - check_inspection |
| 124 | + - change_mbed_os_version: |
| 125 | + version: "5.6.6" |
| 126 | + - check_inspection |
| 127 | + - change_mbed_os_version: |
| 128 | + version: "5.5.6" |
| 129 | + - check_inspection |
| 130 | + - change_mbed_os_version: |
| 131 | + version: "5.4.6" |
| 132 | + - check_inspection |
| 133 | + - change_mbed_os_version: |
| 134 | + version: "5.2.3" |
| 135 | + - check_inspection |
| 136 | + - change_mbed_os_version: |
| 137 | + version: "5.1.5" |
| 138 | + - check_inspection |
2 | 139 | jobs: |
3 | | - py2: |
4 | | - machine: true |
5 | | - steps: |
6 | | - - run: sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded |
7 | | - - run: sudo apt-get -y update |
8 | | - - run: sudo apt-get -y install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1 |
9 | | - |
10 | | - - run: python --version |
11 | | - - run: pip --version |
12 | | - - run: pip install pytest |
13 | | - - run: git config --global user.email "test@mbed.org" |
14 | | - - run: git config --global user.name "mbed Test" |
15 | | - - run: echo -e "[ui]\nusername = mbed Test <test@mbed.org>\n" > ~/.hgrc |
16 | | - - checkout |
17 | | - - run: pip install -e ./ |
18 | | - |
19 | | - - run: mbed --version |
20 | | - - run: py.test test |
21 | | - - run: mbed toolchain -G GCC_ARM |
22 | | - - run: mbed target -G K64F |
23 | | - - run: mbed config -G protocol ssh |
24 | | - - run: mkdir .tests |
25 | | - - run: cd .tests && mbed new new-test |
26 | | - - run: cd .tests/new-test && mbed ls |
27 | | - - run: cd .tests/new-test && mbed releases -r |
28 | | - - run: cd .tests/new-test && mbed compile --source=. --source=mbed-os/TESTS/integration/basic -j 0 |
29 | | - - run: cd .tests/new-test && mbed test --compile -n mbed-os-tests-integration-basic -j 0 |
30 | | - - run: cd .tests && mbed import https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg hg-test |
31 | | - - run: cd .tests/hg-test && mbed ls |
32 | | - - run: cd .tests/hg-test && mbed releases -r |
33 | | - - run: cd .tests/hg-test && mbed update b02527cafcde8612ff051fea57e9975aca598807 --clean |
34 | | - - run: cd .tests/hg-test && mbed update --clean |
35 | | - - run: cd .tests/hg-test && mbed compile -j 0 |
36 | | - - run: cd .tests && mbed import https://developer.mbed.org/users/samux/code/USBSerial_HelloWorld bld-test |
37 | | - - run: cd .tests/bld-test && mbed ls |
38 | | - - run: cd .tests/bld-test && mbed releases -r |
39 | | - - run: cd .tests/bld-test/mbed && mbed update 85 --clean |
40 | | - - run: cd .tests/bld-test && mbed update --clean |
41 | | - - run: cd .tests/bld-test && mbed compile -m LPC1768 -j 0 |
42 | | - - run: cd .tests && mbed new supported-tests |
43 | | - - run: |- |
44 | | - cd .tests/supported-tests |
45 | | - echo "Testing mbed-os-5.8.5" |
46 | | - cd mbed-os |
47 | | - mbed update --clean --clean-files "mbed-os-5.8.5" |
48 | | - mbed compile --supported |
49 | | - mbed compile --config --prefix mbed |
50 | | - mbed toolchain --supported |
51 | | - mbed target --supported |
52 | | - mbed export --supported |
53 | | - mbed test --compile-list |
54 | | - - run: |- |
55 | | - cd .tests/supported-tests |
56 | | - echo "Testing mbed-os-5.7.6" |
57 | | - cd mbed-os |
58 | | - mbed update --clean --clean-files "mbed-os-5.7.5" |
59 | | - mbed compile --supported |
60 | | - mbed compile --config --prefix mbed |
61 | | - mbed toolchain --supported |
62 | | - mbed target --supported |
63 | | - mbed export --supported |
64 | | - mbed test --compile-list |
65 | | - - run: |- |
66 | | - cd .tests/supported-tests |
67 | | - echo "Testing mbed-os-5.6.6" |
68 | | - cd mbed-os |
69 | | - mbed update --clean --clean-files "mbed-os-5.6.5" |
70 | | - mbed compile --supported |
71 | | - mbed compile --config --prefix mbed |
72 | | - mbed toolchain --supported |
73 | | - mbed target --supported |
74 | | - mbed export --supported |
75 | | - mbed test --compile-list |
76 | | - - run: |- |
77 | | - cd .tests/supported-tests |
78 | | - echo "Testing mbed-os-5.5.6" |
79 | | - cd mbed-os |
80 | | - mbed update --clean --clean-files "mbed-os-5.5.5" |
81 | | - mbed compile --supported |
82 | | - mbed compile --config --prefix mbed |
83 | | - mbed toolchain --supported |
84 | | - mbed target --supported |
85 | | - mbed export --supported |
86 | | - mbed test --compile-list |
87 | | - - run: |- |
88 | | - cd .tests/supported-tests |
89 | | - echo "Testing mbed-os-5.4.6" |
90 | | - cd mbed-os |
91 | | - mbed update --clean --clean-files "mbed-os-5.4.5" |
92 | | - mbed compile --supported |
93 | | - mbed compile --config --prefix mbed |
94 | | - mbed toolchain --supported |
95 | | - mbed target --supported |
96 | | - mbed export --supported |
97 | | - mbed test --compile-list |
98 | | - - run: |- |
99 | | - cd .tests/supported-tests |
100 | | - echo "Testing mbed-os-5.2.3" |
101 | | - cd mbed-os |
102 | | - mbed update --clean --clean-files "mbed-os-5.2.3" |
103 | | - mbed compile --supported |
104 | | - mbed compile --config --prefix mbed |
105 | | - mbed toolchain --supported |
106 | | - mbed target --supported |
107 | | - mbed export --supported |
108 | | - mbed test --compile-list |
109 | | - - run: |- |
110 | | - cd .tests/supported-tests |
111 | | - echo "Testing mbed-os-5.1.5" |
112 | | - cd mbed-os |
113 | | - mbed update --clean --clean-files "mbed-os-5.1.5" |
114 | | - mbed compile --supported |
115 | | - mbed compile --config --prefix mbed |
116 | | - mbed toolchain --supported |
117 | | - mbed target --supported |
118 | | - mbed export --supported |
119 | | - mbed test --compile-list |
120 | | -
|
121 | | - py3: |
122 | | - machine: true |
123 | | - steps: |
124 | | - - run: sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded |
125 | | - - run: sudo apt-get -y update |
126 | | - - run: sudo apt-get -y install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1 |
127 | | - - run: pyenv install 3.6.0 |
128 | | - - run: pyenv global 3.6.0 |
129 | | - |
130 | | - - run: python --version |
131 | | - - run: pip --version |
132 | | - - run: pip install pytest |
133 | | - - run: git config --global user.email "test@mbed.org" |
134 | | - - run: git config --global user.name "mbed Test" |
135 | | - - run: echo -e "[ui]\nusername = mbed Test <test@mbed.org>\n" > ~/.hgrc |
136 | | - - checkout |
137 | | - - run: pip install -e ./ |
138 | | - |
139 | | - - run: mbed --version |
140 | | - - run: py.test test |
141 | | - - run: mbed toolchain -G GCC_ARM |
142 | | - - run: mbed target -G K64F |
143 | | - - run: mbed config -G protocol ssh |
144 | | - |
145 | | - - run: mkdir .tests |
146 | | - - run: cd .tests && mbed new new-test |
147 | | - - run: |- |
148 | | - cd .tests/new-test/mbed-os |
149 | | - git checkout mbed-os-5.9.0 |
150 | | - - run: cd .tests/new-test && mbed ls |
151 | | - - run: cd .tests/new-test && mbed releases -r |
152 | | - - run: cd .tests/new-test && mbed compile --source=. --source=mbed-os/TESTS/integration/basic -j 0 |
153 | | - - run: cd .tests/new-test && mbed test --compile -n mbed-os-tests-integration-basic -j 0 |
154 | | - |
| 140 | + python27: |
| 141 | + docker: |
| 142 | + - image: python:2.7 |
| 143 | + steps: |
| 144 | + - run_tests |
| 145 | + - run_old_support_tests |
| 146 | + python36: |
| 147 | + docker: |
| 148 | + - image: python:3.6 |
| 149 | + steps: |
| 150 | + - run_tests |
| 151 | + python37: |
| 152 | + docker: |
| 153 | + - image: python:3.7 |
| 154 | + steps: |
| 155 | + - run_tests |
155 | 156 | workflows: |
156 | | - version: 2 |
157 | | - build: |
158 | | - jobs: |
159 | | - - py2 |
160 | | - - py3 |
| 157 | + version: 2 |
| 158 | + build: |
| 159 | + jobs: |
| 160 | + - python27 |
| 161 | + - python36 |
| 162 | + - python37 |
0 commit comments