add debug action #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile Firmware | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - test/** | |
| - .github/workflows/compile.yaml | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Gather application sources | |
| run: | | |
| echo "Creating temporary source directory" | |
| mkdir appsrc | |
| echo "Moving application sources" | |
| mv test/blink/* appsrc | |
| echo "Moving application libraries" | |
| mv lib/DeviceNameHelperRK/src/* appsrc | |
| - name: Compile in cloud | |
| id: compile | |
| uses: particle-iot/compile-action@v1 | |
| with: | |
| particle-access-token: ${{ secrets.PARTICLE_ACCESS_TOKEN }} | |
| particle-platform-name: 'p2' | |
| device-os-version: '6.3.2' | |
| sources-folder: 'appsrc' | |
| - name: Upload artifact | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware-artifact | |
| path: ${{ steps.compile.outputs.firmware-path }} | |
| - name: Compile locally to debug | |
| if: ${{ failure() }} | |
| uses: particle-iot/compile-action@v1 | |
| with: | |
| particle-platform-name: 'p2' | |
| device-os-version: '6.3.2' | |
| sources-folder: 'appsrc' |