mirror of
https://github.com/platformio/platformio-core.git
synced 2026-01-26 00:42:24 +01:00
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
name: Examples
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
PIO_INSTALL_DEVPLATFORM_OWNERNAMES: "platformio"
|
|
PIO_INSTALL_DEVPLATFORM_NAMES: "aceinna_imu,atmelavr,atmelmegaavr,atmelsam,espressif32,espressif8266,nordicnrf52,raspberrypi,ststm32,teensy"
|
|
|
|
steps:
|
|
- name: Free Disk Space
|
|
uses: endersonmenezes/free-disk-space@v3
|
|
with:
|
|
remove_android: true
|
|
remove_dotnet: true
|
|
remove_haskell: true
|
|
# Faster cleanup
|
|
remove_packages_one_command: true
|
|
rm_cmd: "rmz"
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install tox
|
|
|
|
- name: Run on Linux
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
# Free space
|
|
sudo apt clean
|
|
# docker rmi $(docker image ls -aq)
|
|
df -h
|
|
tox -e testexamples
|
|
|
|
- name: Run on macOS
|
|
if: startsWith(matrix.os, 'macos')
|
|
run: |
|
|
df -h
|
|
tox -e testexamples
|
|
|
|
- name: Run on Windows
|
|
if: startsWith(matrix.os, 'windows')
|
|
env:
|
|
PLATFORMIO_CORE_DIR: C:/pio
|
|
PLATFORMIO_WORKSPACE_DIR: C:/pio-workspace/$PROJECT_HASH
|
|
run: |
|
|
tox -e testexamples
|
|
|
|
- name: Slack Notification
|
|
uses: homoluctus/slatify@master
|
|
if: failure()
|
|
with:
|
|
type: ${{ job.status }}
|
|
job_name: '*Examples*'
|
|
commit: true
|
|
url: ${{ secrets.SLACK_BUILD_WEBHOOK }}
|
|
token: ${{ secrets.SLACK_GITHUB_TOKEN }}
|