Skip to content

Commit

Permalink
Preparation for release 4.0.0 rc2 (#1878)
Browse files Browse the repository at this point in the history
* Initial refactoring of the readme in preparation for Sming v4.0.0
* NON-OS SDK 3.0.1 is now the default SDK for Sming for the ESP8266 architecture.
Users can still switch to their preferred SDK by setting
the environment variable SDK_BASE to point to the location of their SDK.

For Linux that used to be

   export SDK_BASE=$ESP_HOME/sdk

And for Windows that used to be

   set SDK_BASE=$ESP_HOME/ESP8266_SDK

* Simplify the CI system and support officially only NON-OS SDK >= 3.0.1.

* Added TOC

* Don't compile basic blink before the coverity scan.
Otherwise the compiled code will not be included in the static code analysis results.

* Move Sming version information into `SmingVersion.h` (#31)

* Move Sming version information into `SmingVersion.h` and update to include pre-release tag

* 4.0.0-rc2

[scan:coverity]
  • Loading branch information
slaff authored Oct 15, 2019
1 parent 7c3ab02 commit bc6cffb
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 181 deletions.
9 changes: 1 addition & 8 deletions .appveyor/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ goto :%SMING_ARCH%

:Esp8266

IF "%SDK_VERSION%" == "1.5.0" (
choco install esp8266-udk --source https://www.myget.org/F/kireevco-chocolatey/ -y --no-progress
mkdir c:\Espressif\utils\ESP8266
copy /b c:\Espressif\utils\memanalyzer.exe c:\Espressif\utils\ESP8266\memanalyzer.exe
copy /b c:\Espressif\utils\esptool.exe c:\Espressif\utils\ESP8266\esptool.exe
) ELSE (
choco install esp8266-udk --source https://www.myget.org/F/sming/ -y --no-progress
)
choco install esp8266-udk --source https://www.myget.org/F/sming/ -y --no-progress

goto :EOF

Expand Down
10 changes: 1 addition & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ jobs:
- graphviz-dev
env: SMING_ARCH=Host

- stage: build
os: linux
env: SMING_ARCH=Esp8266 SDK_VERSION=1.5.0

- stage: build
os: linux
env: SMING_ARCH=Esp8266 SDK_VERSION=2.0.0

- stage: build
os: linux
env: SMING_ARCH=Esp8266 SDK_VERSION=3.0.1
Expand Down Expand Up @@ -70,7 +62,7 @@ deploy:
skip_cleanup: true
on:
tags: true
condition: "$SDK_VERSION==2.0.0"
condition: "$SDK_VERSION==3.0.1"

notifications:
webhooks:
Expand Down
20 changes: 13 additions & 7 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ set -ex # exit with nonzero exit code if anything fails
# Build times benefit from parallel building
export MAKE_PARALLEL="make -j3"

env
unset SPIFFY
unset ESPTOOL2
unset SDK_BASE
env

export SMING_HOME=$TRAVIS_BUILD_DIR/Sming

Expand All @@ -27,10 +28,6 @@ fi
# Setup ARCH SDK paths
if [ "$SMING_ARCH" == "Esp8266" ]; then
export ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-alt-sdk
if [ "$SDK_VERSION" == "3.0.1" ]; then
export SDK_BASE=$SMING_HOME/third-party/ESP8266_NONOS_SDK
fi

export PATH=$PATH:$ESP_HOME/xtensa-lx106-elf/bin:$ESP_HOME/utils/
fi

Expand All @@ -48,13 +45,22 @@ cd $SMING_PROJECTS_DIR/samples/Basic_Blink
make help
make list-config

# Check if we could run static code analysis
CHECK_SCA=0
if [[ $TRAVIS_COMMIT_MESSAGE == *"[scan:coverity]"* && $TRAVIS_PULL_REQUEST != "true" ]]; then
CHECK_SCA=1
fi


# This will build the Basic_Blink application and most of the framework Components
$MAKE_PARALLEL
if [[ $CHECK_SCA -eq 0 ]]; then
$MAKE_PARALLEL
fi

cd $SMING_HOME

if [ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]; then
if [[ $TRAVIS_COMMIT_MESSAGE == *"[scan:coverity]"* && $TRAVIS_PULL_REQUEST != "true" ]]; then
if [[ $CHECK_SCA -eq 1 ]]; then
$TRAVIS_BUILD_DIR/.travis/coverity-scan.sh
else
$MAKE_PARALLEL Basic_DateTime Basic_Delegates Basic_Interrupts Basic_ProgMem Basic_Serial Basic_Servo Basic_Ssl LiveDebug DEBUG_VERBOSE_LEVEL=3
Expand Down
20 changes: 1 addition & 19 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,11 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]; then
fi

if [ "$SMING_ARCH" == "Esp8266" ]; then
if [ "$SDK_VERSION" == "1.5.0" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-macos-x86_64.zip"
fi

if [ "$SDK_VERSION" == "1.5.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-linux-x86_64.tar.gz"
fi

mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk

if [ "$SDK_VERSION" == "1.5.0" ]; then
wget --no-verbose https://bintray.com/artifact/download/kireevco/generic/${SDK_FILE_NAME}
bsdtar -xf ${SDK_FILE_NAME} -C $TRAVIS_BUILD_DIR/opt/esp-alt-sdk
fi

if [ "$SDK_VERSION" != "1.5.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget --no-verbose https://github.com/nodemcu/nodemcu-firmware/raw/2d958750b56fc60297f564b4ec303e47928b5927/tools/esp-open-sdk.tar.xz
tar -Jxvf esp-open-sdk.tar.xz; ln -s $(pwd)/esp-open-sdk/xtensa-lx106-elf $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/.
fi

if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget --no-verbose https://www.espressif.com/sites/default/files/sdks/esp8266_nonos_sdk_v2.0.0_16_08_10.zip -O sdk.zip
unzip sdk.zip
ln -s $(pwd)/ESP8266_NONOS_SDK/ $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/sdk
fi
fi # Esp8266
266 changes: 138 additions & 128 deletions Readme.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Sming/Arch/Esp8266/Components/esp8266/component.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# base directory of the ESP8266 SDK package, absolute
COMPONENT_VARS := SDK_BASE

SDK_BASE ?= $(COMPONENT_PATH)/ESP8266_NONOS_SDK

ifeq ($(UNAME),Windows)
SDK_BASE ?= $(ESP_HOME)/ESP8266_SDK
SDK_TOOLS ?= $(ESP_HOME)/utils
else
SDK_BASE ?= $(ESP_HOME)/sdk
SDK_TOOLS ?= $(SDK_BASE)/tools
endif

Expand Down
2 changes: 1 addition & 1 deletion Sming/Core/SmingCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#pragma once

#define SMING_VERSION "3.8.0" // Major Minor Sub
#include "SmingVersion.h"

#include "gdb/gdb_hooks.h"
#include "WiringFrameworkIncludes.h"
Expand Down
19 changes: 19 additions & 0 deletions Sming/Core/SmingVersion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Sming version information
*
* https://github.com/semver/semver/blob/master/semver.md
*
*/

#define SMING_MAJOR_VERSION 4
#define SMING_MINOR_VERSION 0
#define SMING_PATCH_VERSION 0
#define SMING_PRE_RELEASE "-rc2"

#define MACROQUOT(x) #x
#define MACROQUOTE(x) MACROQUOT(x)

// Version string, e.g. 3.8.0-dev
#define SMING_VERSION \
MACROQUOTE(SMING_MAJOR_VERSION) \
"." MACROQUOTE(SMING_MINOR_VERSION) "." MACROQUOTE(SMING_PATCH_VERSION) SMING_PRE_RELEASE
2 changes: 1 addition & 1 deletion Sming/Services/CommandProcessing/CommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "CommandHandler.h"
#include "CommandDelegate.h"
#include "SmingCore.h" // SMING_VERSION
#include <SmingVersion.h>

#ifndef LWIP_HASH_STR
#define LWIP_HASH_STR ""
Expand Down
7 changes: 1 addition & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ environment:
- build_platform: "x86"
build_compiler: "mingw"
SMING_ARCH: Esp8266
SDK_VERSION: 2.0.0

- build_platform: "x86"
build_compiler: "mingw"
SMING_ARCH: Esp8266
SDK_VERSION: 1.5.0
SDK_VERSION: 3.0.1

# cache:
# - src/ # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
Expand Down

0 comments on commit bc6cffb

Please sign in to comment.