2023-11-30 21:05:31 +00:00
|
|
|
name: "Install and build"
|
|
|
|
description: "Install and build"
|
2023-11-30 20:19:50 +00:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: lts/*
|
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: '**/yarn.lock'
|
2024-06-07 23:17:20 +00:00
|
|
|
- uses: actions/cache@v4
|
2023-11-30 20:19:50 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.platformio/.cache
|
|
|
|
~/data/node_modules
|
|
|
|
key: ${{ runner.os }}-pio
|
2024-06-07 23:17:20 +00:00
|
|
|
- uses: actions/setup-python@v5
|
2023-11-30 20:19:50 +00:00
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
- name: Get current date
|
|
|
|
id: dateAndTime
|
2023-11-30 21:12:47 +00:00
|
|
|
shell: bash
|
2023-11-30 20:19:50 +00:00
|
|
|
run: echo "dateAndTime=$(date +'%Y-%m-%d-%H:%M')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install PlatformIO Core
|
2023-11-30 21:12:47 +00:00
|
|
|
shell: bash
|
2023-11-30 20:19:50 +00:00
|
|
|
run: pip install --upgrade platformio
|
|
|
|
- name: Run unit tests
|
2023-11-30 21:12:47 +00:00
|
|
|
shell: bash
|
2023-11-30 20:19:50 +00:00
|
|
|
run: mkdir -p junit-reports && pio test -e native_test_only --junit-output-path junit-reports/
|
|
|
|
- name: Publish Test Report
|
|
|
|
uses: mikepenz/action-junit-report@v4
|
|
|
|
if: success() || failure() # always run even if the previous step fails
|
|
|
|
with:
|
|
|
|
report_paths: '**/junit-reports/*.xml'
|
|
|
|
detailed_summary: true
|
|
|
|
- name: Build BTClock firmware
|
2023-11-30 21:12:47 +00:00
|
|
|
shell: bash
|
2024-03-18 18:32:34 +00:00
|
|
|
run: pio run
|
2023-11-30 20:19:50 +00:00
|
|
|
- name: Build BTClock filesystem
|
2023-11-30 21:12:47 +00:00
|
|
|
shell: bash
|
2024-03-18 18:32:34 +00:00
|
|
|
run: pio run --target buildfs
|