LoRa_APRS_iGate/.github/workflows/build_check.yml

113 wiersze
2.9 KiB
YAML
Czysty Zwykły widok Historia

2022-11-16 22:10:06 +00:00
name: Integration Tests
2020-06-14 21:34:13 +00:00
2022-03-26 22:26:42 +00:00
on:
2023-02-18 10:58:25 +00:00
merge_group:
2022-03-27 00:47:54 +00:00
pull_request:
2020-06-14 21:34:13 +00:00
jobs:
2021-03-12 23:19:33 +00:00
build:
2021-05-17 08:04:05 +00:00
name: Compile Firmware
2020-08-01 08:49:56 +00:00
runs-on: ubuntu-latest
steps:
2023-02-18 11:20:44 +00:00
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
2023-02-19 11:59:32 +00:00
key: compile-cache
2023-02-18 11:20:44 +00:00
- uses: actions/setup-python@v4
with:
2023-02-19 11:59:32 +00:00
python-version: '3.10'
- name: Install PlatformIO
shell: bash
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
2023-02-19 12:13:18 +00:00
2023-02-19 11:59:32 +00:00
- name: Checkout code
uses: actions/checkout@v3
2023-02-18 11:20:44 +00:00
- name: Build PlatformIO Project
run: pio run
2021-05-15 20:19:17 +00:00
- name: Upload artifacts
2023-02-19 11:43:07 +00:00
uses: actions/upload-artifact@v3
2020-08-01 08:49:56 +00:00
with:
name: firmware
2020-12-17 21:32:01 +00:00
path: .pio/build/lora_board/firmware.bin
2021-03-13 23:18:11 +00:00
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
2021-03-13 23:51:32 +00:00
strategy:
matrix:
path:
- 'src'
- 'lib/BoardFinder'
- 'lib/ConfigurationManagement'
2021-03-13 23:54:57 +00:00
#- 'lib/Display'
2023-05-17 19:34:25 +00:00
- 'lib/NTPClient'
2021-03-13 23:51:32 +00:00
- 'lib/PowerManagement'
2021-03-27 22:34:57 +00:00
- 'lib/System'
2023-05-17 19:34:41 +00:00
- 'lib/TimeLib'
2021-03-13 23:18:11 +00:00
steps:
2021-05-15 20:19:17 +00:00
- name: Checkout code
2023-02-19 09:58:26 +00:00
uses: actions/checkout@v3
2021-03-13 23:18:11 +00:00
- name: Run clang-format style check for C/C++ programs.
2023-02-10 21:06:53 +00:00
uses: jidicula/clang-format-action@v4.10.2
2021-03-13 23:18:11 +00:00
with:
2023-02-10 21:06:53 +00:00
clang-format-version: '14'
2021-03-13 23:51:32 +00:00
check-path: ${{ matrix.path }}
2021-03-13 23:18:11 +00:00
2021-05-15 20:19:17 +00:00
cppcheck:
2021-05-17 08:28:27 +00:00
name: Run cppcheck
2021-05-15 20:19:17 +00:00
runs-on: ubuntu-latest
steps:
2023-05-17 19:19:22 +00:00
- uses: actions/cache@v3
2021-05-15 20:19:17 +00:00
with:
2023-05-17 19:19:22 +00:00
path: |
~/.cache/pip
~/.platformio/.cache
key: check-cache
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install PlatformIO
shell: bash
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
2023-02-19 12:13:18 +00:00
2023-05-17 19:19:22 +00:00
- name: Checkout code
uses: actions/checkout@v3
- name: Run PlatformIO Check
run: pio check --fail-on-defect high -e lora_board
2023-04-28 15:11:54 +00:00
hw_testing:
name: Hardware Testing
2023-05-15 20:29:17 +00:00
strategy:
matrix:
usb_port: [ttyUSB0]
runs-on: [self-hosted, "${{ matrix.usb_port }}"]
2023-02-18 11:20:44 +00:00
steps:
2023-05-15 20:29:17 +00:00
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
2023-05-17 19:19:22 +00:00
key: hw-cache
2023-05-15 20:29:17 +00:00
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install PlatformIO
shell: bash
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
2023-02-18 11:20:44 +00:00
- name: Checkout code
uses: actions/checkout@v3
2023-05-15 20:29:17 +00:00
- name: List Devices
run: pio device list
2023-02-18 11:57:11 +00:00
- name: PlatformIO Test
2023-05-15 20:29:17 +00:00
if: always()
2023-05-15 20:35:17 +00:00
run: flock -w 600 --verbose /locks/pio-${{ matrix.usb_port }} -c "pio test -vvv --upload-port /dev/${{ matrix.usb_port }} --test-port /dev/${{ matrix.usb_port }}"
2023-04-28 18:49:19 +00:00