|
| 1 | +name: Build OpenThread nRF52840 Example |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + name: Build OpenThread nRF52840 |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + steps: |
| 17 | + # Step 1: Checkout the code |
| 18 | + - name: Checkout repository |
| 19 | + uses: actions/checkout@v3 |
| 20 | + with: |
| 21 | + submodules: recursive |
| 22 | + |
| 23 | + # Step 2: Set up dependencies |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + sudo apt-get update |
| 27 | + sudo apt-get install -y \ |
| 28 | + gcc-arm-none-eabi \ |
| 29 | + make \ |
| 30 | + cmake \ |
| 31 | + git \ |
| 32 | + libstdc++-arm-none-eabi-newlib \ |
| 33 | + python3-pip |
| 34 | + pip3 install --upgrade pip |
| 35 | + pip3 install nrfutil |
| 36 | +
|
| 37 | + # Step 3: Bootstrap the project |
| 38 | + - name: Bootstrap the project |
| 39 | + working-directory: ot-nrf528xx |
| 40 | + run: ./script/bootstrap |
| 41 | + |
| 42 | + # Step 4: Build the example |
| 43 | + - name: Build nRF52840 UART Example |
| 44 | + working-directory: ot-nrf528xx |
| 45 | + run: ./script/build nrf52840 UART_trans |
| 46 | + |
| 47 | + # Step 5: Convert ELF to HEX |
| 48 | + - name: Convert ELF to HEX |
| 49 | + working-directory: ot-nrf528xx |
| 50 | + run: arm-none-eabi-objcopy -O ihex build/bin/ot-cli-ftd build/bin/ot-cli-ftd.hex |
| 51 | + |
| 52 | + # Step 6: Upload artifacts |
| 53 | + - name: Upload binaries |
| 54 | + uses: actions/upload-artifact@v3 |
| 55 | + with: |
| 56 | + name: ot-nrf528xx-binaries |
| 57 | + path: | |
| 58 | + ot-nrf528xx/build/bin/ot-cli-ftd |
| 59 | + ot-nrf528xx/build/bin/ot-cli-ftd.hex |
| 60 | +
|
0 commit comments