Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 6, 2018. It is now read-only.

Commit f0202db

Browse files
committed
ci: add examples to build
1 parent e68c30c commit f0202db

File tree

3 files changed

+58
-4
lines changed

3 files changed

+58
-4
lines changed

‎.travis.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ before_install:
2222
- sudo apt-get install python3 python3-pip
2323
- sudo pip3 install tcore
2424
- tcore bootstrap -n
25-
- mkdir ~/.theCore && ln -s "$(pwd)" ~/.theCore/theCore
25+
# Trick tcore scripts into thinking that theCore is already installed
26+
- |
27+
mkdir ~/.theCore
28+
ln -s "$(pwd)" ~/.theCore/theCore
29+
touch ~/.theCore/installfile.json
30+
ls -l ~/.theCore/theCore
2631
- |
2732
if [ "$TRAVIS_BRANCH" == "develop" -a "$TRAVIS_EVENT_TYPE" == "cron" ]; then
2833
nix-env --delete-generations old
@@ -33,10 +38,13 @@ before_install:
3338
install:
3439
- . ~/.nix-profile/etc/profile.d/nix.sh
3540
- nix-shell -Q --arg docs true --run true
41+
# Essentially the same as previous line. This will make sure that everything works fine
3642
- tcore runenv -a "docs true" -- echo "Dependencies installed"
3743

3844
script:
3945
- tcore runenv -a "docs true" -- ./scripts/ci_test.sh
46+
# tore script will be executed *inside* ci_examples.sh
47+
- ./scripts/ci_examples.sh
4048

4149
after_success:
4250
- tcore runenv -a "docs true" -- ./scripts/doc_deploy.sh

‎CMakeLists.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ if(NOT DEFINED THECORE_TARGET_CONFIG_FILE AND NOT CMAKE_CROSSCOMPILING)
6161
CACHE PATH "Test JSON file")
6262
endif()
6363

64-
if(NOT EXISTS ${THECORE_TARGET_CONFIG_FILE})
64+
if(NOT EXISTS "${THECORE_TARGET_CONFIG_FILE}")
6565
msg_warn("Invalid JSON config file: ${THECORE_TARGET_CONFIG_FILE}")
6666
else()
67-
file(READ ${THECORE_TARGET_CONFIG_FILE} THECORE_JSON_BODY)
67+
file(READ "${THECORE_TARGET_CONFIG_FILE}" THECORE_JSON_BODY)
6868
# Lower case for better readability.
6969
sbeParseJson(thecore_cfg THECORE_JSON_BODY)
70-
string(TOLOWER ${thecore_cfg.menu-platform.config-name} CONFIG_PLATFORM)
70+
string(TOLOWER "${thecore_cfg.menu-platform.config-name}" CONFIG_PLATFORM)
7171
endif()
7272

7373
msg_trace("Checking [CONFIG_PLATFORM]: ${CONFIG_PLATFORM}")

‎scripts/ci_examples.sh‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/sh
2+
3+
set -v # Be verbose
4+
5+
mkdir build_examples
6+
cd build_examples
7+
8+
tcore init --remote https://github.com/theCore-embedded/example_hello_world
9+
tcore init --remote https://github.com/theCore-embedded/example_blinky
10+
tcore init --remote https://github.com/theCore-embedded/example_button_interrupt
11+
tcore init --remote https://github.com/theCore-embedded/example_sensor_htu21d
12+
tcore init --remote https://github.com/theCore-embedded/example_fatfs
13+
tcore init --remote https://github.com/theCore-embedded/example_cs43l22_audio
14+
tcore init --remote https://github.com/theCore-embedded/example_hm10_bluetooth
15+
16+
# Hello world example
17+
18+
tcore compile --source ./example_hello_world --target host
19+
tcore compile --source ./example_hello_world --target stm32f4_disc
20+
tcore compile --source ./example_hello_world --target tiva_tm4c_launchpad
21+
22+
# Blinky
23+
24+
tcore compile --source ./example_blinky --target stm32f4_disc
25+
tcore compile --source ./example_blinky --target tiva_tm4c_launchpad
26+
27+
# EXTI example
28+
29+
tcore compile --source ./example_button_interrupt --target stm32f4_disc
30+
tcore compile --source ./example_button_interrupt --target tiva_tm4c_launchpad
31+
32+
# HTU21D
33+
34+
tcore compile --source ./example_sensor_htu21d --target stm32f4_disc
35+
36+
# FATFS over SDSPI
37+
38+
tcore compile --source ./example_fatfs --target tiva_tm4c_launchpad
39+
40+
# CS43L22 on STM32F4 discovery
41+
42+
tcore compile --source ./example_cs43l22_audio --target stm32f4_disc
43+
44+
# BT using HM-10 module
45+
46+
tcore compile --source ./example_hm10_bluetooth --target stm32f4_disc

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /