diff options
-rw-r--r-- | Jenkinsfile | 111 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/USB_HOST/halconf.h | 2 | ||||
-rwxr-xr-x | tools/chbuild.sh | 7 |
3 files changed, 105 insertions, 15 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 1368b36..ed69d14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,26 +9,113 @@ pipeline { } steps { - sh 'exit 0' + sh '''echo $CH_BRANCH +echo $CH_PATH +echo $CHC_PATH + +exit 0''' } } stage('Build STM32') { - agent { - docker { - image 'fpoussin/jenkins:ubuntu-18.04-arm' + parallel { + stage('Build STM32') { + agent { + docker { + image 'fpoussin/jenkins:ubuntu-18.04-arm' + } + + } + steps { + sh '''arm-none-eabi-gcc -v + +rm -rf $CH_PATH +git clone -b $CH_BRANCH --single-branch https://github.com/ChibiOS/ChibiOS.git $CH_PATH + +cd $CH_PATH/ext +for i in *.7z; do 7z x -y $i; done''' + sh '''export CH_PATH=$WORKSPACE/ChibiOS +export CHC_PATH=$WORKSPACE + +./tools/chbuild.sh ./testhal/STM32/ +./tools/chbuild.sh ./demos/STM32/''' + } } + stage('Build NRF51') { + agent { + docker { + image 'fpoussin/jenkins:ubuntu-18.04-arm' + } - } - steps { - sh '''mkdir /tmp/contrib_$EXECUTOR_NUMBER + } + steps { + sh '''arm-none-eabi-gcc -v + +rm -rf $CH_PATH +git clone -b $CH_BRANCH --single-branch https://github.com/ChibiOS/ChibiOS.git $CH_PATH + +cd $CH_PATH/ext +for i in *.7z; do 7z x -y $i; done +''' + sh '''export CH_PATH=$WORKSPACE/ChibiOS +export CHC_PATH=$WORKSPACE -cp -r $WORKSPACE/* $WORKSPACE/.git /tmp/contrib_$EXECUTOR_NUMBER +./tools/chbuild.sh ./testhal/NRF51/ +./tools/chbuild.sh ./demos/NRF51/ +''' + } + } + stage('Build NRF52') { + agent { + docker { + image 'fpoussin/jenkins:ubuntu-18.04-arm' + } + + } + steps { + sh '''arm-none-eabi-gcc -v + +rm -rf $CH_PATH +git clone -b $CH_BRANCH --single-branch https://github.com/ChibiOS/ChibiOS.git $CH_PATH + +cd $CH_PATH/ext +for i in *.7z; do 7z x -y $i; done +''' + sh '''export CH_PATH=$WORKSPACE/ChibiOS +export CHC_PATH=$WORKSPACE + +./tools/chbuild.sh ./testhal/NRF52/ +./tools/chbuild.sh ./demos/NRF52/ +''' + } + } + stage('Build Kinetis') { + agent { + docker { + image 'fpoussin/jenkins:ubuntu-18.04-arm' + } -cp -r /tmp/contrib_$EXECUTOR_NUMBER $WORKSPACE/''' - sh '''git -C $WORKSPACE/ChibiOS-RT pull || git clone -b stable_19.1.x --single-branch https://github.com/ChibiOS/ChibiOS.git $WORKSPACE/ChibiOS-RT -cd $WORKSPACE/contrib_$EXECUTOR_NUMBER -bash ./tools/chbuild.sh ./testhal/STM32/''' + } + steps { + sh '''arm-none-eabi-gcc -v + +rm -rf $CH_PATH +git clone -b $CH_BRANCH --single-branch https://github.com/ChibiOS/ChibiOS.git $CH_PATH + +cd $CH_PATH/ext +for i in *.7z; do 7z x -y $i; done''' + sh '''export CH_PATH=$WORKSPACE/ChibiOS +export CHC_PATH=$WORKSPACE + +./tools/chbuild.sh ./testhal/KINETIS/ +./tools/chbuild.sh ./demos/KINETIS/ +''' + } + } } } } + environment { + CH_BRANCH = 'stable_18.2.x' + CH_PATH = 'ChibiOS' + } }
\ No newline at end of file diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h index 33f3f94..24a2af7 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h @@ -139,7 +139,7 @@ * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC TRUE #endif /** diff --git a/tools/chbuild.sh b/tools/chbuild.sh index 6323dcb..0340114 100755 --- a/tools/chbuild.sh +++ b/tools/chbuild.sh @@ -11,7 +11,6 @@ JOBS=$(grep -c ^processor /proc/cpuinfo) SKIP_ARRAY=(Win32) RETCODE=0 - function test_skip { Array=$1 SKIP=0 @@ -42,7 +41,11 @@ function chbuild { fi pushd $t > /dev/null printf "BUILDING: ${t}\n" - make --quiet -j $JOBS > /dev/null + if [[ -z "$CH_PATH" && -z "$CHC_PATH" ]]; then + make --quiet -j $JOBS > /dev/null + else + make CHIBIOS=$CH_PATH CHIBIOS_CONTRIB=$CHC_PATH --quiet -j $JOBS > /dev/null + fi if [ $? -ne 0 ]; then ((NOK++)) FAIL+=($t) |