diff --git a/HISTORY.rst b/HISTORY.rst index a9f78dca..be12b2be 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,6 +18,8 @@ PlatformIO 2.0 2.9.2 (2016-??-??) ~~~~~~~~~~~~~~~~~~ +* Simplified documentation for `Continuous Integration with AppVeyor `__ + (`issue #671 `_) * Added support for Silicon Labs SLSTK3401A (Pearl Gecko) and MultiTech mDot F411 ARM mbed based boards * Added support for MightyCore ATmega8535 board @@ -670,7 +672,7 @@ PlatformIO 1.0 (`issue #183 `_) * Added GDB as alternative uploader to `ststm32 `__ platform (`issue #175 `_) -* Added `examples `__ +* Added `examples `__ with preconfigured IDE projects (`issue #154 `_) * Fixed firmware uploading under Linux OS for Arduino Leonardo board diff --git a/README.rst b/README.rst index 32f07e81..7976f9ac 100644 --- a/README.rst +++ b/README.rst @@ -16,11 +16,8 @@ PlatformIO .. image:: https://img.shields.io/pypi/l/platformio.svg :target: https://pypi.python.org/pypi/platformio/ :alt: License -.. image:: https://img.shields.io/pypi/dm/platformio.svg - :target: https://pypi.python.org/pypi/platformio/ - :alt: PyPi Downloads .. image:: https://img.shields.io/community/PlatformIO.png - :alt: Join the chat at https://gitter.im/platformio/platformio + :alt: Community Forums :target: https://community.platformio.org .. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow :alt: Donate for PlatformIO.Org @@ -29,7 +26,7 @@ PlatformIO `Home `_ | `IDE `_ | -`Project Examples `_ | +`Project Examples `_ | `Docs `_ | `Twitter `_ | `Facebook `_ | diff --git a/appveyor.yml b/appveyor.yml index cd09e534..a04e1904 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,27 +1,13 @@ build: off environment: - global: - WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\appveyor\\run_with_compiler.cmd" + matrix: - TOXENV: "py27" - TOXPYTHON: "C:\\Python27-x64\\python.exe" - WINDOWS_SDK_VERSION: "v7.0" - PYTHON_HOME: "C:\\Python27-x64" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "64" - -init: - - "ECHO %TOXENV%" - - ps: "ls C:\\Python*" - + install: - - "git submodule update --init --recursive" - - "powershell scripts\\appveyor\\install.ps1" - -before_test: - - cmd: SET PATH=%PATH%;C:\MinGW\bin - + - cmd: git submodule update --init --recursive + - cmd: SET PATH=%PATH%;C:\Python27\Scripts + - cmd: pip install tox + test_script: - - "%PYTHON_HOME%\\Scripts\\tox --version" - - "%PYTHON_HOME%\\Scripts\\pip --version" - - "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox" + - cmd: tox diff --git a/docs/ci/appveyor.rst b/docs/ci/appveyor.rst index b79c690f..2fc919dd 100644 --- a/docs/ci/appveyor.rst +++ b/docs/ci/appveyor.rst @@ -44,142 +44,20 @@ Put ``appveyor.yml`` to the root directory of the GitHub repository. build: off environment: - global: - WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\appveyor\\run_with_compiler.cmd" - matrix: - - PLATFORMIO_CI_SRC: "path\\to\\source\\file.c" - PLATFORMIO_CI_SRC: "path\\to\\source\\file.ino" - PLATFORMIO_CI_SRC: "path\\to\\source\\directory" - WINDOWS_SDK_VERSION: "v7.0" - PYTHON_HOME: "C:\\Python27-x64" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "64" - install: - - "git submodule update --init --recursive" - - "powershell scripts\\appveyor\\install.ps1" - before_test: - - cmd: SET PATH=%PATH%;%PYTHON_HOME%;%PYTHON_HOME%\Scripts - test_script: - - '%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N' + matrix: + - PLATFORMIO_CI_SRC: "path\\to\\source\\file.c" + - PLATFORMIO_CI_SRC: "path\\to\\source\\file.ino" + - PLATFORMIO_CI_SRC: "path\\to\\source\\directory" -Then create ``scripts/appveyor`` folder and put these 2 scripts (they are the -same for the all projects, don't need to modify them): + install: + - cmd: git submodule update --init --recursive + - cmd: SET PATH=%PATH%;C:\Python27\Scripts + - cmd: pip install -U platformio -1. ``scripts/appveyor/install.ps1``: + test_script: + - cmd: platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N -.. code-block:: PowerShell - - $BASE_URL = "https://www.python.org/ftp/python/" - $GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py" - $GET_PIP_PATH = "C:\get-pip.py" - - - function DownloadPython ($python_version, $platform_suffix) { - $webclient = New-Object System.Net.WebClient - $filename = "python-" + $python_version + $platform_suffix + ".msi" - $url = $BASE_URL + $python_version + "/" + $filename - - $basedir = $pwd.Path + "\" - $filepath = $basedir + $filename - if (Test-Path $filename) { - Write-Host "Reusing" $filepath - return $filepath - } - - # Download and retry up to 5 times in case of network transient errors. - Write-Host "Downloading" $filename "from" $url - $retry_attempts = 3 - for($i=0; $i -lt $retry_attempts; $i++){ - try { - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - Write-Host "File saved at" $filepath - return $filepath - } - - - function InstallPython ($python_version, $architecture, $python_home) { - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "" - } else { - $platform_suffix = ".amd64" - } - $filepath = DownloadPython $python_version $platform_suffix - Write-Host "Installing" $filepath "to" $python_home - $args = "/qn /i $filepath TARGETDIR=$python_home" - Write-Host "msiexec.exe" $args - Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait -Passthru - Write-Host "Python $python_version ($architecture) installation complete" - return $true - } - - - function InstallPip ($python_home) { - $python_path = $python_home + "/python.exe" - Write-Host "Installing pip..." - $webclient = New-Object System.Net.WebClient - $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH) - Write-Host "Executing:" $python_path $GET_PIP_PATH - Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru - } - - function InstallPackage ($python_home, $pkg) { - $pip_path = $python_home + "/Scripts/pip.exe" - & $pip_path install -U $pkg - } - - function main () { - InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON_HOME - InstallPip $env:PYTHON_HOME - InstallPackage $env:PYTHON_HOME setuptools - InstallPackage $env:PYTHON_HOME platformio - } - - main - -2. ``scripts/appveyor/run_with_compiler.cmd``: - -.. code-block:: guess - - @ECHO OFF - - SET COMMAND_TO_RUN=%* - SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows - - SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" - IF %MAJOR_PYTHON_VERSION% == "2" ( - SET WINDOWS_SDK_VERSION="v7.0" - ) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( - SET WINDOWS_SDK_VERSION="v7.1" - ) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 - ) - - IF "%PYTHON_ARCH%"=="64" ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) For more details as for PlatformIO build process please look into :ref:`cmd_ci` command. @@ -194,20 +72,16 @@ Examples build: off environment: - global: - WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\appveyor\\run_with_compiler.cmd" - matrix: - - PLATFORMIO_CI_SRC: "examples\\Bluetooth\\PS3SPP\\PS3SPP.ino" - PLATFORMIO_CI_SRC: "examples\\pl2303\\pl2303_gps\\pl2303_gps.ino" - WINDOWS_SDK_VERSION: "v7.0" - PYTHON_HOME: "C:\\Python27-x64" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "64" - install: - - "git submodule update --init --recursive" - - "powershell scripts\\appveyor\\install.ps1" - before_test: - - cmd: SET PATH=%PATH%;%PYTHON_HOME%;%PYTHON_HOME%\Scripts - - cmd: git clone https://github.com/xxxajk/spi4teensy3.git c:\spi4teensy - test_script: - - '%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\platformio ci --lib="." --lib="c:\spi4teensy" --board=uno --board=teensy31 --board=due' + + matrix: + - PLATFORMIO_CI_SRC: "examples\\Bluetooth\\PS3SPP\\PS3SPP.ino" + - PLATFORMIO_CI_SRC: "examples\\pl2303\\pl2303_gps\\pl2303_gps.ino" + + install: + - cmd: git submodule update --init --recursive + - cmd: SET PATH=%PATH%;C:\Python27\Scripts + - cmd: pip install -U platformio + - cmd: git clone https://github.com/xxxajk/spi4teensy3.git C:\spi4teensy + + test_script: + - cmd: platformio ci --lib="." --lib="C:\\spi4teensy" --board=uno --board=teensy31 --board=due diff --git a/docs/demo.rst b/docs/demo.rst index 7d073458..be6e42ad 100644 --- a/docs/demo.rst +++ b/docs/demo.rst @@ -19,7 +19,7 @@ Demo & Projects Project Examples ---------------- -Preconfigured demo projects are located in `PlatformIO GitHub `_ repository. +Preconfigured demo projects are located in `PlatformIO GitHub `_ repository. "Blink Project" --------------- diff --git a/docs/index.rst b/docs/index.rst index ec3acee8..88dcbe84 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -39,7 +39,7 @@ libOpenCM3, etc.* * :ref:`ide_atom` * `Web 2.0 Library Search `_ | `Embedded Boards Explorer `_ -* `Project Examples `_ +* `Project Examples `_ * `Source Code `_ | `Issues `_ * `Blog `_ | diff --git a/docs/librarymanager/config.rst b/docs/librarymanager/config.rst index 1784a99b..c56d74ed 100644 --- a/docs/librarymanager/config.rst +++ b/docs/librarymanager/config.rst @@ -141,7 +141,7 @@ Examples: The repository in which the source code can be found. The field consists for the next items: -* ``type`` +* ``type`` the only "git", "hg" or "svn" are supported * ``url`` * ``branch`` if is not specified, default branch will be used. This field will be ignored if tag/release exists with the value of :ref:`libjson_version`. diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 145b241d..3ddf6ea5 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -610,7 +610,7 @@ Examples .. note:: A full list with project examples can be found in - `PlatformIO Repository `_. + `PlatformIO Repository `_. 1. :ref:`platform_atmelavr`: Arduino UNO board with auto pre-configured ``board_*`` and ``upload_*`` options (use only ``board`` option) and Arduino diff --git a/docs/quickstart.rst b/docs/quickstart.rst index def834dd..77877d28 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -256,5 +256,5 @@ Arduino Uno: Further Reading --------------- -* `Project examples `_ +* `Project examples `_ * :ref:`userguide` for PlatformIO CLI commands diff --git a/scripts/appveyor/install.ps1 b/scripts/appveyor/install.ps1 deleted file mode 100644 index 61e93c1e..00000000 --- a/scripts/appveyor/install.ps1 +++ /dev/null @@ -1,82 +0,0 @@ -# https://packaging.python.org/en/latest/appveyor.html -# Sample script to install Python and pip under Windows -# Authors: Olivier Grisel and Kyle Kastner -# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ - -$BASE_URL = "https://www.python.org/ftp/python/" -$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py" -$GET_PIP_PATH = "C:\get-pip.py" - - -function DownloadPython ($python_version, $platform_suffix) { - $webclient = New-Object System.Net.WebClient - $filename = "python-" + $python_version + $platform_suffix + ".msi" - $url = $BASE_URL + $python_version + "/" + $filename - - $basedir = $pwd.Path + "\" - $filepath = $basedir + $filename - if (Test-Path $filename) { - Write-Host "Reusing" $filepath - return $filepath - } - - # Download and retry up to 5 times in case of network transient errors. - Write-Host "Downloading" $filename "from" $url - $retry_attempts = 3 - for($i=0; $i -lt $retry_attempts; $i++){ - try { - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - Write-Host "File saved at" $filepath - return $filepath -} - - -function InstallPython ($python_version, $architecture, $python_home) { - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "" - } else { - $platform_suffix = ".amd64" - } - $filepath = DownloadPython $python_version $platform_suffix - Write-Host "Installing" $filepath "to" $python_home - $args = "/qn /i $filepath TARGETDIR=$python_home" - Write-Host "msiexec.exe" $args - Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait -Passthru - Write-Host "Python $python_version ($architecture) installation complete" - return $true -} - - -function InstallPip ($python_home) { - $python_path = $python_home + "/python.exe" - Write-Host "Installing pip..." - $webclient = New-Object System.Net.WebClient - $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH) - Write-Host "Executing:" $python_path $GET_PIP_PATH - Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru -} - -function InstallPackage ($python_home, $pkg) { - $pip_path = $python_home + "/Scripts/pip.exe" - & $pip_path install -U $pkg -} - -function main () { - InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON_HOME - InstallPip $env:PYTHON_HOME - InstallPackage $env:PYTHON_HOME setuptools - InstallPackage $env:PYTHON_HOME tox -} - -main diff --git a/scripts/appveyor/run_with_compiler.cmd b/scripts/appveyor/run_with_compiler.cmd deleted file mode 100644 index 7a75d18c..00000000 --- a/scripts/appveyor/run_with_compiler.cmd +++ /dev/null @@ -1,48 +0,0 @@ -:: https://packaging.python.org/en/latest/appveyor.html -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) -:: -:: To build extensions for 64 bit Python 2, we need to configure environment -:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) -:: -:: 32 bit builds do not require specific environment configurations. -:: -:: Note: this script needs to be run with the /E:ON and /V:ON flags for the -:: cmd interpreter, at least for (SDK v7.0) -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows -:: http://stackoverflow.com/a/13751649/163740 -:: -:: Author: Olivier Grisel -:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ -@ECHO OFF - -SET COMMAND_TO_RUN=%* -SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows - -SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" -IF %MAJOR_PYTHON_VERSION% == "2" ( - SET WINDOWS_SDK_VERSION="v7.0" -) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( - SET WINDOWS_SDK_VERSION="v7.1" -) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 -) - -IF "%PYTHON_ARCH%"=="64" ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) \ No newline at end of file