-
Notifications
You must be signed in to change notification settings - Fork 682
Add Travis CI jobs for build testing several targets #2102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dbatyai
merged 1 commit into
jerryscript-project:master
from
akosthekiss:travis-targets
Nov 16, 2017
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the ESP8266 JerryScript target. | ||
|
||
# Install tools via apt. | ||
install-apt-get-deps: | ||
sudo apt-get install -q -y gperf texinfo wget | ||
|
||
# Fetch and build crosstool-NG with support for Xtensa. | ||
install-xtensa-kx106-gcc: | ||
git clone https://github.com/jcmvbkbc/crosstool-NG.git ../crosstool-NG -b lx106-g++-1.21.0 | ||
cd ../crosstool-NG && ./bootstrap | ||
cd ../crosstool-NG && ./configure --enable-local | ||
$(MAKE) -C ../crosstool-NG --no-print-directory -Rr # HACK: without the command line arguments, make bails out with recursion error | ||
cd ../crosstool-NG && ./ct-ng xtensa-lx106-elf | ||
cd ../crosstool-NG && ./ct-ng build | ||
|
||
# Fetch Espressif SDK and Xtensa libraries. | ||
install-espressif-sdk: | ||
git clone https://github.com/espressif/ESP8266_RTOS_SDK.git ../ESP8266_SDK | ||
cd ../ESP8266_SDK && git checkout 2fab9e23d779cdd6e5900b8ba2b588e30d9b08c4 | ||
wget https://github.com/esp8266/esp8266-wiki/raw/master/libs/libhal.a -O ../ESP8266_SDK/lib/libhal.a | ||
|
||
# Perform all the necessary (JerryScript-independent) installation steps. | ||
install: install-apt-get-deps install-xtensa-kx106-gcc install-espressif-sdk | ||
|
||
|
||
## Targets for building ESP8266 with JerryScript. | ||
|
||
# Build the firmware (ESP8266 with JerryScript). | ||
script: | ||
PATH=$(CURDIR)/../crosstool-NG/builds/xtensa-lx106-elf/bin:$$PATH $(MAKE) -f ./targets/esp8266/Makefile.esp8266 BIN_PATH=build/obj-esp8266 SDK_PATH=$(CURDIR)/../ESP8266_SDK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the Mbed JerryScript target. | ||
|
||
# Install tools via apt. | ||
install-apt-get-deps: | ||
sudo apt-get install -q -y ninja-build libffi-dev libssl-dev | ||
|
||
# Install yotta | ||
install-yotta: | ||
pip install --user yotta | ||
|
||
# Perform all the necessary (JerryScript-independent) installation steps. | ||
install: install-apt-get-deps install-yotta | ||
|
||
|
||
## Targets for building Mbed with JerryScript. | ||
|
||
# Build the firmware (Mbed with JerryScript). | ||
script: | ||
$(MAKE) -f targets/mbed/Makefile.mbed board=k64f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the Mbed OS 5 JerryScript target. | ||
|
||
# Deploy Mbed and install Mbed Python dependencies. | ||
install: | ||
pip install --user mbed-cli | ||
cd targets/mbedos5 && mbed deploy | ||
pip install --user -r targets/mbedos5/mbed-os/requirements.txt | ||
|
||
|
||
## Targets for building Mbed OS 5 with JerryScript. | ||
|
||
# Build the firmware (Mbed OS 5 with JerryScript). | ||
script: | ||
pip install --user -r targets/mbedos5/tools/requirements.txt | ||
# HACK: `EXTRA_SRC[_MOD]` are abused to pass `--library` to `mbed compile` in the `all` make target that builds an app | ||
# HACK: this is needed because the Mbed OS 5 target code does not contain any `main` function, so the `all` make target does not link | ||
# HACK: but the `library` make target does not build either because the launcher sources require `jerry-targetjs.h` that are explicitly not generated for libraries | ||
$(MAKE) -C targets/mbedos5 BOARD=K64F EXTRA_SRC=dummy EXTRA_SRC_MOD=--library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the NuttX JerryScript target. | ||
|
||
# Install cross-compiler and tools via apt. | ||
install-apt-get-deps: | ||
sudo apt-get install -q -y gcc-arm-none-eabi gperf | ||
|
||
# Fetch and build kconfig-frontends (kconfig-conf) from nuttx/tools. | ||
LOCAL_INSTALL:=$(CURDIR)/../local/ | ||
|
||
install-kconfig: | ||
git clone https://bitbucket.org/nuttx/tools.git ../tools | ||
mkdir -p $(LOCAL_INSTALL) | ||
cd ../tools/kconfig-frontends && ./configure --disable-mconf --disable-nconf --disable-gconf --disable-qconf --disable-utils --disable-shared --enable-static --prefix=$(LOCAL_INSTALL) | ||
$(MAKE) -C ../tools/kconfig-frontends | ||
$(MAKE) -C ../tools/kconfig-frontends install | ||
|
||
# Fetch nuttx/{apps,nuttx} repositories. | ||
install-clone-nuttx: | ||
git clone https://bitbucket.org/nuttx/apps.git ../apps -b nuttx-7.22 | ||
git clone https://bitbucket.org/nuttx/nuttx.git ../nuttx -b nuttx-7.22 | ||
|
||
# Perform all the necessary (JerryScript-independent) installation steps. | ||
install: install-apt-get-deps install-kconfig install-clone-nuttx | ||
|
||
|
||
## Targets for building NuttX with JerryScript. | ||
|
||
# Link in the NuttX JerryScript target directory under the NuttX apps tree. | ||
script-add-jerryscript-app: | ||
ln -s ../../jerryscript/targets/nuttx-stm32f4 ../apps/interpreters/jerryscript | ||
|
||
# Configure USB shell. | ||
script-configure-usbnsh: | ||
cd ../nuttx/tools && PATH=$(LOCAL_INSTALL)/bin:$$PATH ./configure.sh stm32f4discovery/usbnsh | ||
|
||
# Configure and build the firmware (NuttX with JerryScript). | ||
script: script-add-jerryscript-app script-configure-usbnsh | ||
echo 'CONFIG_HOST_LINUX=y' >> ../nuttx/.config | ||
echo 'CONFIG_ARCH_FPU=y' >> ../nuttx/.config | ||
echo 'CONFIG_JERRYSCRIPT=y'>> ../nuttx/.config | ||
PATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx olddefconfig | ||
PATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the RIOT JerryScript target. | ||
|
||
# Install cross-compiler via apt. | ||
install-apt-get-deps: | ||
sudo apt-get install -q -y gcc-arm-none-eabi | ||
|
||
# Fetch RIOT OS repository. | ||
install-clone-riot: | ||
git clone git://github.com/RIOT-OS/RIOT.git ../RIOT -b 2017.10 | ||
|
||
# Perform all the necessary (JerryScript-independent) installation steps. | ||
install: install-apt-get-deps install-clone-riot | ||
|
||
|
||
## Targets for building RIOT with JerryScript. | ||
|
||
# Build the firmware (RIOT with JerryScript). | ||
script: | ||
$(MAKE) -f ./targets/riot-stm32f4/Makefile.riot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Default target for running the build test outside the Travis CI environment. | ||
all: | ||
$(MAKE) install | ||
$(MAKE) script | ||
|
||
|
||
## Targets for installing build dependencies of the Tizen RT JerryScript target. | ||
|
||
# Fetch Tizen RT repository. | ||
install: | ||
git clone https://github.com/Samsung/TizenRT.git ../TizenRT -b 1.1_Public_Release | ||
|
||
|
||
## Targets for building Tizen RT with JerryScript. | ||
|
||
# Link in files from the Tizen RT JerryScript target directory under the Tizen RT tree. | ||
script-add-jerryscript: | ||
cp -R targets/tizenrt-artik053/apps/jerryscript/ ../TizenRT/apps/system/ | ||
cp -R targets/tizenrt-artik053/configs/jerryscript/ ../TizenRT/build/configs/artik053/ | ||
cp -R targets/tizenrt-artik053/romfs-1.1.patch ../TizenRT/ | ||
|
||
# Build the JerryScript library. | ||
script-libjerry: | ||
$(MAKE) -f targets/tizenrt-artik053/Makefile.tizenrt | ||
|
||
# Configure and build the firmware (Tizen RT with JerryScript). | ||
script: script-add-jerryscript script-libjerry | ||
cd ../TizenRT/os/tools && ./configure.sh artik053/jerryscript | ||
cd ../TizenRT && patch -p1 <romfs-1.1.patch | ||
mkdir -p ../TizenRT/build/output/res | ||
$(MAKE) -C ../TizenRT/os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/apps/system/init/init.c b/apps/system/init/init.c | ||
index 3aaa1860..815a9c11 100644 | ||
--- a/apps/system/init/init.c | ||
+++ b/apps/system/init/init.c | ||
@@ -139,6 +139,10 @@ int preapp_start(int argc, char *argv[]) | ||
} | ||
#endif | ||
|
||
+#ifdef CONFIG_FS_ROMFS | ||
+ mount("/dev/smart4rom9", "/rom", "romfs", 0, NULL); | ||
+#endif | ||
+ | ||
#if defined(CONFIG_LIB_USRWORK) || defined(CONFIG_TASH) | ||
error_out: | ||
return pid; | ||
diff --git a/build/configs/artik053/artik053_download.sh b/build/configs/artik053/artik053_download.sh | ||
index 0fa4b9a3..a3178545 100755 | ||
--- a/build/configs/artik053/artik053_download.sh | ||
+++ b/build/configs/artik053/artik053_download.sh | ||
@@ -111,6 +111,7 @@ main() | ||
flash_write sssfw ../../bin/sssfw.bin; \ | ||
flash_write wlanfw ../../bin/wlanfw.bin; \ | ||
flash_write os ../../../../output/bin/tinyara_head.bin; \ | ||
+ flash_write rom ../../../../output/bin/rom.img; \ | ||
exit' || finish_download 1 | ||
popd | ||
|
||
diff --git a/build/configs/artik053/tools/openocd/partition_map.cfg b/build/configs/artik053/tools/openocd/partition_map.cfg | ||
index c3abdeff..8dca6666 100644 | ||
--- a/build/configs/artik053/tools/openocd/partition_map.cfg | ||
+++ b/build/configs/artik053/tools/openocd/partition_map.cfg | ||
@@ -18,7 +18,8 @@ set partition_list { | ||
os { "OS" 0x040C8000 0x00258000 0 } | ||
factory { "Factory Reset" 0x04320000 0x00180000 0 } | ||
ota { "OTA download" 0x044A0000 0x00180000 0 } | ||
- user { "USER R/W" 0x04620000 0x0015E000 0 } | ||
+ user { "USER R/W" 0x04620000 0x000FA000 0 } | ||
+ rom { "ROM FS" 0x0471A000 0x00064000 0 } | ||
nvram { "WiFi NVRAM" 0x0477E000 0x00002000 1 } | ||
sssrw { "SSS R/W Key" 0x04780000 0x00080000 1 } | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add
install
target as a dependency of this target to prevent the parallel "build" ofscript
andinstall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you agree in my opinion, then please do it in the other new makefiles too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That never happens (I mean the parallel execution of script and install). If
all
is called as the default target of make, then it explicitly lists the order of execution by invoking sub-makes in a specific order (install, script). While.travis.yml
calls make twice, first withinstall
target in theinstall
stage and then withscript
target in script stage. (The make targets intentionally reflect the names of the Travis CI job stage names to highlight which target is called in which stage.) Ifinstall
was a dependency ofscript
,install
would run again in script stage.See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now, why you did it in this way. It is good, leave as is.