Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

sudo: required

language:
- c

jobs:
include:
- os: linux
dist: bionic
env: TEST_M32=0
- os: linux
dist: bionic
env: TEST_M32=1
- os: osx
env: TEST_M32=0

install:
- true

script:
- ./tools/travis/travis.sh
3 changes: 3 additions & 0 deletions boards/sim/sim/sim/configs/ostest/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ CONFIG_ARCH_BOARD="sim"
CONFIG_ARCH_BOARD_SIM=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems out of place with the other commits in the PR. Perhaps it should be a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is required by other changes as otherwise ./nuttx just hangs after running the tests.

CONFIG_ARCH_CHIP="sim"
CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BOARD_LOOPSPERMSEC=100
CONFIG_DEBUG_SYMBOLS=y
CONFIG_FS_NAMED_SEMAPHORES=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=64
CONFIG_NFILE_DESCRIPTORS=32
CONFIG_PTHREAD_MUTEX_TYPES=y
Expand All @@ -27,5 +29,6 @@ CONFIG_START_MONTH=2
CONFIG_START_YEAR=2007
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_OSTEST_LOOPS=100
CONFIG_TESTING_OSTEST_POWEROFF=y
CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_USER_ENTRYPOINT="ostest_main"
73 changes: 73 additions & 0 deletions tools/travis/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#! /bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLEASE FIX: All .sh files reequire (currently) a BSD 3-clause license. No unlicensed shell scripts may come in.

(License will, eventually, be changed to Apache).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added apache license


# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

set -e
set -x

HOSTOS=$(uname -s)

case $HOSTOS in
Linux)
sudo apt-get update -q
sudo apt-get install -y gperf
if [ $TEST_M32 -ne 0 ]; then
sudo apt-get install -y gcc-multilib
fi
MAKE=make
CONFIGURE_HOSTOS=-l
;;
Darwin)
MAKE=make
CONFIGURE_HOSTOS=-m
;;
*)
echo Unknown OS: $HOSTOS
exit 1
;;
esac

ORIG_DIR=$(pwd)

cd ..
git clone --depth=1 https://github.com/apache/incubator-nuttx-apps apps
git clone --depth=1 https://github.com/nuttx/tools

cd tools/kconfig-frontends
./configure --disable-kconfig --disable-nconf --disable-qconf \
--disable-gconf --disable-mconf --disable-static --disable-shared \
--disable-L10n --disable-utils
${MAKE}
sudo ${MAKE} install
cd ..

cd ${ORIG_DIR}
# git-based versioning doesn't always work because
# travis only clones the repo with shallow history.
mv .git .git.bak
cp tools/travis/version .version
./tools/configure.sh ${CONFIGURE_HOSTOS} sim:ostest
if [ $TEST_M32 -ne 0 ]; then
echo CONFIG_SIM_M32=y >> .config
${MAKE} oldconfig
fi
echo ===== .config START =====
cat .config
echo ===== .config END =====
${MAKE}
./nuttx
23 changes: 23 additions & 0 deletions tools/travis/version
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

CONFIG_VERSION_STRING="Travis-CI"
CONFIG_VERSION_MAJOR=0
CONFIG_VERSION_MINOR=0
CONFIG_VERSION_BUILD="0000000000"