btclock_v3/.github/actions/install-build/action.yml

43 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2023-11-30 21:05:31 +00:00
name: "Install and build"
description: "Install and build"
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
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
with:
python-version: '3.9'
- name: Get current date
id: dateAndTime
2023-11-30 21:12:47 +00:00
shell: bash
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
run: pip install --upgrade platformio
- name: Run unit tests
2023-11-30 21:12:47 +00:00
shell: bash
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
- 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