mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Test examples from the official dev-platforms
This commit is contained in:
11
.github/workflows/examples.yml
vendored
11
.github/workflows/examples.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@ -26,7 +26,8 @@ jobs:
|
|||||||
- name: Run on Linux
|
- name: Run on Linux
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
env:
|
env:
|
||||||
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,siwigsm,intel_mcs51,aceinna_imu,tokisaki"
|
PIO_INSTALL_DEVPLATFORMS_OWNERNAMES: "platformio"
|
||||||
|
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,intel_mcs51"
|
||||||
run: |
|
run: |
|
||||||
# ChipKIT issue: install 32-bit support for GCC PIC32
|
# ChipKIT issue: install 32-bit support for GCC PIC32
|
||||||
sudo apt-get install libc6-i386
|
sudo apt-get install libc6-i386
|
||||||
@ -40,7 +41,8 @@ jobs:
|
|||||||
- name: Run on macOS
|
- name: Run on macOS
|
||||||
if: startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'macos')
|
||||||
env:
|
env:
|
||||||
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,siwigsm,microchippic32,gd32v,nuclei,lattice_ice40,tokisaki"
|
PIO_INSTALL_DEVPLATFORMS_OWNERNAMES: "platformio"
|
||||||
|
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,microchippic32,lattice_ice40"
|
||||||
run: |
|
run: |
|
||||||
df -h
|
df -h
|
||||||
tox -e testexamples
|
tox -e testexamples
|
||||||
@ -50,7 +52,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PLATFORMIO_CORE_DIR: C:/pio
|
PLATFORMIO_CORE_DIR: C:/pio
|
||||||
PLATFORMIO_WORKSPACE_DIR: C:/pio-workspace/$PROJECT_HASH
|
PLATFORMIO_WORKSPACE_DIR: C:/pio-workspace/$PROJECT_HASH
|
||||||
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,siwigsm,riscv_gap,tokisaki"
|
PIO_INSTALL_DEVPLATFORMS_OWNERNAMES: "platformio"
|
||||||
|
PIO_INSTALL_DEVPLATFORMS_IGNORE: "ststm8,infineonxmc,riscv_gap"
|
||||||
run: |
|
run: |
|
||||||
tox -e testexamples
|
tox -e testexamples
|
||||||
|
|
||||||
|
@ -26,15 +26,25 @@ import click
|
|||||||
envvar="PIO_INSTALL_DEVPLATFORMS_IGNORE",
|
envvar="PIO_INSTALL_DEVPLATFORMS_IGNORE",
|
||||||
help="Ignore names split by comma",
|
help="Ignore names split by comma",
|
||||||
)
|
)
|
||||||
def main(desktop, ignore):
|
@click.option(
|
||||||
|
"--ownernames",
|
||||||
|
envvar="PIO_INSTALL_DEVPLATFORMS_OWNERNAMES",
|
||||||
|
help="Filter dev-platforms by ownernames (split by comma)",
|
||||||
|
)
|
||||||
|
def main(desktop, ignore, ownernames):
|
||||||
platforms = json.loads(
|
platforms = json.loads(
|
||||||
subprocess.check_output(
|
subprocess.check_output(
|
||||||
["platformio", "platform", "search", "--json-output"]
|
["platformio", "platform", "search", "--json-output"]
|
||||||
).decode()
|
).decode()
|
||||||
)
|
)
|
||||||
ignore = [n.strip() for n in (ignore or "").split(",") if n.strip()]
|
ignore = [n.strip() for n in (ignore or "").split(",") if n.strip()]
|
||||||
|
ownernames = [n.strip() for n in (ownernames or "").split(",") if n.strip()]
|
||||||
for platform in platforms:
|
for platform in platforms:
|
||||||
skip = [not desktop and platform["forDesktop"], platform["name"] in ignore]
|
skip = [
|
||||||
|
not desktop and platform["forDesktop"],
|
||||||
|
platform["name"] in ignore,
|
||||||
|
ownernames and platform["ownername"] not in ownernames,
|
||||||
|
]
|
||||||
if any(skip):
|
if any(skip):
|
||||||
continue
|
continue
|
||||||
subprocess.check_call(["platformio", "platform", "install", platform["name"]])
|
subprocess.check_call(["platformio", "platform", "install", platform["name"]])
|
||||||
|
Reference in New Issue
Block a user