add photon #10
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 | |
| name: ${{ matrix.program.src }}-${{ matrix.platform.name }}-${{ matrix.platform.version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - {name: 'p2', version: '6.3.2'} | |
| - {name: 'argon', version: '4.2.0'} | |
| - {name: 'photon', version: '2.3.1'} | |
| root: | |
| - 'test' | |
| program: | |
| - {src: 'blink', lib: 'lib/Mylib/src'} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Gather application sources | |
| run: | | |
| echo "Creating temporary source directory" | |
| mkdir ${{ matrix.program.src }} | |
| echo "Moving application sources" | |
| mv ${{ matrix.root }}/${{ matrix.program.src }}/* ${{ matrix.program.src }} | |
| echo "Moving application libraries" | |
| mv ${{ matrix.program.lib }}/* ${{ matrix.program.src }} | |
| - name: Compile in cloud | |
| id: compile | |
| uses: particle-iot/compile-action@v1 | |
| with: | |
| particle-access-token: ${{ secrets.PARTICLE_ACCESS_TOKEN }} | |
| particle-platform-name: ${{ matrix.platform.name }} | |
| device-os-version: ${{ matrix.platform.version }} | |
| sources-folder: ${{ matrix.program.src }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.program.src }}-${{ matrix.platform.name }}-${{ matrix.platform.version }} | |
| path: ${{ steps.compile.outputs.firmware-path }} | |
| - name: Compile locally to debug | |
| if: ${{ failure() }} | |
| uses: particle-iot/compile-action@v1 | |
| with: | |
| particle-platform-name: ${{ matrix.platform.name }} | |
| device-os-version: ${{ matrix.platform.version }} | |
| sources-folder: 'appsrc' |