picopuck.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: PicoPuck
  2. on:
  3. push:
  4. branches:
  5. - main
  6. tags:
  7. - '[0-9]*.[0-9]*.[0-9]*'
  8. paths:
  9. - 'PicoPuck/**'
  10. - '.github/workflows/picopuck.yml'
  11. pull_request:
  12. paths:
  13. - 'PicoPuck/**'
  14. - '.github/workflows/picopuck.yml'
  15. concurrency:
  16. group: picopuck-${{ github.event.pull_request.number || github.ref }}
  17. cancel-in-progress: true
  18. permissions:
  19. contents: read
  20. jobs:
  21. build:
  22. runs-on: ubuntu-latest
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. board: [pico_w, pico2_w]
  27. steps:
  28. - name: Check out repository
  29. uses: actions/checkout@v4
  30. with:
  31. ref: ${{ github.event.pull_request.head.sha || github.sha }}
  32. - name: Install toolchain
  33. run: |
  34. sudo apt-get update
  35. sudo apt-get install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
  36. - name: Check out Pico SDK 2.x
  37. uses: actions/checkout@v4
  38. with:
  39. repository: raspberrypi/pico-sdk
  40. ref: 2.2.0
  41. path: pico-sdk
  42. submodules: true
  43. - name: Build PicoPuck (${{ matrix.board }})
  44. env:
  45. PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
  46. run: |
  47. cmake -S PicoPuck -B PicoPuck/build-${{ matrix.board }} -DPICO_BOARD=${{ matrix.board }}
  48. cmake --build PicoPuck/build-${{ matrix.board }} -j
  49. - name: Upload UF2 artifact
  50. uses: actions/upload-artifact@v4
  51. with:
  52. name: picopuck_${{ matrix.board }}.uf2
  53. retention-days: 7
  54. if-no-files-found: error
  55. path: PicoPuck/build-${{ matrix.board }}/picopuck_${{ matrix.board }}.uf2