forked from ridiculousfish/libdivide
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.28 KB
/
avr_build_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: AVR Build & Unit Tests
on:
# This job takes a long time to run, so only run it when the canary build passes
# Ideally we'd use the workflow_run trigger and have GitHub launch this action, but the docs state:
# This event will only trigger a workflow run if the workflow file is on the default branch.
# ...which leads to some interesting behaviors
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
AVRSimulator-Unit-Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install PlatformIO
working-directory: ./test/avr
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pip install wheel
platformio upgrade
platformio pkg update
- name: Build All Environments
shell: pwsh
working-directory: ./test/avr
run: Get-Content -Path .\platformio.ini | Where-Object { $_.StartsWith("[env:") } | ForEach-Object { & pio run -e $_.SubString(5, $_.Length-6) }
- name: Run Simulator Unit Tests
working-directory: ./test/avr
run: platformio test -v -e megaatmega2560_sim_unittest