| 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 |