Merge branch 'develop' into feature/platformio-30

* develop:
  Install tox manually
  Simplified documentation for Continuous integration with AppVeyor // Resolve #671
  Fix broken links to project examples
  Add stlink as the default uploader for disco boards // Issue #665
  Specify supported types of library repository
This commit is contained in:
Ivan Kravets
2016-05-28 20:42:50 +03:00
11 changed files with 40 additions and 311 deletions

View File

@ -18,6 +18,8 @@ PlatformIO 2.0
2.9.2 (2016-??-??) 2.9.2 (2016-??-??)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
* Simplified documentation for `Continuous Integration with AppVeyor <http://docs.platformio.org/en/latest/ci/appveyor.html>`__
(`issue #671 <https://github.com/platformio/platformio/issues/671>`_)
* Added support for Silicon Labs SLSTK3401A (Pearl Gecko) and * Added support for Silicon Labs SLSTK3401A (Pearl Gecko) and
MultiTech mDot F411 ARM mbed based boards MultiTech mDot F411 ARM mbed based boards
* Added support for MightyCore ATmega8535 board * Added support for MightyCore ATmega8535 board
@ -670,7 +672,7 @@ PlatformIO 1.0
(`issue #183 <https://github.com/platformio/platformio/issues/183>`_) (`issue #183 <https://github.com/platformio/platformio/issues/183>`_)
* Added GDB as alternative uploader to `ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__ platform * Added GDB as alternative uploader to `ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__ platform
(`issue #175 <https://github.com/platformio/platformio/issues/174>`_) (`issue #175 <https://github.com/platformio/platformio/issues/174>`_)
* Added `examples <https://github.com/platformio/platformio/tree/develop/examples>`__ * Added `examples <https://github.com/platformio/platformio-examples/tree/develop>`__
with preconfigured IDE projects with preconfigured IDE projects
(`issue #154 <https://github.com/platformio/platformio/issues/154>`_) (`issue #154 <https://github.com/platformio/platformio/issues/154>`_)
* Fixed firmware uploading under Linux OS for Arduino Leonardo board * Fixed firmware uploading under Linux OS for Arduino Leonardo board

View File

@ -16,11 +16,8 @@ PlatformIO
.. image:: https://img.shields.io/pypi/l/platformio.svg .. image:: https://img.shields.io/pypi/l/platformio.svg
:target: https://pypi.python.org/pypi/platformio/ :target: https://pypi.python.org/pypi/platformio/
:alt: License :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 .. 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 :target: https://community.platformio.org
.. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow .. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow
:alt: Donate for PlatformIO.Org :alt: Donate for PlatformIO.Org
@ -29,7 +26,7 @@ PlatformIO
`Home <http://platformio.org>`_ | `Home <http://platformio.org>`_ |
`IDE <http://platformio.org/platformio-ide>`_ | `IDE <http://platformio.org/platformio-ide>`_ |
`Project Examples <https://github.com/platformio/platformio/tree/develop/examples>`_ | `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_ |
`Docs <http://docs.platformio.org>`_ | `Docs <http://docs.platformio.org>`_ |
`Twitter <https://twitter.com/PlatformIO_Org>`_ | `Twitter <https://twitter.com/PlatformIO_Org>`_ |
`Facebook <https://www.facebook.com/platformio>`_ | `Facebook <https://www.facebook.com/platformio>`_ |

View File

@ -1,27 +1,13 @@
build: off build: off
environment: environment:
global:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\appveyor\\run_with_compiler.cmd"
matrix: matrix:
- TOXENV: "py27" - 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: install:
- "git submodule update --init --recursive" - cmd: git submodule update --init --recursive
- "powershell scripts\\appveyor\\install.ps1" - cmd: SET PATH=%PATH%;C:\Python27\Scripts
- cmd: pip install tox
before_test:
- cmd: SET PATH=%PATH%;C:\MinGW\bin
test_script: test_script:
- "%PYTHON_HOME%\\Scripts\\tox --version" - cmd: tox
- "%PYTHON_HOME%\\Scripts\\pip --version"
- "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox"

View File

@ -44,142 +44,20 @@ Put ``appveyor.yml`` to the root directory of the GitHub repository.
build: off build: off
environment: 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 install:
same for the all projects, don't need to modify them): - 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` For more details as for PlatformIO build process please look into :ref:`cmd_ci`
command. command.
@ -194,20 +72,16 @@ Examples
build: off build: off
environment: environment:
global:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\appveyor\\run_with_compiler.cmd" matrix:
matrix: - PLATFORMIO_CI_SRC: "examples\\Bluetooth\\PS3SPP\\PS3SPP.ino"
- PLATFORMIO_CI_SRC: "examples\\Bluetooth\\PS3SPP\\PS3SPP.ino" - PLATFORMIO_CI_SRC: "examples\\pl2303\\pl2303_gps\\pl2303_gps.ino"
PLATFORMIO_CI_SRC: "examples\\pl2303\\pl2303_gps\\pl2303_gps.ino"
WINDOWS_SDK_VERSION: "v7.0" install:
PYTHON_HOME: "C:\\Python27-x64" - cmd: git submodule update --init --recursive
PYTHON_VERSION: "2.7" - cmd: SET PATH=%PATH%;C:\Python27\Scripts
PYTHON_ARCH: "64" - cmd: pip install -U platformio
install: - cmd: git clone https://github.com/xxxajk/spi4teensy3.git C:\spi4teensy
- "git submodule update --init --recursive"
- "powershell scripts\\appveyor\\install.ps1" test_script:
before_test: - cmd: platformio ci --lib="." --lib="C:\\spi4teensy" --board=uno --board=teensy31 --board=due
- 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'

View File

@ -19,7 +19,7 @@ Demo & Projects
Project Examples Project Examples
---------------- ----------------
Preconfigured demo projects are located in `PlatformIO GitHub <https://github.com/platformio/platformio/tree/develop/examples>`_ repository. Preconfigured demo projects are located in `PlatformIO GitHub <https://github.com/platformio/platformio-examples/tree/develop>`_ repository.
"Blink Project" "Blink Project"
--------------- ---------------

View File

@ -39,7 +39,7 @@ libOpenCM3, etc.*
* :ref:`ide_atom` * :ref:`ide_atom`
* `Web 2.0 Library Search <http://platformio.org/lib>`_ | * `Web 2.0 Library Search <http://platformio.org/lib>`_ |
`Embedded Boards Explorer <http://platformio.org/boards>`_ `Embedded Boards Explorer <http://platformio.org/boards>`_
* `Project Examples <https://github.com/platformio/platformio/tree/develop/examples>`_ * `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_
* `Source Code <https://github.com/platformio/platformio>`_ | * `Source Code <https://github.com/platformio/platformio>`_ |
`Issues <https://github.com/platformio/platformio/issues>`_ `Issues <https://github.com/platformio/platformio/issues>`_
* `Blog <http://www.ikravets.com/category/computer-life/platformio>`_ | * `Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |

View File

@ -141,7 +141,7 @@ Examples:
The repository in which the source code can be found. The field consists for the The repository in which the source code can be found. The field consists for the
next items: next items:
* ``type`` * ``type`` the only "git", "hg" or "svn" are supported
* ``url`` * ``url``
* ``branch`` if is not specified, default branch will be used. This field will * ``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`. be ignored if tag/release exists with the value of :ref:`libjson_version`.

View File

@ -610,7 +610,7 @@ Examples
.. note:: .. note::
A full list with project examples can be found in A full list with project examples can be found in
`PlatformIO Repository <https://github.com/platformio/platformio/tree/develop/examples>`_. `PlatformIO Repository <https://github.com/platformio/platformio-examples/tree/develop>`_.
1. :ref:`platform_atmelavr`: Arduino UNO board with auto pre-configured 1. :ref:`platform_atmelavr`: Arduino UNO board with auto pre-configured
``board_*`` and ``upload_*`` options (use only ``board`` option) and Arduino ``board_*`` and ``upload_*`` options (use only ``board`` option) and Arduino

View File

@ -256,5 +256,5 @@ Arduino Uno:
Further Reading Further Reading
--------------- ---------------
* `Project examples <https://github.com/platformio/platformio/tree/develop/examples>`_ * `Project examples <https://github.com/platformio/platformio-examples/tree/develop>`_
* :ref:`userguide` for PlatformIO CLI commands * :ref:`userguide` for PlatformIO CLI commands

View File

@ -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

View File

@ -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
)