Minor changes #21
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: Build binary and hex | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| # Install all necessary dependencies for the build | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-avr binutils-avr avr-libc cmake | |
| # Configure and build the entire project in one go | |
| - name: Configure and Build with CMake | |
| run: | | |
| cmake -S . -B build | |
| cmake --build build --target 1-blinky_build | |
| cmake --build build --target 2-hardcoded-bootloader_build | |
| cmake --build build --target 3-simple-uart-protocol_build | |
| cmake --build build --target firmware_build_all | |
| # Upload the blinky artifacts (first-steps) | |
| - name: Upload blinky build output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 1-blinky | |
| path: | | |
| build/first-steps/1-blinky/1-blinky.bin | |
| build/first-steps/1-blinky/1-blinky.hex | |
| # Upload the hardcoded bootloader artifacts (first-steps) | |
| - name: Upload hardcoded bootloader build output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 2-hardcoded-bootloader | |
| path: | | |
| build/first-steps/2-hardcoded-bootloader/2-hardcoded-bootloader.bin | |
| build/first-steps/2-hardcoded-bootloader/2-hardcoded-bootloader.hex | |
| # Upload the simple UART protocol artifacts (first-steps) | |
| - name: Upload simple UART protocol build output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 3-simple-uart-protocol | |
| path: | | |
| build/first-steps/3-simple-uart-protocol/mcu/3-simple-uart-protocol.bin | |
| build/first-steps/3-simple-uart-protocol/mcu/3-simple-uart-protocol.hex | |
| # Upload the consolidated firmware artifacts (bootloader + user app) | |
| - name: Upload firmware build outputs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware | |
| path: | | |
| build/firmware/firmware_bootloader.bin | |
| build/firmware/firmware_bootloader.hex | |
| build/firmware/firmware_user-app.bin | |
| build/firmware/firmware_user-app.hex |